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 sum of the form
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 .