## Over a commutative ring, the tensor product of a module by a free module of finite rank is a direct power

Let $R$ be a commutative ring and let $N$ be a free $R$-module of finite rank $n$; say $B = \{e_i\}_{i=1}^n$ is a basis for $N$.

1. Let $M$ be any nonzero $R$-module. (Since $R$ is commutative, $M$ is naturally an $(R,R)$-bimodule.) Show that $M \otimes_R N \cong_R M^n$. In particular, every element of $M \otimes_R N$ can be written uniquely in the form $\sum_{i=1}^n m_i \otimes e_i$.
2. Show that if $\sum m_i \otimes n_i = 0$, where the $n_i$ are merely assumed to be $R$-linearly independent in $N$, it need not be the case that the $m_i$ are all zero. (That is, it is crucial that the $n_i$ generate $N$ as an $R$-module.)

Define a mapping $\varphi_B : M \times N \rightarrow M^n$ by $\varphi_B(m, \sum r_ie_i) = (r_i \cdot m)$. (This is well defined since $B$ is a basis for $N$.) Moreover, $\varphi_B(m_1 + m_2, \sum r_ie_i) = (r_i(m_1 + m_2))$ $= (r_i m_1) + (r_i m_2)$ $= \varphi_b(m_1, \sum r_ie_i) + \varphi_b(m_2, \sum r_ie_i)$, $\varphi(m, (\sum r_i e_i) + (\sum s_i e_i)) = \varphi_B(m, \sum (r_i+s_i)e_i)$ $= ((r_i+s_i)m)$ $= (r_im) + (s_im)$ $= \varphi_B(m, \sum r_ie_i) + \varphi_B(m, \sum s_i e_i)$, and $\varphi_B(m \cdot a, \sum r_i e_i) = (r_i (ma))$ $= (ar_i m)$ $= \varphi_B(m, \sum ar_ie_i)$ $= \varphi_B(m, a \sum r_ie_i)$, so that $\varphi_B$ is bilinear. By the universal property of tensor products, $\varphi_B$ induces a unique group homomorphism (indeed, $R$-module homomorphism) $\Phi_B : M \otimes_R N \rightarrow M^n$ such that $\Phi_B(m \otimes \sum r_i e_i) = (r_im)$.

Now define $\Psi_B : M^n \rightarrow M \otimes_R N$ by $(m_i) \mapsto \sum m_i \otimes e_i$. Clearly $\Psi_B$ is an $R$-module homomorphism.

Moreover, note that $(\Psi_B \circ \Phi_B)(m \otimes \sum r_i e_i) = \Psi_B(r_im))$ $= \sum r_im \otimes e_i$ $= \sum m \otimes r_ie_i$ $= m \otimes \sum r_ie_i$. Similarly, $(\Phi_B \circ \Psi_b)(m_i) = \Phi_B(\sum m_i \otimes e_i)$ $= \sum \Phi_B(m_i \otimes e_i) = (m_i)$. Thus $\Phi_B$ and $\Psi_B$ are mutual inverses, and we have $M \otimes_R N \cong_R M^n$.

In particular, $\sum m_i \otimes e_i = 0$ if and only if $m_i = 0$ for all $i$.

Now for the counterexample, let $R = \mathbb{Z}$, let $N = \mathbb{Z}^1$ be the free $\mathbb{Z}$-module of rank 1, and let $M = \mathbb{Z}/(2)$ be a $\mathbb{Z}$-module in the usual way. Consider the simple tensor $\overline{1} \otimes 2$ in $M \otimes_R N$; note that $1 \neq 0$, but that $\overline{1} \otimes 2 = \overline{1} \otimes 2 \cdot 1$ $= \overline{1} \cdot 2 \otimes 1$ $= \overline{2} \otimes 1$ $= 0 \otimes 1 = 0$.