logo

Proof of the Existence of Smith Normal Form 📂Topological Data Analysis

Proof of the Existence of Smith Normal Form

Algorithm

RR is a principal ideal domain, for every matrix ARm×nA \in R^{m \times n}, there exists a unique Smith normal form. In other words, for the matrix ARm×nA \in R^{m \times n}, there exists d1,,drRd_{1} , \cdots , d_{r} \in R and invertible matrices PRm×mP \in R^{m \times m}, QRn×nQ \in R^{n \times n} that satisfy PAQ=[d10000000000dr000000000000]Rm×n PAQ = \begin{bmatrix} d_{1} & 0 & 0 & 0 & \cdots & 0 \\ 0 & \ddots & 0 & 0 & \cdots & 0 \\ 0 & 0 & d_{r} & 0 & \cdots & 0 \\ 0 & 0 & 0 & 0 & \cdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & 0 & \cdots & 0 \end{bmatrix} \in R^{m \times n} where d1,,drd_{1} , \cdots , d_{r} should not be 00 in RR, and must be d1drd_{1} \mid \cdots \mid d_{r}. More specifically, dk0d_{k} \ne 0 must be a divisor of dk+1d_{k+1}. The uniqueness ignores the unit multiples of dkd_{k}.

Proof 1 2

Strategy: An algorithm that uses row and column exchanges and Gaussian elimination to directly find the Smith normal form and prove its existence.

Every principal ideal domain is a unique factorization domain.

Matrix AA, being a matrix over a PID, is also a matrix over a UFD. Therefore, all elements except for the units and 00, represented by AijA_{ij}, have a unique factorization, and the one with the least number of factors is called the Minimal Entry, denoted by α>0\alpha > 0.

It should be noted that in Munkres’ textbook, the smallest element is chosen as Zm×n\mathbb{Z}^{m \times n}, but in general principal ideal domains, which are not necessarily Euclidean domains, it can be tricky to consider something as ‘smallest’. In the general case of a PID, it makes sense to think about factorization to determine the minimal entry neatly. However, for simplicity, this post might use terms like ‘small’ or a<ba < b, which should be understood in terms of comparing the number of factors rather than the size of the elements.

Keep in mind that the given matrix will continually change due to Gaussian elimination, so α\alpha also continually changes in context.

It’s also worth noting that this algorithm specifically demonstrates that the Smith normal form can always be derived for the given AA, although it’s not necessarily efficient and P,QP, Q is unknown.


Step 1.

If AA is a zero matrix, it is already in Smith normal form, so proceed to Step 4. If AA is not a zero matrix, then do the following.

For ease of understanding, first swap rows and columns to bring α\alpha to the top-left corner as (1,1)(1,1). Now, we will only focus near the first row and column of the given matrix. A[αA12A21A22] A \sim \begin{bmatrix} \alpha & A_{12} & \cdots & \\ A_{21} & A_{22} & \cdots & \\ \vdots & \vdots & \ddots & \end{bmatrix}


Step 2. k=1,,rk= 1, \cdots , r

(Obviously, rr is unknown during the calculation. It naturally gets determined after the program ends.)

  • For all i,ji, j, if αAij\alpha \mid A_{ij} then substitute dkαd_{k} \gets \alpha. As αAij\alpha \mid A_{ij}, it’s possible to repeat Gaussian elimination until all elements in the first row and column of AA, except for α\alpha, become 00. After the repetition, delete the 11 row and 11 column and return to Step 1. Now, the size of the matrix AA becomes (mk)×(nk)(m - k) \times (n - k).
  • If for some i,ji, j, αAij\alpha \nmid A_{ij}, then move to Step 3.

Step 3.

From here on, the discussion can apply to either rows or columns, so without loss of generality, we’ll only discuss α0\alpha \ne 0 and A12A_{12}. Essentially, Step 2 guarantees that for at least one of i,ji, j, αAij\alpha \nmid A_{ij} is true, and the goal is to perform Case 1 below after making sure that AijA_{ij} comes under (1,2)(1,2).

Every principal ideal domain is a Bezout domain: PID is a Bezout domain, so the extended Euclidean theorem applies. This means, for all a,bDa, b \in D, there exists m,nDm,n \in D that satisfies ma+nb=gcd(a,b) m a + n b = \gcd \left( a, b \right)

  • Case 1. If αA12\alpha \nmid A_{12}
    α\alpha is the minimal entry and since αA12\alpha \nmid A_{12}, then gcd(α,A12)<α\gcd \left( \alpha, A_{12} \right) < \alpha. According to the extended Euclidean theorem, mα+nA12 m \alpha + n A_{12} there exists m,nDm,n \in D that makes α\alpha smaller. By Gaussian elimination, add the column of 11 multiplied by mm to the column of 22 multiplied by nn, and substitute it into the column of 22. This new column’s first element, A12=gcd(α,A12)A_{12}' = \gcd \left( \alpha , A_{12} \right), is not only smaller than the original α\alpha but also a divisor of α\alpha, making it a candidate for a newer and smaller minimal entry. Swap the 11 column and 22 column and return to Step 1. (There might be a chance to find an even smaller minimal entry during the calculation.)
  • Case 2. If αA12\alpha \mid A_{12}
    Some kZk \in \mathbb{Z} exists that satisfies kα+A12=0k \alpha + A_{12} = 0, so multiply 11 column by kk and subtract it from the column of 22. Then, this new column’s first element, A12A_{12} ' , becomes 00. Repeat Step 3.
  • Case 3. If A12=0A_{12} = 0
    Repeat the column exchange until A120A_{12} \ne 0. If for all j1j \ne 1, every A1jA_{1j} becomes 00, then conduct Step 3 for A21A_{21}.
    • If αA21\alpha \nmid A_{21}, then A21<αA_{21}' < \alpha. Update the minimal entry.
    • If αA21\alpha \mid A_{21}, make A21A_{21} ' become 00.
    • If A21=0A_{21} = 0, it means the matrix now looks like this: A[α00A22] A \sim \begin{bmatrix} \alpha & 0 & \cdots & \\ 0 & A_{22} & \cdots & \\ \vdots & \vdots & \ddots & \end{bmatrix} Since A21=0A_{21} = 0, adding the row of 22 to the row of 11 keeps α\alpha and results in the form A[αA220A22] A \sim \begin{bmatrix} \alpha & A_{22} & \cdots & \\ 0 & A_{22} & \cdots & \\ \vdots & \vdots & \ddots & \end{bmatrix} Swap the ii row and the 22 row and repeat Step 3. Even if all elements in the 11 row and column except for α\alpha are 00, there still must be at least one pair of i,j2i,j \ge 2 that satisfies αAij\alpha \nmid A_{ij}, so Case 3 is repeated until eventually, αA12\alpha \nmid A_{12} must be true.

Case 1 allows the value of A11A_{11} to be continually reduced, Case 2 allows for making all elements other than α\alpha in the first row and column become 00, and Case 3 ensures that there will eventually be a AijA_{ij} that satisfies αAij\alpha \nmid A_{ij} and is placed at (1,2)(1,2).


Step 4. d1drd_{1} \mid \cdots \mid d_{r}

The only way to proceed to Step 4 is if the remaining AA from Step 1 is a zero matrix.

Throughout Step 2, we’ve been noting dkd_{k} like dkαd_{k} \gets \alpha. That all AijA_{ij} could be divided by the minimal entry α\alpha indicates that any element created in the remaining matrix by the extended Euclidean theorem can be divided by this α\alpha. Therefore, d1drd_{1} \mid \cdots \mid d_{r}, and we obtain the following Smith normal form. [d10000000000dr000000000000]Rm×n \begin{bmatrix} d_{1} & 0 & 0 & 0 & \cdots & 0 \\ 0 & \ddots & 0 & 0 & \cdots & 0 \\ 0 & 0 & d_{r} & 0 & \cdots & 0 \\ 0 & 0 & 0 & 0 & \cdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & 0 & \cdots & 0 \end{bmatrix} \in R^{m \times n}


  1. Munkres. (1984). Elements of Algebraic Topology: p55~57. ↩︎

  2. https://en.wikipedia.org/wiki/Smith_normal_form#Algorithm ↩︎