In this post, I will show that the direct sum and tensor product of modules fit nicely together. Recall that for $M$ an $R$-module, $M$ is the (internal) direct sum of two of its submodules $N, N'$ if and only if every element $m \in M$ can be uniquely written as $m = n + n'$ with $n \in N, n \in N'$. We can naturally identify the direct sum of two $R$-modules $N \oplus N'$ with $N \times N'.$

Theorem: Let $M, M', N, N'$ be $R$-modules for $R$ a commutative (and unitary) ring. Then there are unique isomorphisms

$(M \oplus M') \otimes N \simeq (M \otimes N) \oplus (M' \otimes N);$

$M \otimes (N \oplus N') \simeq (M \otimes N) \oplus (M \otimes N').$

Proof: I will only give the first isomorphism, the other one being analogous. Consider the map from $(M \oplus M') \times N$ to $(M \otimes N) \oplus (M' \otimes N)$ which takes $((m,m'),n)$ to $((m \otimes n),(m' \otimes n)).$ This map is easily seen to be bilinear and so by the universal property of tensor products, it induces a unique $R$-module homomorphism $\phi : ( M \oplus M') \otimes N \to (M \otimes N) \oplus (M' \otimes N)$ such that

$\phi((m,m')\otimes n) = (m \otimes n, m' \otimes n).$

In the other direction, both maps, respectively from $M \times N$ and $M' \times N$ to $(M \oplus M') \otimes N,$ respectively defined as $(m,n) \mapsto (m,0) \otimes n$ and $(m',n) \mapsto (0,m') \otimes n$ are bilinear. Thus, they induce unique $R$-module homomorphisms $\varphi_1, \varphi_2:$

such that $\varphi_1(m \otimes n) = (m,0)\otimes n$ and $\varphi_2(m' \otimes n) = (0,m')\otimes n.$ Therefore, $\phi^* : (M\otimes N) \oplus (M' \otimes N) \to (M\oplus M') \otimes N$ defined as

$\phi^*(m\otimes n_1, m\otimes n_2) = \varphi_1(m\otimes n_1) + \varphi_2(m' \otimes n_2)$

$= (m,0)\otimes n_1 + (0,m')\otimes n_2$

is a well-defined $R$-module homomorphism.

It now suffices to verify that $\phi$ and $\phi^*$ are inverses and we are done.

QED

Note that this result extends easily by induction to any finite direct sums. More generally, it can be shown that it is also true for arbitrary direct sums so that we have

$N \otimes \displaystyle\bigoplus_{i \in I} M_i \simeq \displaystyle\bigoplus_{i \in I} N \otimes M_i.$

Reference: D. S. Dummit, R. M. Foote, Abstract Algebra, 3rd ed.