Theorem (Smith normal form)

Let $R$ be a Euclidean domain.

Any $m\times n$ matrix over $R$ is equivalent to one of the form $$ \begin{align*} \pmat{d_1 \\ & \ddots \\ && d_r \\ &&&0} \end{align*} $$ where $d_i\neq 0$ and $d_i \mid d_{i+1}$.

The $d_i$ are called the invariant factors of $A$, and they are unique up to associates.

Proof