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 is a PID and a finitely generated -module, then M is isomorphic to a finite direct sum of the form
where the 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 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 of irreducible elements. The nonnegative integer is called the free rank or Betti number of the module .
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.