# An $R$-module $M$ is isomorphic to a direct sum if and only if four conditions are satisfied

Let $$M$$ be an $$R$$-module, and let $$\{ M_i \}_{i \in I}$$ be a family of $$R$$-modules. I need to prove that

$$M \cong \bigoplus_{i \in I} M_i$$ if and only if there exists families $$\{ \mu_i \}_{i \in I}, \ \{ \rho_i \}_{i \in I}$$ where $$\mu_i \in Hom_{R-Mod}(M_i, M)$$, $$\rho_i \in Hom_{R-Mod}(M, M_i)$$ such that

$$1) \ \forall i \in I \ \ \rho_i \circ \mu_i = id_{M_i}$$

$$2) \forall i, j \in I, \ i \neq J : \ \ \rho_i \circ \mu_i = 0$$

$$3) \forall m \in M \ \ \rho_i(m) \neq 0$$ for only finitely many $$i \in I$$

$$4) \sum\nolimits_{i \in I} \mu_i \circ \rho_i = id_M$$

If $$M \cong \bigoplus_{i \in I} M_i$$, then $$M$$ also satisfies the universal property(say, along with a family $$\{ \mu \}_{i \in I}$$ of canonical injections). In particular, for any $$k \in I$$ let $$\{k_i \}_{i \in I}$$ be a family of homomorphisms $$k_i \in Hom_{R-Mod}(M_i, M_k)$$. Let $$k_i = 1_{M_k}$$ if $$i = k$$ and let $$k_i = 0$$ if $$i \neq k$$. Then the universal property gives us a homomorphism $$\phi_k: M \to M_k$$ such that $$\forall i \in I \ \phi_k \circ \pi_i = k_i$$. So, $$1)$$ and $$2)$$ are taken care of. But how to prove that $$3)$$ and $$4)$$ also follow?

Besides, I currently have no idea how to prove that if $$1) - 4)$$ are satisfied then it's necessarily that $$M$$ is a coproduct of $$\{M_i \}_{i \in I}$$ in $$R-Mod$$.

Suppose first that indeed $M$ is isomorphic to $\bigoplus M_i$. There are projections and inclusions $\iota_i,\pi_i$ from and to each $M_i$ which satisfy conditions $1$ through $4$, and because such conditions are unaltered by conjugating your maps with the given isomorphism, you obtain one direction.

Conversely, assume such maps exist. Then there is a map $\rho : M\longrightarrow \bigoplus M_i$ such that $m\mapsto \sum \rho_i(m)$. Moreover, the maps $\mu_i$ assemble to give a map $\iota: \bigoplus M_i\longrightarrow M$. By construction and the given conditions, these are inverse isomorphisms.

I will identify $\bigoplus M_i$ with the set of $R$-linear combinations of elements of the $M_i$. The $\mu_i$ and $\rho_i$ are the canonical injections and projections, respectively. Properties 1 through 4 follow from their definition:

1) $\rho_i(\mu_i(m_i)) = \rho_i(\overline m_i) = m_i$, where $\overline m_i$ just denotes $m_i$ viewed as an element of $\bigoplus M_i$.

2) $\rho_i(\mu_j(m_j)) = \rho_i(\overline m_j) = 0$ if $i \neq j$ as there is no $i$th component in $\overline m_j$.

3) Follows from our identification as a linear combination is by definition finite.

4) If $m = \sum_i r_i \overline m_i$ is any element of $\bigoplus M_i$ then $$\sum_i \mu_i(\rho_i(m)) =\sum_i \mu_i(\rho_i(\sum_j r_j \overline m_j)) = \sum_i r_i \mu_i(m_i) = \sum_i r_i \overline m_i = m.$$

Conversely, if $M$ has maps $\mu_i$, $\rho_i$ satisfying these conditions, then, essentially to flesh out Pedro Tamaroff's second paragraph, consider $\rho = \Pi \rho_i$ and $\iota = \oplus \mu_i$. We have

$$\rho(\iota(\sum_i r_i m_i)) = \rho(\sum_i r_i \mu_i(m_i)) = \sum_{i,j} r_i \rho_j(\mu_i(m_i)) = r_i m_i$$ by conditions 1),2), and

$$\iota(\rho(m)) = \iota(\sum_i \rho_i(m)) = \sum_i \mu_i (\rho_i(m)) = m$$

by condition 4).

Note that condition 3) is necessary for the interpretation of $\rho(m) = \sum_i \rho_i(m)$ as a linear combination to make sense.