$A^2=-I$ and its similar matrices 
Given $A \in M_n(\Bbb R)$ be a matrix such that $A^2 = -I$. Prove that $A$ is similar over $\Bbb R$ to $$B=\begin{pmatrix}0&{-I_{n/2}}\\{I_{n/2}}&0\end{pmatrix}.$$

It's easy to see that $(\det A)^2 = (-1)^n$, so $n$ is even.
It's fine to show that there exists an invertible matrix $P$ such that $P^{-1}AP=B$, but is there any explicit representation of $P$?
 A: The minimal polynomial of $A$ is given by $\lambda^2+1$. So $A$ is diagonalizable (by similarity transformation) to:
$$
\left[
\begin{array}{cc}
\overbrace{\begin{array}{ccc}
i&&\\
&\ddots&\\
&&i\\
\end{array}}^{k} &\\
&\underbrace{\begin{array}{ccc}
-i&&\\
&\ddots&\\
&&-i\\
\end{array}}_{n-k}
\end{array}
\right]
$$
But since $A$ is a real matrix, and its characteristic polynomial has real coefficients, the eigenvalues $i,-i$ must come in pairs, i.e. $k=n-k=\frac{n}{2}$. It is easy to show that $B$ is also similar to the same diagonal matrix. And therefore $A$ and $B$ are similar. To see $A$ and $B$ are similar over $\mathbb R$, note that each pair $(i,-i)$ comes from a skew symmetric block:
$$
\left[
\begin{array}{cc}
0 & -1\\
1& 0
\end{array}
\right]
$$
and therefore $A,B$ are both similar to the block matrix:
$$
\left[
\begin{array}{ccc}
\begin{array}{cc}
0 & -1\\
1& 0
\end{array}\\
&\ddots&\\
&&\begin{array}{cc}
0 & -1\\
1& 0
\end{array}
\end{array}
\right]
$$
Since $A$ satisfying $A^2=-I$ is not unique, $P$ is not unique either.
An alternative way to see this is to notice that $\forall v\in\mathbb R^n$, the two dimensional subspace spanned by $v,Av$ is an invariant subspace of $A$, since:
$$
Av\in\text{span}(v,Av), A(Av)=-v\in\text{span}(v,Av).
$$
Thus $A$ restricted to this 2-d subspace with basis $v,Av$ has exactly the form:
$$
\left[
\begin{array}{cc}
0&-1\\
1&0
\end{array}
\right]
$$
So, starting from any $v_1\in\mathbb R^n$, define $v_2=Av_1$. Then, pick $v_3$ outside $\text{span}(v_1,v_2)$, and define $v_4=Av_3$. Continuing this process until finally you have a basis $(v_1,\dots,v_n)$, under which $A$ becomes the desired block diagonal form (i.e. $P=[v_1~\cdots~v_n]$).
It is even easier to bring $B$ to the block diagonal form. Denote $n=2m$, it is easy to see that $Be_i=e_{m+i}, Be_{m+i}=-e_i, i=1,\dots,m$. Using $P=[e_1~e_{m+1}~\cdots~e_m~e_{2m}]$ will bring $B$ to the same block diagonal form.
Now it is clear that $B$ is very special since the $n/2$ 2-d invariant subspaces $\text{span}(e_i,e_{m+i})$ are orthogonal to each other while in the case of $A$ it is only required to be independent of each other. More precisely, $B$ is a skew symmetric matrix, which is expected to have orthogonal eigenspaces, but $A$ is not necessarily so.
A: Let $u_1\ne0$  a vector of $\Bbb R^n$ then the family $(u_1,Au_1)$ is linearly independent. In fact let $\alpha_1,\beta_1\in\Bbb R$ such that
$$\alpha_1 u_1+\beta_1 Au_1=0\tag1$$
and apply $A$ to $(1)$ we get
$$\alpha_1Au_1-\beta_1 u_1=0\tag2$$
and $\alpha_1 (1)-\beta_1(2)$ gives
$$(\alpha_1^2+\beta_1^2)u_1=0\implies \alpha_1=\beta_1=0$$
Now by finite induction we prove easily using the same method that: if $(u_1,\ldots,u_p,Au_1,\ldots,A u_{p-1})$ is a linearly independent family then the family $\mathcal B=(u_1,\ldots,u_p,Au_1,\ldots,A u_{p})$ is also linearly independent and a maximal of such family (we work in finite dimensional space) is a basis of $\Bbb R^n$. Finally the matrix relative to the basis $\mathcal B$ has the desired form.
