## Arbitrary direct products and direct sums of modules are modules

Let $R$ be a ring and let $\{M_i\}_{i \in I}$ be a family of left $R$-modules indexed by a (nonempty) set $I$. Prove that $\prod_I M_i$ is a left $R$-module via the action $r \cdot (m_i) = (r \cdot m_i)$ (Called the direct product of the modules $M_i$). Moreover, prove that the subset $\bigoplus_I M_i = \{ (a_i) \in \prod_I M_i \ |\ a_i = 0\ \mathrm{for\ all\ but\ finitely\ many}\ i \}$ is a submodule of $\prod_I M_i$ (Called the direct sum of the modules $M_i$). Moreover, show that $\prod_{n \in \mathbb{N}} \mathbb{Z}/(n)$ and $\bigoplus_{n \in \mathbb{N}} \mathbb{Z}/(n)$ are not isomorphic as $\mathbb{Z}$-modules.

We saw in this previous exercise that $\prod_I M_i$ is an abelian group under pointwise addition and multiplication. Thus it suffices to show that the three left-module axioms are satisfied. To that end, let $r,s \in R$ and let $(m_i), (n_i) \in \prod_I M_i$. We have $(r+s) \cdot (m_i) = ((r+s) \cdot m_i)$ $= (r \cdot m_i + s \cdot m_i)$ $= (r \cdot m_i) + (s \cdot m_i)$ $= r \cdot (m_i) + s \cdot (m_i)$, $(rs) \cdot (m_i) = ((rs) \cdot m_i)$ $= (r \cdot (s \cdot m_i))$ $= r \cdot (s \cdot m_i)$ $= r \cdot (s \cdot (m_i))$, and $r \cdot ((m_i) + (n_i))$ $= r \cdot (m_i + n_i)$ $= (r \cdot (m_i + n_i))$ $= (r \cdot m_i + r \cdot n_i)$ $= (r \cdot m_i) + (r \cdot n_i)$ $= r \cdot (m_i) + r \cdot (n_i)$. Thus $\prod_I M_i$ is a left $R$-module. Suppose further that $R$ has a 1 and that each $M_i$ is unital; then $1 \cdot (m_i) = (1 \cdot m_i) = (m_i)$, for all $(m_i)$, so that $\prod_I M_i$ is unital.

Now we will use the submodule criterion to show that $\bigoplus_I M_i$ is a submodule of $\prod_I M_i$. To that end, note first that $\bigoplus_I M_i$ is nonempty since $0 \in \bigoplus_I M_i$. (The set of indices such that $0 = (0_i)$ is nonzero is empty, which is certainly finite). Now let $(x_i), (y_i) \in \bigoplus_I M_i$ and let $r \in R$. Say $J,K \subseteq I$ such that $x_j = 0$ for $j \notin J$ and $y_k = 0$ for $k \notin K$. Consider $(x_i) + r \cdot (y_i) = (x_i + r \cdot y_i)$. Note that if $i \notin J \cup K$, then $x_i + r \cdot y_i = 0$. Since $J \cup K \subseteq I$ is finite, $(x_i) + r \cdot (y_i) \in \bigoplus_I M_i$. By the submodule criterion, $\bigoplus_I M_i \subseteq \prod_I M_i$ is an $R$-submodule.

Now consider $M = \bigoplus_\mathbb{N} \mathbb{Z}/(n)$ and $N = \prod_\mathbb{N} \mathbb{Z}/(n)$ as $\mathbb{Z}$-modules in the natural way. We intend to show that these two modules are not isomorphic by showing that one is torsion while the other is not. To that end, let $(a_i) \in M$. There is a natural number $N$ such that, for all $k \geq N$, $a_k = 0$. Now let $t = \prod_{n=1}^N n$ (where this product is taken over the natural numbers). Certainly then $t \cdot (a_i) = 0$; that is, every element of $M$ is torsion, so that $M$ is torsion. However, note that $t \cdot (1) = (t)$ is nonzero for all integers $t$ since (for instance) the $|t|-1$ component of $(t)$ is 1. So $N$ is not torsion. Thus $M$ and $N$ are not isomorphic as $\mathbb{Z}$-modules.