TITLE: Uniqueness of infinite direct sum decomposition
QUESTION [5 upvotes]: A module $M$ over a ring $R$ is called semisimple if it admits a direct sum decomposition into simple modules. If $M$ admits a finite decomposition $M=\bigoplus_{i=1}^n S_i$ into simple $R$-modules $S_i$, then this decomposition is unique up to isomorphism and permutation of the factors because from such a decomposition one can cook up a composition series and then use the Jordan–Hölder theorem.
I would like to know: are infinite decompositions unique as well?
E.g. if $R$ is semisimple, then all $R$-modules are semisimple. Do they decompose uniquely?

REPLY [7 votes]: Yes. A semisimple module $M$ is canonically isomorphic to
$$M \cong \bigoplus_i \text{Hom}_R(S_i, M) \otimes_{\text{End}(S_i)} S_i$$
where $\text{Hom}_R(S_i, M)$ is what you might call the multiplicity space of the simple module $S_i$. It is naturally a module over the division ring $\text{End}(S_i)$, and from this expression it follows that the multiplicity of $S_i$ in any direct sum decomposition of $M$ into simples must be $\dim_{\text{End}(S_i)} \text{Hom}_R(S_i, M)$. (For this we need to know that $\text{Hom}_R(S_i, -)$ preserves infinite coproducts, but this follows from the fact that simple modules are cyclic and so in particular finitely generated.)