Smith normal form invariants: Let RR be a PID and let A∈Mm×n(R)A\in M_{m\times n}(R). Suppose AA has Smith normal form diag⁡(d1,…,dr,0,…,0)\operatorname{diag}(d_1,\dots,d_r,0,\dots,0) with d1∣d2∣⋯∣drd_1\mid d_2\mid\cdots\mid d_r. Then the elements did_i are uniquely determined by AA up to multiplication by a unit of RR, and they determine the isomorphism class of the cokernel module

coker⁡(A)≅Rm/im⁡(A)≅⨁i=1rR/(di)  ⊕  R m−r.\operatorname{coker}(A)\cong R^m/\operatorname{im}(A)\cong \bigoplus_{i=1}^r R/(d_i)\;\oplus\;R^{\,m-r}.

The uniqueness part comes from the , and the decomposition agrees with the invariant factors in the , computing over a .