for some integer $n\ge 0$ and nonzero elements ${a}_{i}\in R$ that are not units and satisfy ${a}_{1}\mid {a}_{2}\mid \cdots \mid {a}_{m}$;
2. $M$ is torsion free if and only if $M$ is free; and
3. In the direct sum decomposition in (1),

In particular, $M$ is a torsion module if and only if $k=0$ (and in this case the annihilator of $M$ is the ideal $({a}_{m})$).

Let $A=\{{m}_{1},\dots ,{m}_{k}\}$ be a set of generators for $M$ of minimal cardinality and let $\pi :F(A)\to M$ be the corresponding surjective $R$-module morphism, where $A=\{{x}_{1},\dots ,{x}_{k}\}$. By the First Isomorphism Theorem for modules we then have $F(A)/\mathrm{ker}(\pi )\simeq M$. Using our structure theorem for free modules over a PID with the module $F(A)$ and submodule $\mathrm{ker}(\pi )$, there is a new basis $\{{y}_{1},\dots ,{y}_{k}\}$ for $F(A)$ (hence $F(A)=({y}_{1})\oplus \cdots ({y}_{k})$) and nonzero elements ${a}_{1},\dots ,{a}_{l}\in R$ with ${a}_{1}\mid {a}_{2}\mid \cdots \mid {a}_{l}$ such that $\{{a}_{1}{y}_{1},\dots ,{a}_{l}{y}_{l}\}$ is a basis for $\mathrm{ker}(\pi )$ (hence $\mathrm{ker}(\pi )=({a}_{1}{y}_{1})\oplus \cdots ({a}_{l}{y}_{l})$).

For each index $1\le i\le l$ we can let ${p}_{i}:R\to R/({a}_{i})$ be the $R$-module projection, while for indices $l<i\le k$ we can let ${p}_{i}:R\to R$ be the identity map. Noting that $F(A)=({y}_{1})\oplus \cdots \oplus ({y}_{k})$ and each submodule $({y}_{i})=R{y}_{i}\cong R$, these morphisms together define a surjective $R$-module morphism

Noting that these are all formal sums, it's immediate that the kernel of this map is exactly $({a}_{1}{y}_{1})\oplus \cdots \oplus ({a}_{l}{y}_{l})=\mathrm{ker}(\pi )$. We can thus conclude

For any of the ${a}_{i}$ that are units we have $R/({a}_{i})=(0)$, so simply remove those terms from the direct sum. (Such ${a}_{i}$ would have to occur first in the list, since ${a}_{i}$ is a unit exactly when $({a}_{i})=R$, and the divisibility condition on the ${a}_{i}$ is equivalent to the containment condition $({a}_{1})\supseteq ({a}_{2})\supseteq \cdots \supseteq ({a}_{l})$.) Then upon letting $n=k-l$ and noting $\underset{n\text{times}}{\underset{\u23df}{R\oplus \cdots \oplus R}}\simeq {R}^{n}$, we have proven (1).

Since $R/(a)$ is a torsion $R$-module for any nonzero $a\in R$, property (1) immediately implies $M$ is torsion free exactly when $M\simeq {R}^{n}$. This proves (2).

Finally, the annihilator of $R/(a)$ is the ideal (a), so property (3) immediately follows.

with ${b}_{1}\mid {b}_{2}\mid \cdots \mid {b}_{{m}^{\prime}}$, then ${n}^{\prime}=n$, ${m}^{\prime}=m$ and $({b}_{i})=({a}_{i})$ for each $i$ (hence ${a}_{i}$ and ${b}_{i}$ are the same up to unit). It is the divisibility condition that gives the uniqueness.

Definition of free rank and invariant factors

Let $R$ Be a PID and $M$ be a finitely generated $R$-module. Suppose $M$ has a decomposition

with ${a}_{1}\mid {a}_{2}\mid \cdots \mid {a}_{m}$. The integer $n$ is called the free rank of $M$, and the elements ${a}_{1},\dots ,{a}_{m}\in R$ are called the invariant factors of $M$.

Note that the invariant factors are only defined up to multiplication by units.

The Fundamental Theorem: Elementary Divisor Form

We can use the Chinese Remainder Theorem to decompose the cyclic modules in the invariant factor decomposition so that the new cyclic modules have annihilators that are as simple as possible.

To do this, first note that since $R$ is a PID it's also a UFD. So for each nonzero element $a\in R$ we can write

for some unit $u$ and distinct primes ${p}_{i}$, unique up to multiplication by units. Since the primes are distinct, for each pair $i\ne j$ the ideals $({p}_{i})$ and $({p}_{j})$ are comaximal; i.e., $({p}_{i})+({p}_{j})=R$. The intersection of the ideals $({p}_{1})\cap \cdots ({p}_{s})$ is exactly $(a)$, so by the Chinese Remainder Theorem we have

where $n$ is a nonnegative integer and ${p}_{1}^{{\alpha}_{1}},\dots ,{p}_{t}^{{\alpha}_{t}}$ are positive powers of (not necessarily distinct) primes in $R$.

Note that the primes are no longer distinct, since different cyclic factors $R/({a}_{i})$ and $R/({a}_{j})$ may decompose into pieces with shared primes. However, as with the Invariant Factor Decomposition, this decomposition of $M$ is unique up to reordering and multiplication by units.

Definition of elementary divisors

Let $R$ Be a PID and $M$ be a finitely generated $R$-module. Suppose $M$ has a decomposition

as in the theorem above. The prime powers ${p}_{1}^{{\alpha}_{1}},\dots ,{p}_{t}^{{\alpha}_{t}}$ are called the elementary divisors of $M$.

Note that the elementary divisors are only defined up to multiplication by units.

The Primary Decomposition Theorem

In the elementary divisor form decomposition of an $R$-module $M$, we can group together all of the cyclic summands with the same prime $p$. What we obtain is the submodule $N$ of $M$ consisting of all elements of $M$ that are annihilated by some power of the prime $p$. This idea leads to the following:

The Primary Decomposition Theorem

Let $R$ be a PID and $M$ be a nonzero torsion $R$-module with nonzero annihilator $a$. Suppose the prime factorization of $a$ in $R$ is

and let ${N}_{i}=\{m\in M\mid {p}_{i}^{{\alpha}_{i}}m=0\}$. Then ${N}_{i}$ is a submodule of $M$ with annihilator ${p}_{i}^{{\alpha}_{i}}$ and is the submodule of $M$ of all elements annihilated by some power of ${p}_{i}$. We have

$$M\simeq {N}_{1}\oplus \cdots \oplus {N}_{s}.$$

If $M$ is finitely generated then each ${N}_{i}$ is the direct sum of finitely many cyclic modules whose annhilators are divisors of ${p}_{i}^{{\alpha}_{i}}$.

In the above decomposition, the submodule ${N}_{i}$ is called the ${p}_{i}$-primary component of $M$.