The invariant factors 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 R {\displaystyle R} is a PID and M {\displaystyle M} a finitely generated R {\displaystyle R} -module, then
for some integer r ≥ 0 {\displaystyle r\geq 0} and a (possibly empty) list of nonzero elements a 1 , … , a m ∈ R {\displaystyle a_{1},\ldots ,a_{m}\in R} for which a 1 ∣ a 2 ∣ ⋯ ∣ a m {\displaystyle a_{1}\mid a_{2}\mid \cdots \mid a_{m}} . The nonnegative integer r {\displaystyle r} is called the free rank or Betti number of the module M {\displaystyle M} , while a 1 , … , a m {\displaystyle a_{1},\ldots ,a_{m}} are the invariant factors of M {\displaystyle M} and are unique up to associatedness.
The invariant factors of a matrix over a PID occur in the Smith normal form and provide a means of computing the structure of a module from a set of generators and relations.