Numbers of $2\times 2$ matrices $A$ with elements from the set $\{-1, 0, 1\}$ such that $A^2 =I$ where $I$ is an identity matrix of order $2$. Numbers of $2\times 2$ matrices $A$ with elements from the set $\{-1, 0, 1\}$ such that $A^2 =I$ where $I$ is an identity matrix of order $2$.
My Approach:  Let $\;A=\begin{bmatrix} 
 a & b \\
 c & d \\ 
 \end{bmatrix}\;$
$\implies A^2 =\begin{bmatrix} 
 a^2+bc & b(a+d) \\
 c(a+d) & d^2+bc \\ 
 \end{bmatrix}\; =\begin{bmatrix} 
 1 & 0 \\
 0 & 1 \\ 
 \end{bmatrix},\; $
$\implies$ $a^2+bc=1,\; b(a+d)=0,\; c(a+d)=0,\; d^2+bc=1$
Then i made $5$ cases:
Case $(1).$ $a+d=0\;, b\neq0,\;c\neq 0$
Here I obtained two matrices $a=0,\ d=0,\; b=1,\; c=1$ and $a=0,\; b=0,\; b=-1,\; c=-1$
Case $(2)$ $a+d=0,\;b=0,\;c\neq0$
Here I obtained $4$ matrices $a=1,\;d=-1,\;b=0,\;c=1\;$ and $a=1,\; d=-1,\; b=0, c=-1$ and $a=-1,\;d=1,\;b=0,\;c=1\;$ and $a=-1,\; d=1,\; b=0, c=-1$
Case $(3)$ $a+d=0,\ b\neq 0,\ c=0$
Here I obtained $4$ matrices $a=1,\;d=-1,\;b=1,\;c=0\;$ and $a=1,\; d=-1,\; b=-1, c=0$ and $a=-1,\;d=1,\;b=1,\;c=0\;$ and $a=-1,\; d=1,\; b=-1, c=0$
Case $(4)$ $a+d\neq 0,\;b=0,\;c=0$
Here i obtained two matrices $a=1,\;b=0,\;c=0,\;d=1$ and $a=-1,\;b=0,\;c=0,\;d=-1$
Case $(5)$ $a+d=0,\; b=0,\ c=0\;$
Here I obtained two matrices $a=1,\;d=-1, b=0, c=0\;$ and $a=-1,\; d=1,\; b=0,\; c=0$
I am obtaining $14$ Matrices in total but answer given is $16$.
What Case am I missing? and also is there any better method to solve these kind of problem?
I am also attaching solution provided by My institute I didn't understood there solution at all

 A: Some simplifications can be made. First, $\det(A)=ad-bc=\pm1$, so $ad=0$ and $bc=\pm1$ or $ad=\pm1$ and $bc=0$.
If $bc=0$, then since replacing $A$ with $A^t$ doesn't affect anything, we might as well assume $c=0$. If $ad=-1$ then all possibilities for $b$ work ($A$ has eigenvalues $\pm1$ so is conjugate to $\begin{pmatrix}1&\\&-1\end{pmatrix}$). Otherwise, you need $b=0$.
If $ad=0$, then by conjugating by $\begin{pmatrix}&1\\1\end{pmatrix}$, which swaps $a$ and $d$, we might as well assume $d=0$. Now,
$$A^2=\begin{pmatrix}a^2+bc&ab\\ac&bc\end{pmatrix}=I_2,$$
so $a=0$ and $bc=1$.
A: Your answer is correct. The answer from your institute does not make sense and is incorrect.
To double check. I wrote program:
import torch

count = 0
elms = [-1,0,1]
for a in elms:
  for b in elms:
    for c in elms:
      for d in elms:
        A = torch.tensor([[a, b], [c, d]])
        if torch.norm(A.mm(A) - torch.eye(2)) < 1e-5:
          count += 1
          print(count, A)

The output is
1 tensor([[-1, -1],
        [ 0,  1]])
2 tensor([[-1,  0],
        [-1,  1]])
3 tensor([[-1,  0],
        [ 0, -1]])
4 tensor([[-1,  0],
        [ 0,  1]])
5 tensor([[-1,  0],
        [ 1,  1]])
6 tensor([[-1,  1],
        [ 0,  1]])
7 tensor([[ 0, -1],
        [-1,  0]])
8 tensor([[0, 1],
        [1, 0]])
9 tensor([[ 1, -1],
        [ 0, -1]])
10 tensor([[ 1,  0],
        [-1, -1]])
11 tensor([[ 1,  0],
        [ 0, -1]])
12 tensor([[1, 0],
        [0, 1]])
13 tensor([[ 1,  0],
        [ 1, -1]])
14 tensor([[ 1,  1],
        [ 0, -1]])

