Using determinants to find the number of elements in a group I am working on a problem found here (see 1.3):
http://dept.math.lsa.umich.edu/graduate/qualifiers/exams/2012/AlgebraQRMay2012solutions.pdf
It reads: 
Find the number of elements of the group $(\mathbb{Z}\times\mathbb{Z})/M$ where $M$ is the subgroup generated by the elements $(2,4)$ and $(4,2).$
The solution uses determinants, namely they state that the absolute value of the determinant of 
\begin{pmatrix} 
2 & 4 \\
4 & 2 
\end{pmatrix}
is $12$ and then state that that is the number of elements of the group. 
I am reviewing some algebra and am confused, where does this result come from? Is there a more general tool at play here that they do not mention?
 A: See Theorem 4.15 in https://kconrad.math.uconn.edu/blurbs/linmultialg/modulesoverPID.pdf.
When $M$ is a $k \times k$ integral matrix with nonzero determinant, $\mathbf Z^k/M(\mathbf Z^k)$ has order $|\det(M)|$.  Or, without using bases, if $L$ is a finite-free $\mathbf Z$-module (think "lattice'') and $\varphi \colon L \rightarrow L$ is an injective $\mathbf Z$-linear map then then the group $L/\varphi(L)$ (this is called the cokernel of $\varphi$) has order $|\det \varphi|$. (That determinant is $0$ if and only if $\ker \varphi$ is nonzero, meaning $\varphi$ is not injective.) The proof only needs the classification of finite-free $\mathbf Z$-modules (how a basis of a submodule and the original module can be compared), no need for anything like Hermite normal form.
Consider a special case: what's the index of $a_1\mathbf Z \times \cdots \times a_k\mathbf Z$ inside $\mathbf Z^k$, where the $a_i$ are nonzero integers? The quotient group $\mathbf Z^k/(a_1\mathbf Z \times \cdots \times a_k\mathbf Z)$ is isomorphic to $(\mathbf Z/a_1\mathbf Z) \times \cdots \times (\mathbf Z/a_k\mathbf Z)$, which clearly has order $|a_1|\cdots |a_k| = |a_1 \cdots a_k|$, and that's the determinant of the matrix ${\rm diag}(a_1, \ldots, a_k)$ that maps $\mathbf Z^k$ to $\mathbf Z^k$ with image  $a_1\mathbf Z \times \cdots \times a_k\mathbf Z$.
Section 4 of the file at that link is really about the $A$-cardinality of a finitely generated torsion module over a PID $A$, where $\mathbf Z$-cardinality is the usual notion of size for a finite abelian group. See Definitions 4.1, 4.10, and Theoerem 4.17 for a generalization of that determinant-as-size formula for finite abelian groups to a determinant-as-$A$-cardinality formula for finitely generated torsion $A$-modules, where $A$ is a PID. Almost surely the prelim exams will not ask about a case other than $A = \mathbf Z$, although the case $A = K[X]$ for a field $K$ has a concrete interpretation for $A$-cardinality: see exercise 6 at the end.
A: Note that $(2,4)$ and $(4,2)$ are taken to zero in the quotient.  We'd really like to know everything taken to zero, which happens to be all the $\mathbb{Z}$-linear combinations of $(2,4)$ and $(4,2)$, which is some (non-technical usage) lattice of points in $\mathbb{Z} \times \mathbb{Z}$.  So we need to know how many points are in each unit cell of that lattice.  We get this by seeing how much this basis, $(2,4)$ and $(4,2)$, expands the unit cell $[0,1]\times[0,1]$.  We find this expansion with the determinant.  The determinant is $12$, so the unit cell is expanded by a factor of $12$, so our lattice is infinitely many copies of unit cells containing $12$ elements.  When we take the quotient, those are all collapsed to a single copy of the unit cell, containing $12$ elements.
