# What are the densities of $GL_{n}\left(\mathbb{Z}\right)$ and $SL_{n}\left(\mathbb{Z}\right)$?

We define $GL_{n}\left(\mathbb{Z}\right)$ to be the set of matrices with entries in $\mathbb{Z}$ and non-zero determinant, and we define $SL_{n}\left(\mathbb{Z}\right)$ as the subset of $GL_{n}\left(\mathbb{Z}\right)$ containing those elements with determinant $1$.

Let $G_{n,k}$ and $S_{n,k}$ be the number of elements of $GL_{n}\left(\mathbb{Z}\right)$ and $SL_{n}\left(\mathbb{Z}\right)$, respectively, with entries $\leq k$. Then, we would like to know the values of the following limits (if they exist):

$$\lim_{k\to\infty}\frac{G_{n,k}}{k^{n^{2}}},$$

$$\lim_{k\to\infty}\frac{S_{n,k}}{k^{n^{2}}}.$$

As an analogue, in the real case, I know that almost all matrices are in $GL_{n}\left(\mathbb{R}\right)$ with respect to Lebesgue measure, while $SL_{n}\left(\mathbb{R}\right)$ has Lebesgue measure $0$. Therefore, my intuition is telling me that the first limit should be $1$, while the second should be $0$.

My attempt so far:

If we consider $GL_{n}\left(\mathbb{Z}/p\mathbb{Z}\right)$, then the number of elements in this group is $\prod_{k=0}^{n-1}\left(p^{n}-p^{k}\right)$, and so we get the limit

$$\lim_{p\to\infty}\frac{\prod_{k=0}^{n-1}\left(p^{n}-p^{k}\right)}{p^{n^{2}}}=\lim_{p\to\infty}\prod_{k=0}^{n-1}\left(1-p^{k-n}\right)=1.$$

My question, given this work: Is this enough for the first limit? Since $\mathbb{Z}/p\mathbb{Z}$ is characteristic $p$, there are elements in $GL_{n}\left(\mathbb{Z}\right)$ which aren't in $GL_{n}\left(\mathbb{Z}/p\mathbb{Z}\right)$, but is the difference in the number of elements small enough that it doesn't change the limit? As a follow up question, what can be said about the error term $\varepsilon_{n,p}$ for $G_{n,p}=|GL_{n}\left(\mathbb{Z}/p\mathbb{Z}\right)|+\varepsilon_{n,p}$?

As for $SL_{n}\left(\mathbb{Z}\right)$, is there a similar way to (attempt to) determine the limit?

Finally, is there anything in the literature for these problems?

EDIT: Mariano Suárez-Álvarez's comment solves this problem.

For the first limit, the complement of the general linear group is the solution set for $\det\left(A\right)=0$, and so it has density $0$. Therefore, the first limit is $1$.

For the second limit, the special linear group is the solution set for $\det\left(A\right)-1=0$, and so the second limit is $0$.

• The set of integer points in the zero set of a polynomial (like the determinant) has density zero. – Mariano Suárez-Álvarez Jul 7 '17 at 17:27
• I should have thought about that! Thank you. – Brian Jul 7 '17 at 17:34
• @MarianoSuárezÁlvarez : is it easy to prove ? – Max Jul 7 '17 at 20:28