Specimen 36. Direct sums and products of modules.
Let \(R\) be a ring, and let \((M_i)_{i\in I}\) be an indexed family of \(R\)-modules for some nonempty index set \(I\text{.}\)
The direct product of \((M_i)_{i\in }\) is the \(R\)-module whose underlying set is \(\prod_{i\in I}M_i\text{,}\) the set of all tuples \((m_i)_{i\in I}\text{,}\) where \(m_i\in M_i\) for all \(i\in I\text{,}\) and whose module addition and scalar multiplication are defined component-wise as follows:
\begin{align*}
(m_i)_{i\in I}+ (n_i)_{i\in I} \amp = (m_i+n_i)_{i\in I}\\
r\cdot (m_i)_{i\in I} \amp = (rm_i)_{i\in I}
\end{align*}
for all \(m=(m_i), n=(n_i)\in \prod_{i\in I}M_i\) and \(r\in R\text{.}\)
The direct sum of \((M_i)_{i\in I}\text{,}\) denoted \(\bigoplus_{i\in I}M_i\) is the \(R\)-submodule of \(\prod_{i\in I}M_i\) consisting of all tuples \((m_i)_{i\in I}\) for which \(m_i=0\) for all but finitely many \(i\in I\text{:}\) i.e.,
\begin{align}
\bigoplus_{i\in I} M_i \amp =\{(m_i)_{i\in I}\in \prod_{i\in I}M_i\mid m_i=0 \text{ for all but finitely many } i\in I\}\text{.}\tag{2.18.1}
\end{align}
For all \(j\in I\) we define the \(j\)-th projection map \(\pi_j\colon \prod_{i\in I}M_i\to M_j\) by \(\pi_j((m_i)_{i\in I})=m_j\text{,}\) and the \(j\)-th inclusion map \(\iota_j\colon M_j\to \bigoplus_{i\in I}M_i\) by \(\iota_j(m)=(m_i)_{i\in I}\text{,}\) where \(m_i=0\) for all \(i\neq j\) and \(m_j=m\text{.}\) The maps \(\pi_j\) and \(\iota_j\) are \(R\)-module homomorphisms for all \(j\in I\text{.}\)
