Solution (source code)

= Solution

Over $\mathbb C$, the real <skew-symmetric matrix> $A$ is normal because $A^*=-A$. Part (a) gives an orthonormal complex eigenbasis, and the nonzero eigenvalues are purely imaginary pairs $\pm i\lambda$.

For each $\lambda>0$, choose a unit real vector $x$ in the kernel of $A^2+\lambda^2I$ and put
$$
y=-\frac1\lambda Ax.
$$
Then $x\perp y$, $\|y\|=1$, and
$$
Ax=-\lambda y,\qquad Ay=\lambda x.
$$
Thus $A$ has matrix
$$
\begin{pmatrix}0&\lambda\\-\lambda&0\end{pmatrix}
$$
on the orthonormal basis $(x,y)$. Distinct such invariant planes are orthogonal; complete them by an orthonormal basis of $\ker A$. Taking these basis vectors as the columns of an <orthogonal matrix> $R$ gives
$$
\boxed{R^TAR
=\operatorname{diag}\left(
\begin{pmatrix}0&\lambda_1\\-\lambda_1&0\end{pmatrix},
\ldots,
\begin{pmatrix}0&\lambda_r\\-\lambda_r&0\end{pmatrix},
0\right)}.
$$