An m×n matrix, with integer entries is equivalent to a matrix of the form
where r is the rank of the matrix, the di are positive integers, and dk divides dk+1 for 1≤k < r. The di are called invariant factors. This result applies equally when the entries are taken from any principal ideal domain. The Smith normal form is key to the Structure Theorem for modules.