The invariant factors of a matrix over a principal ideal domain are the nonzero entries , ...,
on the diagonal of its Smith
normal form, ordered so that
divides
. They are unique up to multiplication by units.
For an integer matrix, they are conventionally
chosen to be positive.
For a square matrix over a field
, its polynomial invariant factors
are the nonconstant monic polynomials on the
diagonal of the Smith
normal form of
over
,
where
is the identity matrix. Their companion
matrices are the blocks in the rational
canonical form of
.