Skip to main content
1 of 3
Will Sawin
  • 148.4k
  • 9
  • 324
  • 563

Mod $p$ it's $(-1)^{n+1} n!$.

Let's compute the number of points with determinant $1$ and all entries nonzero by inclusion-exclusion, modulo $p$. For each set of entries, we get a term for matrices in $SL _n$ with those entries $0$. This is an affine hypersurface of degree $n) some affine space. By waring's theorem the number of points is a multiple of $p$ unless the number of variables is at most $n$. But the number of variables is the number of nonzero entries. A matrix with $\leq n$ nonzero entries that is invertible is a permutation matrix times a diagonal matrix. We can easily count the contribution if these. It is $(-1)^{n^2-n} (p-1)^{n-1} n!$. Mod $p$ we get the stated claim.

Will Sawin
  • 148.4k
  • 9
  • 324
  • 563