Suppose $R$ is a Euclidean domain (not necessarily a field) and let $M$ be a finitely generated $R$-module. Prove $M$ is a cyclic module if and only if it has a single invariant factor.
If $M$ has a only has invariant factor $d_1$, it seems right away that we can use the Structure theorem for finitely generated modules over a PID to get $M \cong R/(d_1)$. Thus $M$ is cyclic.
For the other direction, suppose $M$ is cyclic, i.e. $\exists m \in M$ so that $M = (m) = \{rm : r\in R\}$. We need to show there is only one invariant factor. I don't know how to go about this. Thoughts?
It is true that if $M = (m)$ is a cyclic module over a PID $R$ then it has a single invariant factor. To see this note that there is a canonical R-epimorphism $R\twoheadrightarrow M$ given by $r \mapsto rm.$ Then by definition, we have that kernel of this map is the annihilator, $\text{Ann}(m) = \{r \in R; rm = 0\}$ of $m$ (prove that this is an ideal of R). Moreover, since $R$ is a PID, we have that $\text{Ann}(m) =(d)$ for some $d \in R.$ We can conclude the proof by the first isomorphism theorem.
The converse, on the other hand, is only true if the rank of $M$ is $0.$ An counterexample for the nonzero rank case is $\mathbb{Z} \oplus \mathbb{Z}/2$ considered as a $\mathbb{Z}$-module.