Solution (source code)

= Solution

The plane spanned by $u_1,v_1$ is an <invariant subspace> for $M$, since
$$
Mu_1=\mu_1v_1,\qquad Mv_1=\frac1{\mu_1}M^2u_1=-\mu_1u_1.
$$
Its <orthogonal complement> is also invariant: for $w$ orthogonal to both, $u_1^TMw=-(Mu_1)^Tw=0$ and $v_1^TMw=-(Mv_1)^Tw=0$. The restriction of the real <symmetric matrix> $M^2$ to this nonempty complement therefore has a unit <eigenvector> $u_2$, by the <spectral theorem for real symmetric matrices>.

If its <eigenvalue> is $-\mu_2^2<0$, the argument in part (b) shows that $v_2=Mu_2/\mu_2$ is a unit <eigenvector> orthogonal to $u_2$. It also lies in the same complement; explicitly,
$$
u_1^Tv_2=-\frac{\mu_1}{\mu_2}v_1^Tu_2=0,\qquad v_1^Tv_2=\frac{\mu_1}{\mu_2}u_1^Tu_2=0.
$$
Repeating the construction decomposes every negative <eigenspace> into orthogonal pairs. The zero <eigenspace> has dimension $n-2r$ for some number $r$ of pairs, and therefore has the same parity as $n$. This is the <paired eigenspaces of the square of a real skew-symmetric matrix> property.

For $n=2m$, there can be $m$ distinct negative <eigenvalues> and no zero, or at most $m-1$ negative ones plus zero, because a nonempty zero <eigenspace> has dimension at least two. For $n=2m+1$, there are at most $m$ distinct negative ones plus the mandatory zero. Hence
$$
\boxed{\text{maximum number of distinct eigenvalues of }M^2=\left\lceil\frac n2\right\rceil.}
$$
The bound is attained by skew two-by-two blocks with distinct positive parameters, adding one zero direction when $n$ is odd.