The order of a $ 2 \times 2 $ matrix mod $ p $ This is a question I found in an old textbook in group theory:

We are asked to prove the order of any matrix $ A $ in the group of $ 2 \times 2 $ invertible matrices over $ F_p $ where $ p $ is a prime, $ A \in \text{GL}(2,F_p) $, divides either $ p^2-1 $ or $ p^2-p $.

I know that the order of this group is $ (p^2-p) (p^2-1) $ thus the order of the matrix must divide it by Lagrange, but the question asks for something stronger. This is obviously true for diagonal matrices and matrices that have one zero. What about a general invertible $ 2 \times 2 $ matrix? How to show its order must divide one of the two factors given? I thought about using the Sylow theorems but nothing comes to mind. Perhaps group actions? The solution eludes me and I would appreciate help on this.
 A: Consider the Jordan normal form of $A$ over the algebraic closure of $\mathbb F_p$. There are two cases: either $A$ is diagonalizable, or there is a single Jordan block.
First consider the diagonalizable case. Then both eigenvalues are elements of $\mathbb F_{p^2}$ and hence $A^{p^2-1}$ is the identity.
Next consider the "single block" case. Then $A$ is similar to a matrix of the form in the other answer, and similar reasoning applies.
A: Let be $A \in GL(2, F_p)$.
We'll treat three cases:


*

*$A$ is diagonalizable over $F_p$.

*$A$ is not diagonalizable over $F_p$, but there is an eigenvalue $a \in F_p$ (it must be repeated and the dimension of eigenspace must $1$).

*$A$ is not diagonalizable over $F_p$ and there are no eigenvalues over $F_p$.


If $A$ is diagonalizable over $F_p$, you can say:
\begin{equation*}
A \sim \begin{bmatrix}a & 0 \\ 0 & b \end{bmatrix}
\end{equation*}
For some $a, b \in F_p$.
Thus:
\begin{equation*}
A^{p - 1} \sim \begin{bmatrix} a^{p - 1} & 0 \\ 0 & b^{p - 1} \end{bmatrix} = I_2
\end{equation*}
$A$ has order $p - 1$.
Otherwise, let's say $A$ is not diagonalizable over $F_p$ but have eigenvalues repeated in $F_p$, $\mathrm{Spec}(A) = \{ a \}$, so you have:
\begin{equation*}
A \sim \begin{bmatrix} a & 1 \\ 0 & a \end{bmatrix}
\end{equation*}
Let be $n \in \mathbb{N}$, then:
\begin{equation*}
A^n \sim \begin{bmatrix} a^n & na^{n - 1} \\ 0 & a^n \end{bmatrix}
\end{equation*}
It suffices that, if you denote $\mathrm{ord}(a)$ the multiplicative order of $a$ in $F_p$, that $n \mid \mathrm{ord}(a)$ and $n \mid p$, thus: $n \mid p(p - 1) = p^2 - p$.
When you don't have any eigenvalues over $F_p$, that is, when your polynomial has no roots over $F_p$, then you can always have ones over $F_{p^2}$, thus, your order is $p^2 - 1$ because you're again in the case where $A$ is diagonalizable (over $F_{p^2}$ this time.)
In all cases, you either divide $p^2 - 1$ or $p^2 - p$.
