Real matrices such that $A^2=-I_n$ 
Find all $n\times n$ matrices with real entries such that $A^2=-I_n$.

If $A$ is such a matrix, since $(\det A)^2 = (-1)^n$, $n$ must be even.
Furthermore, $A$ annihilates $X^2+1 = (X-i)(X+i)$, so $A$ is diagonalizable over $\mathbb C$, with eigenvalues in $\{-i,i\}$. Let us write $A=PDP^{-1}$ where $D$ is a diagonal matrix with entries in $\{-i,i\}$ and $P$ is complex and non-singular.
Since the trace of $A$ is real, there must be the same number of $i$ and $-i$ on $D$'s diagonal.
Although interesting, this doesn't give a very explicit description of $A$.
I'm not even sure any product $$P\begin{pmatrix}
i\\
&\!\!i\\
&&\ddots\\
&&&-i\\
&&&&-i
\end{pmatrix}P^{-1}$$ yields a matrix with real entries, that's why I think something much more specific can be said about $A$.
 A: Hint.
$A$ is similar to a matrix composed on the "diagonal" of matrices of dimension $2$ of the type 
$$\begin{pmatrix}
0 &-1\\
1 & 0
\end{pmatrix}$$ 
This can be seen by picking a non zero vector $x$. The family $(x,A.x)$ is linearly independent and the matrix of $A$ on the subspace is of the type mentioned above.
By induction, suppose that you've build a linearly independent family of vectors
$$(x_1,Ax_1, \dots , x_p,Ax_p)$$ If it is a basis of $\mathbb C^{2n}$ you're done. If not, pick up a vector $x \notin \text{Vect}\{x_1,Ax_1, \dots , x_p,Ax_p\}$. I pretend that 
$$(x_1,Ax_1, \dots , x_p,Ax_p,x,Ax)$$ is linearly independent. For the proof, take $(\alpha_1,\beta_1, \dots, \alpha_p,\beta_p,\alpha,\beta) \in \mathbb C^{2p+2}$ such that
$$\alpha_1 x_1 + \beta_1 Ax_1+ \dots + \alpha_p x_p + \beta_p Ax_p+\alpha x + \beta Ax=0$$ Applying $A$ on both side, you get
$$\alpha_1 Ax_1 - \beta_1 x_1+ \dots + \alpha_p Ax_p - \beta_p x_p+\alpha Ax - \beta x=0$$ By linear combination,
$$(\alpha^2+\beta^2)x \in \text{Vect}\{x_1,Ax_1, \dots , x_p,Ax_p\}.$$ Hence $\alpha=\beta=0$. You can then complete the proof by induction.
