Paragraph: Let $p$ be an odd prime number and $T_p$ be the following set of $2 \times 2$ matrices $$…
Paragraph:
Let $p$ be an odd prime number and $T_p$ be the following set of $2 \times 2$ matrices
$$
T_p=\left\{A=\left[\begin{array}{ll}
a & b \\
c & a
\end{array}\right] ; a, b, c \in\{0,1,2, \ldots, p-1\}\right\}
$$Question:
The number of $A$ in $T_p$ such that $\operatorname{det}(A)$ is not divisible by $p$, is
$2 p^2$
$p^3-5 p$
$p^3-3 p$
$p^3-p^2$
Solution
The number of matrices for which $p$ does not divide $\operatorname{Tr}(A)=(p-1) p^2$ of these $(p-1)^2$ are such that $p$ divides $|A|$. The number of matrices for which $p$ divides $\operatorname{Tr}(A)$ and $p$ does not divides $|A|$ are $(p-1)^2$
$
\begin{aligned}
& \therefore \text { Required number } \\
& =(p-1) p^2-(p-1)^2+(p-1)^2 \\
& =p^3-p^2
\end{aligned}
$