I have already proved that $SL_2(\mathbb{Z}/p\mathbb{Z})$ is a group with the product of matrices. I also proved that $|SL_2(\mathbb{Z}/p\mathbb{Z})|=p^3-p$ using the first isomorphism theorem and the cardinal of $GL_2(\mathbb{Z}/p\mathbb{Z})$. Then, for any element of the group, its order must divide $p^3-P$. I know that diagonalizing matrices can help to solve the problem, but I don't know how to continue. I guess I'll have to use somewhere that $x^2 \cong tr(A) \pm 2mod(p)$ has two or no solution depending on wheter $tr(A) \pm 2 $ are quadratic residues modulo p or not.
Does anyone have any idea how to continue?
The caracterestic polynomial of a matrix $A\in SL(2,Z/pZ)$ has the form: $P_{A}(x)=x^{2}-tr(A)x+1$,the discriminent of this polynomial is $\Delta =tr(A)^{2}-4=(tr(A)-2)(tr(A)+2)$.I assume $p\geq 3$ and $\Delta \neq 0$ now if both $(tr(A)-2)$;$tr(A)+2$ are quadratic residues mod $p$,then there is some $\alpha , \beta \in Z/pZ$ such that :$(tr(A)-2)=\alpha ^{2}$ and $tr(A)+2=\beta ^{2}$,so the roots of $P_{A}$ are :$x_{1}=\frac{tr(A)-\alpha \beta }{2}$ and $x_{2}=\frac{tr(A)+\alpha \beta }{2}$, So $A$ is diagonalizable ,So it is similar to a matrix of the form $ A = \begin{pmatrix} t & 0 \\ 0& t^{-1} \end{pmatrix} $ ,where it is easy to see that the the order of such a matrix is $p-1$ if $t\neq 1$ if $\Delta =0$,then either $P_{A}(x)=(x-1)^{2}$ or $P_{A}(x)=(x+1)^{2}$,in the first case $A$ is the identity or similar to $ A = \begin{pmatrix} 1 & 1 \\ 0& 1 \end{pmatrix} $ in the second case, it easy also to see that it has order $p$,in the second case it is similar to $ A = \begin{pmatrix} p-1 & 1 \\ 0& p-1 \end{pmatrix} $ Now suppose that both $(tr(A)-2)$ and $(tr(A)+2)$ are not quadratic residues (in particular both of them are non zero),the $\Delta $, their product is necessarly a non-zero qudratic residue,hence $A$ is diagonalizable and we are brought back to the first case.