Smith normal form

In mathematics, the Smith normal form (sometimes abbreviated SNF) is a normal form that can be defined for any matrix (not necessarily square) with entries in a principal ideal domain (PID). The Smith normal form of a matrix is diagonal, and can be obtained from the original matrix by multiplying on the left and right by invertible square matrices. In particular, the integers are a PID, so one can always calculate the Smith normal form of an integer matrix. The Smith normal form is very useful for working with finitely generated modules over a PID, and in particular for deducing the structure of a quotient of a free module. It is named after the British mathematician Henry John Stephen Smith.
Definition.
Let "A" be a nonzero "m"×"n" matrix over a principal ideal domain "R". There exist invertible formula_1 and formula_2-matrices "S, T" such that the product "S A T" is
formula_3
and the diagonal elements formula_4 satisfy formula_5. This is the Smith normal form of the matrix "A". The elements formula_4 are unique up to multiplication by a unit and are called the "elementary divisors", "invariants", or "invariant factors". They can be computed (up to multiplication by a unit) as
where formula_8 (called "i"-th "determinant divisor") equals the greatest common divisor of all formula_9 minors of the matrix "A" and formula_10.
Algorithm.
The first goal is to find invertible square matrices formula_11 and formula_12 such that the product formula_13 is diagonal. This is the hardest part of the algorithm. Once diagonality is achieved, it becomes relatively easy to put the matrix into Smith normal form. Phrased more abstractly, the goal is to show that, thinking of formula_14 as a map from formula_15 (the free formula_16-module of rank formula_17) to formula_18 (the free formula_16-module of rank formula_20), there are isomorphisms formula_21 and formula_22 such that formula_23 has the simple form of a diagonal matrix. The matrices formula_11 and formula_12 can be found by starting out with identity matrices of the appropriate size, and modifying formula_11 each time a row operation is performed on formula_14 in the algorithm by the corresponding column operation (for example, if row formula_28 is added to row formula_29 of formula_14, then column formula_29 should be subtracted from column formula_28 of formula_11 to retain the product invariant), and similarly modifying formula_12 for each column operation performed. Since row operations are left-multiplications and column operations are right-multiplications, this preserves the invariant formula_35 where formula_36 denote current values and formula_14 denotes the original matrix; eventually the matrices in this invariant become diagonal. Only invertible row and column operations are performed, which ensures that formula_11 and formula_12 remain invertible matrices.
For formula_40, write formula_41 for the number of prime factors of formula_42 (these exist and are unique since any PID is also a unique factorization domain). In particular, formula_16 is also a Bézout domain, so it is a gcd domain and the gcd of any two elements satisfies a Bézout's identity.
To put a matrix into Smith normal form, one can repeatedly apply the following, where formula_44 loops from 1 to 'formula_20.
Step I: Choosing a pivot.
Choose formula_46 to be the smallest column index of formula_14 with a non-zero entry, starting the search at column index formula_48 if formula_49.
We wish to have formula_50; if this is the case this step is complete, otherwise there is by assumption some formula_51 with formula_52, and we can exchange rows formula_44 and formula_51, thereby obtaining formula_50.
Our chosen pivot is now at position formula_56.
Step II: Improving the pivot.
If there is an entry at position ("k","j""t") such that formula_57, then, letting formula_58, we know by the Bézout property that there exist σ, τ in "R" such that
By left-multiplication with an appropriate invertible matrix "L", it can be achieved that row "t" of the matrix product is the sum of σ times the original row "t" and τ times the original row "k", that row "k" of the product is another linear combination of those original rows, and that all other rows are unchanged. Explicitly, if σ and τ satisfy the above equation, then for formula_60 and formula_61 (which divisions are possible by the definition of β) one has
so that the matrix
is invertible, with inverse
Now "L" can be obtained by fitting formula_65 into rows and columns "t" and "k" of the identity matrix. By construction the matrix obtained after left-multiplying by "L" has entry β at position ("t","j""t") (and due to our choice of α and γ it also has an entry 0 at position ("k","j""t"), which is useful though not essential for the algorithm). This new entry β divides the entry formula_66 that was there before, and so in particular formula_67; therefore repeating these steps must eventually terminate. One ends up with a matrix having an entry at position ("t","j""t") that divides all entries in column "j""t".
Step III: Eliminating entries.
Finally, adding appropriate multiples of row "t", it can be achieved that all entries in column "j""t" except for that at position ("t","j""t") are zero. This can be achieved by left-multiplication with an appropriate matrix. However, to make the matrix fully diagonal we need to eliminate nonzero entries on the row of position ("t","j""t") as well. This can be achieved by repeating the steps in Step II for columns instead of rows, and using multiplication on the right by the transpose of the obtained matrix "L". In general this will result in the zero entries from the prior application of Step III becoming nonzero again.
However, notice that each application of Step II for either rows or columns must continue to reduce the value of formula_68, and so the process must eventually stop after some number of iterations, leading to a matrix where the entry at position ("t","j""t") is the only non-zero entry in both its row and column.
At this point, only the block of "A" to the lower right of ("t","j""t") needs to be diagonalized, and conceptually the algorithm can be applied recursively, treating this block as a separate matrix. In other words, we can increment "t" by one and go back to Step I.
Final step.
Applying the steps described above to the remaining non-zero columns of the resulting matrix (if any), we get an formula_69-matrix with column indices formula_70 where formula_71. The matrix entries formula_72 are non-zero, and every other entry is zero.
Now we can move the null columns of this matrix to the right, so that the nonzero entries are on positions formula_73 for formula_74. For short, set formula_4 for the element at position formula_73.
The condition of divisibility of diagonal entries might not be satisfied. For any index formula_77 for which formula_78, one can repair this shortcoming by operations on rows and columns formula_28 and formula_80 only: first add column formula_80 to column formula_28 to get an entry formula_83 in column "i" without disturbing the entry formula_4 at position formula_73, and then apply a row operation to make the entry at position formula_73 equal to formula_87 as in Step II; finally proceed as in Step III to make the matrix diagonal again. Since the new entry at position formula_88 is a linear combination of the original formula_89, it is divisible by β.
The value formula_90 does not change by the above operation (it is δ of the determinant of the upper formula_91 submatrix), whence that operation does diminish (by moving prime factors to the right) the value of
So after finitely many applications of this operation no further application is possible, which means that we have obtained formula_93 as desired.
Since all row and column manipulations involved in the process are invertible, this shows that there exist invertible formula_1 and formula_2-matrices "S, T" so that the product "S A T" satisfies the definition of a Smith normal form. In particular, this shows that the Smith normal form exists, which was assumed without proof in the definition.
Applications.
The Smith normal form is useful for computing the homology of a chain complex when the chain modules of the chain complex are finitely generated. For instance, in topology, it can be used to compute the homology of a simplicial complex or CW complex over the integers, because the boundary maps in such a complex are just integer matrices. It can also be used to determine the invariant factors that occur in the structure theorem for finitely generated modules over a principal ideal domain, which includes the fundamental theorem of finitely generated abelian groups.
The Smith normal form is also used in control theory to compute transmission and blocking zeros of a transfer function matrix.
Example.
As an example, we will find the Smith normal form of the following matrix over the integers.
The following matrices are the intermediate steps as the algorithm is applied to the above matrix.
So the Smith normal form is
and the invariant factors are 2, 2 and 156.
Similarity.
The Smith normal form can be used to determine whether or not matrices with entries over a common field are similar. Specifically two matrices "A" and "B" are similar if and only if the characteristic matrices formula_101 and formula_102 have the same Smith normal form.
For example, with
"A" and "B" are similar because the Smith normal form of their characteristic matrices match, but are not similar to "C" because the Smith normal form of the characteristic matrices do not match.