Number of matrices possible correpsonding to 1modn amd satisfying the given constraints.

24 Views Asked by At

Show that, for every integer $n \geq 2$, the number of $2 \times 2$ matrices with integer entries in $\{0,1,2, \ldots, n-1\}$ and having a determinant of the form $1(\bmod n)$, is $$ n^{3} \cdot \prod_{q \text { prime }, q \mid n}\left(1-\frac{1}{q^{2}}\right) $$. I considered cases of some numbers from lets say $n = 5$ , i observed the pattern that 1mod5 can happen when $ad-bc -1$ is a multiple of $5$ , $(a,d,b,c)$ being $(3,2,0,0)$ seems to satisfy it its looks like there are only some possible combinations which make the ad part greater than bc by just 1 but how to show it ?