# Happy #GL_2(Z/7Z)

Ahhhhh it’s almost 2016 (only three more days)! I’m incredibly excited, mainly because I’ll be going to college this fall. In this blog post, I wanted to point out something which Noam Elkies informed me about, because I hadn’t recognized it and found it pretty awesome!

As the title suggests, we’ll take a look at the general linear group over a finite field. First, let $p$ be a prime, and let $x\in\mathbf{Z}/p\mathbf{Z}$. Then the equation $xy\equiv 1\bmod p$ always has a unique solution. More generally, if $x\in\mathbf{Z}/n\mathbf{Z}$, $xy\equiv 1\bmod n$ always has a unique solution if $\gcd(x,n)=1$. Thus $\#\mathrm{GL}_1(\mathbf{F}_p)=p-1$.

What about $\#\mathrm{GL}_2(\mathbf{F}_p)$? If $M=\begin{smallmatrix} a&b\\ c&d \end{smallmatrix}$, then a necessary and sufficient condition for $M$ to be invertible is that $ad\neq bc$. We could proceed via a case-by-case analysis, but that is more difficult. Alternatively, we could simply note a matrix’s determinant is zero if and only if the columns are linearly independent that the vector $\begin{smallmatrix} a\\ c \end{smallmatrix}$ must be nonzero (which gives us $p^2-1$ choices), and $\begin{smallmatrix} b\\ d \end{smallmatrix}$ can’t be a multiple of $\begin{smallmatrix} a\\ c \end{smallmatrix}$, which gives us $p^2-p$ choices. Thus $\#\mathrm{GL}_2(\mathbf{F}_p)$ is $(p^2-1)(p^2-p)$.

In general, $\#\mathrm{GL}_n(\mathbf{F}_p)$ is $\prod^{n-1}_{k=0}(p^n-p^k)$. We can use basic group theory to determine $\#\mathrm{SL}_n(\mathbf{F}_p)$ as well. Note that $\mathrm{SL}_n(\mathbf{F}_p)$ is the kernel of the determinant function $\mathrm{det}:\mathrm{GL}_n(\mathbf{F}_p)\to\mathbf{F}_p^\times$. In particular, using the isomorphism theorems, $\mathrm{GL}_n(\mathbf{F}_p)/\mathrm{SL}_n(\mathbf{F}_p)\simeq\mathbf{F}_p^\times$, so rearranging gives $\#\mathrm{SL}_n(\mathbf{F}_p)=\#\mathrm{GL}_n(\mathbf{F}_p)/\#\mathbf{F}^\times_p$.

This is all fun stuff, but what we’re really here for is the star of the day (or rather, year): $\#\mathrm{GL}_2(\mathbf{Z}/7\mathbf{Z})(=\#\mathrm{GL}_2(\mathbf{F}_7))$. Using the above formula, we get: $\#\mathrm{GL}_2(\mathbf{F}_7)=(7^2-1)(7^2-7)=48\times 42=2016$. Excluding the trivial cases (i.e. $\mathrm{GL}_1$), we’re not going to have this for another 1512 years! So enjoy 2016, and, as always, have fun!

Happy $\#\mathrm{GL}_2(\mathbf{F}_7)$,
SKD