Showing that order of $SL_2(Z_3)$ is 24 I am having some trouble proving that order of $SL_2(Z_3)$ is 24, First I know that the number of elements in $M_2(Z_3)$ is 81 because we have four entries and for each entry we have 3 different possibility and so $3^4 = 81$. Now I already showed that $SL_2(Z_3)$ is a subgroup of $GL_2(Z_3)$ And for $GL_2(Z_3)$ we obviously don't have the zero matrix (81 -1  = 80) and then any of the matrices in the form of $\begin{bmatrix}
       0 & 0        \\[0.3em]
       a & b          \\[0.3em]   
     \end{bmatrix}$
do not belong to $GL_2(Z_3)$ and so we have (80 - 3x3) but we exclude the zero matrix so we have (80 - 8 = 72) , also same for $\begin{bmatrix}
       0 & a        \\[0.3em]
       0 & b          \\[0.3em]   
     \end{bmatrix}$ 
and so 72 - 8 = 64 , same for $\begin{bmatrix}
       a & b        \\[0.3em]
       0 & 0          \\[0.3em]   
     \end{bmatrix}$ 
so we have 64 - 8 = 56 and same for $\begin{bmatrix}
       a & 0        \\[0.3em]
       b & 0          \\[0.3em]   
     \end{bmatrix}$ 
so we have 56 - 8 = 48
So we have 48 different matrices in $GL_2(Z_3)$
Now I from those 48 Matrices , I need to find those matrices that have determinant  = 1 in $Z_3$ (i.e $ad-bc = 1$ in $Z_3$ but I don't know how to do it.
Any suggestions ?
 A: Here is an easy way.
Let $M \in SL_2(\mathbb Z_3)$ be written as
$$
M = \begin{pmatrix}a & b  \\ c & d
\end{pmatrix}.
$$
First suppose $d=0$. Then $\det M=-bc=1$, so $b=-c$ (remember where the coefficients live). Hence $M$ has the form
$$
M = \begin{pmatrix}a & b  \\ -b & 0
\end{pmatrix}
$$
with $b \neq 0$. There are $6$ such matrices in total.
Now suppose $d \neq 0$. Then since $\det M=ad-bc=1$, we find $a=(1+bc)d$, hence $M$ have the form
$$
M = \begin{pmatrix}(1+bc)d & b  \\ c & d
\end{pmatrix}
$$
There are in total $3\cdot 3 \cdot 2 =18$ such matrices. In total there are $18+6=24$ elements in $SL_2(\mathbb Z_3)$. 
A: *

*The columns of a matrix in $GL_2(Z_3)$, viewed as elements of the $Z_3$-vector space $Z_3\oplus Z_3$, are a basis. Count these in order to find the order of the group $GL_2(Z_3)$.

*On the other hand, there is an homomorphism of groups $\det:GL_2(Z_3)\to Z_3^\times$, with codomain the multiplicative group of $Z_3$. As this map is surjective, the order of its kernel is equal to the order of $GL_2(Z_3)$ divided by the order of its image, which is $2$. As the kernel of $\det$ is precisely $SL_2(Z_3)$, this does what you want.

A: I would work out all the ways that the determinant can be 1. Now,
$$\begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc.$$ Moreover, there are $5$ ways for $ad$ to equal $0$, and $2$ ways for it to equal $1$, and $2$ ways for it to equal $2$. So, if $ad = 1$ there are $2\times 5 = 10$ ways to choose the variables values so that the determinant is $1$, if $ad = 2$ there are $2 \times 2 = 4$ ways and if $ad = 0$ there are $5\times 2 = 10$ ways, for a total of $10 + 4 + 10 = 24$.
