# Finding the tensor product of two finitely generated $R$-modules, where $R$ is a PID

I was asked to write down what the tensor product of two finitely generated $R$-modules $M,N$ is over a commutative ring $R$, which is a PID. I know that if $f \in R$, then $M \otimes_R R /\langle f \rangle \cong M / fM$, by considering exact sequences.

So by the structure theorem for finitely generated modules over a PID, it follows that $M = \bigoplus_{i=1}^n R / \langle d_i \rangle$ and $N = \bigoplus_{j=1}^m R/\langle e_j \rangle$ for some $n,m \in \mathbb{N}$ and elements $d_i, e_j \in R$. So $$M \otimes_R N \cong \displaystyle\bigoplus_{(i,j) = (1,1)}^{(m,n)} R/ \langle d_i \rangle \otimes_R R / \langle e_j \rangle \cong \displaystyle\bigoplus_{(i,j) = (1,1)}^{(m,n)} \frac{R /\langle d_i \rangle}{e_jR/ \langle d_i\rangle}.$$

However this looks very unpleasant, and I was wondering that, if my argument is actually correct, is this module isomorphic to something more familiar?

-

You can do better in the following sense: $e_jR/(d_i)$ is an ideal of the quotient ring $R/(d_i)$, so it corresponds to some ideal $I$ of $R$ containing $(d_i)$. In a principal ring there is a nice name for a generator $f_{ij}$ of this $I$, and you'll be able to write $(R/(d_i))/(e_jR/(d_i)) \approx R/(f_{ij})$.
This slightly generalizes standard examples like $(\mathbf Z/3\mathbf Z) \otimes_\mathbf Z (\mathbf Z/2\mathbf Z) = 0$.