Finding number of matrices whose square is the identity matrix

The eigenvalues are indeed $\pm 1$, so the equation $A^2=I$ is solved exactly by all $A$ of the form $$ A = C D C^{-1} $$ where $C$ is an arbitrary non-singular $9\times 9$ matrix and $D$ is an arbitrary diagonal matrix with $r$ entries $+1$ and $j$ entries $-1$, $r+j=9$. This set of the solution has several disconnected components labeled by the labels $(r,j)$. Each component has the dimension $80-36=44$, I guess, because among the $80$ a priori possible generators of $SL(9)$, the generators of $SO(r,j)$ don't change the matrix.


As you note, the minimal polynomial divides $(t-1)(t+1)$. Since the minimal polynomial splits and is square free, that means that the matrix is necessarily diagonalizable. Therefore, you want a diagonalizable matrix with eigenvalues $-1$ and/or $1$. Just pick how many times $1$ is an eigenvalue (from $0$ through $9$) to get all similarity types.


As pointed out in another answer, $A$ has to have Jordan blocks $A_i$ of the form $\pm I +N$ where $N$ is a matrix with a certain number of $1$'s in the first off-diagonal and the rest zeros. The matrix $N^2$ has a certain number of $1$'s in the second off-diagonal and the rest zeros. It follows that the condition $(A_i)^2 = I$, i.e., $I\pm 2 N+ N^2 =I$ implies $N=0$. Therefore $A$ is similar to a diagonal matrix with all diagonal entries $1$ or $-1$. There are 10 different types of such matrices.