# Smith Normal Form

This post proves the existence of Smith normal form. The proof is pretty much the same as the one of reduced row echelon form.

Smith normal form is a generalization of Gaussian elimination to matrices with coefficients coming from PID. This can be used, for example, in finding a -basis for the kernel/image of a matrix of integers, or proving the often-cited structure theorem for finitely generated module over PID. The procedure is essentially the same as Gaussian elimination as well.

Theorem 1 (Existence of Smith Normal form)Let be an matrix with entries in a PID . Then there exists matrix and matrix , both invertible, such that is of the formwith .

**Proof**

The proof is similar to the Gaussian elimination process.

WLOG, assume that the first column is nonzero. Let us consider three operations:

1. Switching two rows

2. Adding some multiple of one row to another

3. For two relatively prime elements , we can find such that . For two rows 1 and 2, we may

- replace row 1 by row 1 + row 2
- replace row 2 by row 1 + row2

Only the last operation is different from the usual row operations. This is because multiplying a row by a constant involves scaling the determinant up by that constant. If we are working over a PID, that constant may not be a unit and thus is not what we want. The new operation is a replacement of scaling up two rows and replace one row by their sum, whose determinant is a unit.

Analogously we also have the column operations.

1. Assume that . WLOG, assume that the first column is nonzero (switching columns if needed), and actually the upper left element is nonzero (switching rows if needed). Take this as the pivot.

If the matrix is over a field, we can just eliminate every other entry in the first column. However in our case, division is not allowed, so the best we can do is somehow make the upper left entry the g.c.d. of all the entries in the first column, then eliminate.

Consider . If it is zero, leave it there. Otherwise, let the g.c.d. of and be . Then we can find such that. Apply the third type of row operation, we can replace by , and by a multiple of . Subtract the second row by a that multiple times the first row, we can make zero.

Repeat this, and we can get every element in the first column, except , to be zero. This finishes **one round** of elimination.

2. Repeat this again for the first row using column operations. A bad thing may happen: entries in the first column may become nonzero again. We can go back to step 1, and use row operations to clean up the first column. Of course the same question for the first row will arise. Does this loop terminate? The answer is yes, because after one round of elimination, the new divides the previous . Consider the chain of ideals generated by . It is an ascending chain, which stabilizes since a PID is Noetherian. That means eventually, stops changing – that only happens when we no longer need to use the third type of operation, i.e. every element in the row is divisible by . Using the second type of operation does NOT affect a cleaned-up row/column.

This means that by multiplying approriate invertible matrices on the left and on the right, is now of the form

3. Repeat for the lower right submatrix. Iterations will eventually give invertible matrices and such that is diagonal. By switching columns if needed, we can assume that all the nonzero columns are aligned to the left, i.e. it now takes the form

The final question is how to make , as needed.

Let us focus on the upper left 2 by 2 block only. We show that after row/column operations we can make .

- Add the second column to the first.
- Using the third type of row operation, we make the upper left entry to be , the g.c.d. of . It is clear that the lower right entry is unchanged, and the other two entries are multiples of .
- Subtract the second column by the first with appropriate multiple such that the upper right entry is 0. Analogously make the lower left entry 0. The lower right entry may be changed, but it is definitely a multiple of the upper left one.

We may then repeat this process so that , and then and so forth. Repeat this and done.

**Remark**

- This proof is essentially the same as Gaussian elimination.
- The is needed to make the form canonical.

**Example 1
**

**Question**

If we change the PID condition to a dimension condition, can we get anything similar? Maybe should try to see what happens.

Clarification: Shouldn’t the second allowed row operation include the adjective integer?

2. Adding some integer multiple of one row to another

we are working over the fixed PID here. Any entry is in .

Why is operation 3 allowed(or valid), it is not an elementary operation. You try to explain it in a couple of lines by saying something about the determinant, can you say something more? What is the connection with the determinant?

It is allowed since it’s the same as multiplying by a diagonal block matrix, where the first 2 by 2 block is $$ and other diagonal entries are 1.

Determinant is mentioned because the usual third operation is mutliplying a row by a constant, which may not be invertible. Invertibility is definitely a wanted condition since the point of Smith Normal Form is to have a nice expression of the matrix after we do a change of coordinates. Therefore we look for a substitute of “multiplying a row by a constant” which is always invertible, and one alternative is the third operation I mentioned.