Hermite normal form gives a canonical basis for an integer lattice in fixed coordinates. Smith normal form allows changes of coordinates in the ambient space and reveals the lattice’s quotient structure.

Column Hermite form preserves the lattice

For a nonsingular square integer basis with column vectors, use the upper triangular convention. The diagonal is positive and each entry to its right is reduced into the interval from zero through one less than the diagonal entry in its row. Right multiplication by a unimodular matrix changes the basis in place.

B=(2503),H=B(1−201)=(2103).B=\begin{pmatrix}2&5\\0&3\end{pmatrix},\qquad H=B\begin{pmatrix}1&-2\\0&1\end{pmatrix}=\begin{pmatrix}2&1\\0&3\end{pmatrix}.

Subtracting two copies of the first column reduces 5 to 1. The two bases generate the same embedded lattice. The shared rectangular lattice instead has a zero off-diagonal in its column Hermite form. Equal determinants alone cannot distinguish these lattices.

Smith form reveals the quotient

Use unimodular row and column operations to obtain UBV=DUBV=D, a diagonal matrix with positive entries and each diagonal entry dividing the next. For the Hermite matrix above, swap columns, subtract three copies of the first row from the second, subtract two copies of the first column from the second, and negate the second column.

(2103)→(1230)→(120−6)→(100−6)→(1006).\begin{pmatrix}2&1\\0&3\end{pmatrix}\to\begin{pmatrix}1&2\\3&0\end{pmatrix}\to\begin{pmatrix}1&2\\0&-6\end{pmatrix}\to\begin{pmatrix}1&0\\0&-6\end{pmatrix}\to\begin{pmatrix}1&0\\0&6\end{pmatrix}.

The quotient is isomorphic to Z/6Z\mathbb{Z}/6\mathbb{Z}. The first diagonal entry 1 contributes a trivial factor. Row operations can move the embedded lattice, so use Smith form to compare quotients and Hermite form to compare the lattices in fixed coordinates.

Count cosets directly

Reduce the second coordinate modulo 3 using the second Hermite column. After that, reduce the first coordinate modulo 2 using the first column. The six pairs with first coordinate 0 or 1 and second coordinate 0, 1, or 2 are distinct coset representatives.

Chris Godsil, Linear Algebra, §§12.4–12.5.