Proof (Smith normal form)

Existence

Our goal is to convert a matrix $A$ via row and column operations to the form $$ \begin{align*} \pmat{d & 0 & \ldots & 0 \\ 0 \\ \vdots & & C\\ 0} \end{align*} $$ where $d\in R$ divides all entries in the matrix $C$, and then apply induction.

Algorithm:

  1. If $A=0$, we are done. Otherwise use row/column operations to swap a non-zero element to $A_{11}$.

  2. If some $A_{1j}$ is not divisible by $A_{11}$, write as $A_{1j} = A_{11}q + r$ with $ϕ(r) < ϕ(A_{11})$ (as we're in a Euclidean domain). Then use column operations to

    1. subtract $q$ times column $1$ from column $j$, making $A_{1j}$ equal to $r$, and then

    2. swap column $1$ and $j$, making $A_{11}$ equal to $r$.

  3. Go to step 2 until row 1 is all divisible by $A_{11}$. Use column operations to subtract multiples of column 1 from all other columns, making row 1 all zero except $A_{11}$. Now the matrix looks like $$ \begin{align*} \pmat{* & 0 & \ldots & 0 \\ * & * & \ldots & * \\ \vdots & \vdots & \ddots & \vdots \\ * & * & \ldots & *}. \end{align*} $$

  4. If some $A_{i1}$ is not divisible by $A_{11}$, write as $A_{i 1} = A_{11}q + r$ with $ϕ(r) < ϕ(A_{11})$. Use row operations to

    1. subtract $q$ times row $1$ from row $j$, making $A_{i 1}$ equal to $r$, and then

    2. swap row $1$ and $i$, making $A_{11}$ equal to $r$.

  5. Go to step 2 until column $1$ is all divisible by $A_{11}$ and row $1$ is all zero except $A_{11}$. Use row operations to subtract multiples of row 1 from all other columns, making column $1$ and row $1$ all zero except $A_{11}$. Now the matrix looks like $$ \begin{align*} \pmat{* & 0 & \ldots & 0 \\ 0 & * & \ldots & * \\ \vdots & \vdots & \ddots & \vdots \\ 0 & * & \ldots & *}. \end{align*} $$

  6. If $A_{ij}$ is not divisible by $A_{11}$ where $i,j>1$, write as $A_{ij} = A_{11} q + r$ with $ϕ(r) < ϕ(A_{11})$. Use column and row operations to

    1. add column $1$ to column $j$, making $A_{1j}$ equal to $A_{11}$,

    2. subtract $q$ times row $1$ from row $i$, making $A_{ij}$ equal to $r$, and

    3. swap row $1$ and row $i$, and also swap column $1$ and column $j$, making $A_{11}$ equal to $r$.

  7. Go to step 2 until row 1 and column 1 are all zero except $A_{11}$, and the lower-right $(m-1)\times (n-1)$ block is divisible by $A_{11}$.

Uniqueness

Suppose two Smith normal forms $M = \mathrm{diag}(d_1, \ldots, d_k), M' = \mathrm{diag}(d_1', \ldots, d_k')$ are equivalent (allowing $d_i=0$).

The Fitting ideals are $\mathrm{Fit}_r(M) = (\prod_{i=1}^{r} d_i)$ and $\mathrm{Fit}_r(M') = (\prod_{i=1}^{r} d_i')$ and they agree, so

and so on.

Interactive illustration