<s>[INST] Number of matrices $A$ in $M_2(\mathbf{Z}/3\mathbf{Z})$ satisfying $A^{50}=I.$ 
Find the number of $2$x$2$ matrices $A$ with entries in $\mathbf{Z}/3\mathbf{Z}$ satisfying $A^{50}=I$.

Propositions as far as I know:

*

*The number of $2$x$2$ matrices with entries in $\mathbf{Z}/3\mathbf{Z}$ is $81$.

*$A^{50}=I$ implies that the eigenvalues of $A$ are roots of $\lambda^{50}=1.$

*In $\mathbf{Z}/3\mathbf{Z}$, if $A$ is diagonalizable and $\det(A)\neq 0$, then $A^{50}=I.$

*$A^{50}=I$ implies $\det(A)\neq 0$
Using prop. $3$ I get the following $14$ matrices satisfying $A^{50}=I$ (at least $14$ matrices, maybe
more).


But I'm not sure whether the condition in prop. 3 is necessary? Note that $\textrm{char} (\mathbf{Z}/3\mathbf{Z})\neq 0$.
 [/INST] Consider: A matrix $A=\begin{pmatrix}a & b \\ c & d \end{pmatrix}$ is not a unit exactly if $ad - bc=0$. How many possibilities does this have?

*

*$a=0,b=0$ (9 possibilies)

*$d=0,c=0$ and $a\neq 0$ or $b\neq 0$ (8 possibilities)

*$a=0,c=0$ and $b\neq0, d\neq 0$ (4 possibilities)

*$d=0,b=0$ and $a\neq0,c\neq 0$ (4 possibilities)

*$ad=1,bc=1$ (4 possibilities)

*$ad=2,bc=2$ (4 possibilities)

for a total of $9+8+4+4+4+4=33$ possibilities.
Thus we have $3^4 - 33 = 48$ matrices that are units. The multiplicative order of such a matrix thus has to divide $48$, so it divides $50$ if and only if it divides the $\gcd(48,50)=2$.
Thus we only need to consider matrices with multiplicative order 1 or 2.
Order 1 is trivially only possible for $E$. So we only need to solve:
$$ A^2 = E$$
(this also includes $A=E$).
This is equivalent to
$$ a^2+bc = 1 = cb+d^2 $$
$$ ab+bd = 0 = ca+dc $$
Thus if $a=0$ then $bc=1$ (thus $b=c=\pm1$), $d=0$. So we get
$\begin{pmatrix} 0 & \pm 1 \\ \pm 1& 0 \end{pmatrix}$ ($\pm$ linked, 2 possibilites)
If $a=\pm1$ then $a^2=1$, so $bc=0$, thus $d=\pm1$. Then either $b=0$ or $c=0$. Assume $b=0$ ($c=0$ analogue). So $0=ca+dc$ if either $c=0$ or $a+d=0$. Thus either $c=0$ or $a=-d$. This gives us

*

*$\begin{pmatrix} \pm1 & 0 \\ 0& \pm1 \end{pmatrix}$ ($\pm$ not linked, 4 possibilites)

*$\begin{pmatrix} \pm 1 & 0 \\ c & \mp 1 \end{pmatrix}$ ($c=1,2$, $\pm$ linked, 4 possibilities)

*$\begin{pmatrix} \pm 1 & b \\ 0& \mp 1 \end{pmatrix}$ (similar 4 possibilities)

So we have a total of $2+4+4+4=14$ such matrices.
</s>