For $n >1$,let $\displaystyle f(n)$ be the number of $n \times n$ real matrices $A$ such that $A^2+I=0.$ I came across the following problem that says:   

For $n >1$,let $\displaystyle f(n)$ be the number of $n \times n$ real matrices $A$ such that $A^2+I=0.$ Then which of the following options is correct?
  $1.\displaystyle f(n) \equiv 0$
  $2.\displaystyle f(n) \equiv \infty$
  $3.\displaystyle f(n)=0$ iff $n$ is even
  $4.\displaystyle f(n)=0$ iff $n$ is odd.  

Can someone throw light on it?  Thanks in advance for your time.
 A: Consider the matrix $$\begin{bmatrix}0&1\\-1&0\end{bmatrix}$$ and all of its conjugates. 
Then consider what you know about the real roots of a real polynomial of odd degree. 
A: (a) is wrong because for $n=2$ we have $A=\begin{pmatrix}0&1\\-1&0\end{pmatrix}$.
(b) is wrong because for $n=3$, the polynomial $\det(A-xI)$ is of degree $3$ and hence $A$ has a real eigenvalue $\lambda$. But $A^2+I=0$ would imply $\lambda^2+1=0$, contradiction.
(c) is wrong, again by the esample $A=\begin{pmatrix}0&1\\-1&0\end{pmatrix}$.
(d) is correct, again by observing that $\det(A-xI)$ is of odd degree and hence has a real root.
A: Note that $A^2 = -{\rm I}_n$, $~{\sf det}(-{\rm I}_n)=(-1)^n~$ and ${\sf det}(A^2) = ({\sf det}A)^2$. Since a real matrix has real determinant, then $f(n)=0$ if $n$ is odd. Conversely if $n$ is even, then the matrix
$$
A=\begin{bmatrix}
 &&&&& -1 \\
 &&&&\cdots \\
 &&&-1 \\
 && 1 \\
 &\cdots \\
 1
\end{bmatrix}
$$
satisfies $A^2+{\rm I}=0$. Thus $f(n)\geq 1$ if $n$ is even so that among the options listed, number 4 (f(n)=0 iff n is odd) is the only one true.
A: You’ve not looked hard enough: if $$A=\pmatrix{0&b\\-\frac1b&0}\;,$$ then
$$A^2=\pmatrix{-1&0\\0&-1}\;.$$
Added: Remember that the characteristic polynomial of $A$ is of degree $n$, that $A$ satisfies its own characteristic polynomial, and that every real polynomial of odd degree has at least one real root. Suppose that $n$ is odd. Then $A$ has a real eigenvalue $\lambda$. Let $v$ be a non-zero eigenvector for $\lambda$. Then 
$$\left(A^2+I\right)v=\lambda^2v+v=0$$
if and only if $\lambda^2=-1$, so ... ?
