# Primary decomposition and finitely generated abelian groups

In a question asked by Ben Webster, Harry Gindi commented that it is possible to prove the classification theorem from finitely generated abelian groups by appealing primary decomposition.

I have never been able to figure out exactly how primary decomposition helps one to prove the classification theorem.

What i do know:

If $G \cong \mathbb{Z}^{\oplus k} \oplus \mathbb{Z} / p_{1}^{n_1} \oplus \dots \oplus \mathbb{Z}/ p_{s}^{n_s}$ then the associated primes of $G$ are $(0), p_1 \mathbb{Z}, \dots, p_{n_s} \mathbb{Z}$. This is an exercise in Eisenbud. This tells you how to write down a reduced primary decomposition of $0$ inside $G$.

Question: How does one use primary decomposition to prove the structure theorem for finitely generated abelian groups?

However all of this is done, it takes some real work but is now classical. The interesting mathematical point is that the arguments generalize well to finitely generated modules over arbitrary principal ideal domains (the case of a euclidean domain being easier to work out constructively). The contrasting elementary example involves the rational canonical form of a linear operator on a finite dimensional vector space over an arbitrary field: here the algebra of polynomials plays the role of $\mathbb{Z}$ and the resulting module is finitely generated but torsion. The characteristic polynomial of the operator plays the role of the order of a finite abelian group, while the minimal polynomial and other invariant factors determine the refined decomposition. (The minimal polynomial plays the role of exponent of the finite group.) Less elementary examples occur in number theory and representation theory, etc.