Involutory matrix $2 \times 2$ I want to find out how many  $2 \times 2$ involutory matrices are there over $\mathbb Z_{26}$.
$ $
Is there any formula to calculate this? 
$ $ 
Thanks for your help.
 A: I assume $\mathbb{Z}_{26}$ is the ring of integers modulo $26$. Now, 
$$\mathbb{Z}_{26} \simeq \mathbb{Z}_{13}\times \mathbb{Z}_{2}$$
So we need to find the number of $2\times 2$ involutory matrices  with elements in the fields $\mathbb{Z}_{p}$, when $p=13$, and when $p=2$ and multiply these two numbers. 
An $n\times n$ matrix $A$ with elements in the field $\mathbb{F}$ corresponds to a linear operator on $\mathbb{F}^n$. Assume that $A^2= Id$, that is $A$ is involutory. There are two cases.
Case 1. The field has characteristic $\ne 2$. Then 
$$\mathbb{F}^n = V_{+} \oplus V_{-}$$
where $ V_{\pm}$ is the eigenspace corresponding to the eigenvalue $\pm 1$. The involutory operators are therefore in $1-1$ correspondence with the deompositions of $F^n$ into direct sum of two subspaces. 
Case 2. The field $\mathbb{F}$ has characteristic $2$. We will do only the $n=2$ case. Asssume that $A$ is not $Id$. Then there exist $v$ vector in $\mathbb{F}^2$ so that $A v = w$ and $w \ne v$. Now, $A w = v$ since $A$ is an involution. Let us show that $w$ is not proportional to $v$. It it were, then $Av = \lambda v$ and $A^2 v = \lambda^2 v = v$. Since $v \ne 0$ we have $\lambda^2 = 1$ and so $\lambda=1$, contradiction. Therefore, if $A$ is an involution and $A \ne Id$ there exists a basis $(v,w)$ of $\mathbb{F}^2$ so that 
$A v = w$ and $A w = v$. Now, if such a basis were given and moreover, $Av = w$, $Aw =v$ then $A$ is perfectly determined. Thus we have a surjective map from bases of $\mathbb{F}^2$ to involutory operators that are not identity
$$(v,w) \mapsto A$$
as determined above. The map is certainly not injective. What other pairs $(v,w)$ determine the same operator $A$? They will be any other $(u, Au)$ that is a basis. That means, any $u$ so that $Au\ne u$ will give by the pair $(u, Au)$ the same operator. Now, if $u = \lambda v + \mu w$ the condition $A u \ne u$ is simply $\lambda \ne u$. Therefore:
The fibres of the map
$$(v,w) \mapsto A$$
have cardinality $2\binom{|\mathbb{F}|}{2} = 2\binom{q}{2}= q(q-1)$
Therefore, the number of involutory $\ne Id$ operators is 
$$\frac{(q^2-1)(q^2-q)}{q(q-1)}= q^2-1$$
We conclude that the numbers of involutory $2\times 2$ matrices is $q^2$. 
Let's get back to the first case for $n=2$. The number of decompositions of $\mathbb{F}^2$ into $2$ subspaces is 
$$1+1 + \frac{(q^2-1)(q^2-q)}{(q-1)(q-1)}= 2 + q(q+1)$$
Therefore the number of involutory $2\times 2$ matrices over a field with $q$ elements is $i_q= q^2$ if $q$ is a power of $2$, and $i_q= q^2+q+2$ if $q$ is a power of an odd prime. 
Now we just need to multiply $i_{13} \cdot i_2$ 
${\bf Added:}$ Let's check against the claimed number:
$$i_{13} = 13^2 + 13 + 2 = 169+ 15 = 184\\
i_2 = 4\\
184 \cdot 4 = 736 $$ 
(glad I didn't know it before, it feels better now). 
A: Let $p$ be an odd prime, and $A=\left(\begin{matrix}a&b\\c&d\end{matrix}\right)\in M_2(\mathbb Z/p\mathbb Z)$. 
Then $A^2=I$ is equivalent to $a^2+bc=1,$ $d^2+bc=1,$ $b(a+d)=0,$ $c(a+d)=0.$ 
If $a+d\ne0$, then $b=c=0$, so $a^2=d^2=1$, and there are $2$ solutions. 
If $a+d=0$, then consider the following cases:
(i) $a=0$. Then $bc=1$, that is, $c=b^{-1}$ and find $p-1$ solutions.
(ii) $a=1$. Then $bc=0$, and we have $2p-1$ solutions.
(iii) $a=-1$. Similarly, we get $2p-1$ solutions.
(iv) $a\ne0,\pm1$. Then $c=(1-a^2)b^{-1}$, so there are $(p-1)(p-3)$ solutions.
Summing up we get $p^2+p+2$ matrices $2\times 2$ over $\mathbb Z/p\mathbb Z$.
