Canonical: https://knowlpedia.com/algebra-modules/elementary-divisor-theorem/

# Elementary divisor theorem

Over a PID, a finitely generated module decomposes into primary cyclic summands.

Let \(R\) be a [principal ideal domain](https://knowlpedia.com/algebra-rings/pid/) and \(M\) a finitely generated \(R\)-module. Then there are an integer \(r\ge0\), [prime elements](https://knowlpedia.com/algebra-rings/prime-element/) \(p_1,\ldots,p_t\in R\), and positive integers \(e_1,\ldots,e_t\) such that
\[
M \;\cong\; R^{\,r}\;\oplus\;\bigoplus_i R/(p_i^{e_i}),
\]
The integer \(r\) and the multiset of ideals \((p_i^{e_i})\) are uniquely determined by \(M\), up to reordering.

## Relation to invariant factors

This is equivalent to the invariant-factor form of the [structure theorem over a PID](https://knowlpedia.com/algebra-modules/structure-theorem-pid/): factor the invariant factors into prime powers and regroup their primary summands. For \(R=\mathbb Z\), it gives the primary decomposition in the [classification of finitely generated abelian groups](https://knowlpedia.com/algebra-modules/classification-fg-abelian-groups/).
