# Elementary divisors

In algebra, the elementary divisors of a module over a principal ideal domain (PID) occur in one form of the structure theorem for finitely generated modules over a principal ideal domain.

If ${\displaystyle R}$ is a PID and ${\displaystyle M}$ a finitely generated ${\displaystyle R}$-module, then M is isomorphic to a finite sum of the form

${\displaystyle M\cong R^{r}\oplus \bigoplus _{i=1}^{l}R/(q_{i})\qquad {\text{with }}r,l\geq 0}$
where the ${\displaystyle (q_{i})}$ are nonzero primary ideals.

The list of primary ideals is unique up to order (but a given ideal may be present more than once, so the list represents a multiset of primary ideals); the elements ${\displaystyle q_{i}}$ are unique only up to associatedness, and are called the elementary divisors. Note that in a PID, the nonzero primary ideals are powers of prime ideals, so the elementary divisors can be written as powers ${\displaystyle q_{i}=p_{i}^{r_{i}}}$ of irreducible elements. The nonnegative integer ${\displaystyle r}$ is called the free rank or Betti number of the module ${\displaystyle M}$.

The module is determined up to isomorphism by specifying its free rank r, and for class of associated irreducible elements p and each positive integer k the number of times that pk occurs among the elementary divisors. The elementary divisors can be obtained from the list of invariant factors of the module by decomposing each of them as far as possible into pairwise relatively prime (non-unit) factors, which will be powers of irreducible elements. This decomposition corresponds to maximally decomposing each submodule corresponding to an invariant factor by using the Chinese remainder theorem for R. Conversely, knowing the multiset M of elementary divisors, the invariant factors can be found, starting from the final one (which is a multiple of all others), as follows. For each irreducible element p such that some power pk occurs in M, take the highest such power, removing it from M, and multiply these powers together for all (classes of associated) p to give the final invariant factor; as long as M is non-empty, repeat to find the invariant factors before it.