$\mathrm{card}(\mathbb{Z}^n/M\mathbb{Z}^n) = |\det(M)|$? [duplicate]

I am aware of some theorem that says that if $M$ is non singular, $\det(M) \neq 0$, then: $$\mathrm{card}(\mathbb{Z}^n/M \mathbb{Z}^n)= |\det(M)|.$$ How does one prove this? Figured if I put in the context of the rational canonical form, this would help, but cant piece it together. Thanks.

This result is mentioned in the first answer of this question: Cardinality of a Quotient Ring.


Solution 1:

Let $A = \mathbb{Z}^n$, so that $\operatorname{End}(A) = M_n\left(\mathbb{Z}\right)$ and $\operatorname{End}(A \otimes \mathbb{Q}) = M_n\left(\mathbb{Q}\right)$. Define $f:\operatorname{End}(A) \to \mathbb{Z}$ by \begin{align*} f(g) &= \begin{cases} |A/gA| & \text{if $\det g \not= 0$}; \\ 0 & \text{if $\det g = 0$}. \end{cases} \end{align*} Extend it to a map $f:\operatorname{End}(A\otimes \mathbb{Q}) \to \mathbb{Q}$ by setting $f(g) = |\alpha|^{-n} f(\alpha g)$ for any nonzero $\alpha\in \mathbb{Z}$ with $\alpha g\in \operatorname{End}A$ (and check that it's well-defined). For nonsingular $g, h\in \operatorname{End}(A)$, the map $A/hA \to A/ghA$ of abelian groups defined by $x \to gx$ is injective. Thus its image $gA/ghA$ is isomorphic to $A/hA$. But $$(A/ghA) / (gA/ghA) = A/gA$$ by the third isomorphism theorem, and taking cardinalities shows that $f(gh) = f(g)f(h)$. It follows that $f(gh) = f(g)f(h)$ for arbitrary nonsingular $g, h\in \operatorname{End}(A\otimes \mathbb{Q})$. Now use the fact that the nonsingular matrices $T_{ij, \lambda} = 1 + \lambda\delta_{ij}$ for $\lambda\in \mathbb{Q}$ generate $GL_n(\mathbb{Q})$ to compute $f$.

Solution 2:

The standard method for computing the abelian invariants of $\mathbb{Z}^n/M\mathbb{Z}^n$ is to put the matrix $M$ into Smith Normal Form.

This is done by applying a sequence of unimodular transformations to $M$, and these can be effected by pre- or post-multiplying $M$ by a unimodular matrix over $\mathbb{Z}$. These unimodular matrices all have deteminant $\pm 1$, so they do not change $|\det M|$.

At the end of the process, the transformed matrix $M$ is diagonal with entries $d_1,d_2,\ldots,d_n$ (where each $d_i|d_{i+1}$). The determinant of the matrix is now $d_1d_2 \cdots d_n$, and the algorithm proves that $\mathbb{Z}^n/M\mathbb{Z}^n \cong \oplus_{i=1}^n \mathbb{Z}/d_i\mathbb{Z}$, of which the order is also $d_1d_2 \cdots d_n$. QED.