Solution (source code)

= Solution

Collect the paired <orthonormal bases> from part (iv), followed by an orthonormal basis of $\ker M^2=\ker M$. The matrix $Q$ of these columns is an <orthogonal matrix>, and
$$
\boxed{Q^TMQ=\bigoplus_{j=1}^r\begin{pmatrix}0&-\mu_j\\\mu_j&0\end{pmatrix}\ \oplus\ 0_{n-2r},\qquad \mu_j>0.}
$$
Indeed, each pair obeys $Me_j=\mu_jf_j$, $Mf_j=-\mu_je_j$, and all kernel vectors are annihilated. This proves the real block form of a <skew-symmetric matrix> directly, including repeated block parameters. In particular its <rank> is $2r$, always even.