Sum of squares of skew-symmetric matrices which is not a square itself This is just a curiosity.
How can I find an example of two real $n \times n$ skew-symmetric matrices $A,B$, whose sum of squares $A^2+B^2$ is not a square of any skew-symmetric matrix?
The skew-symmetric matrices are rather constrained due to the spectral theorem, but I don't see how to use that to construct a counter-example.
 A: Let me work with skew-symmetric operators instead of matrices. If $T,S \colon \mathbb{R}^n \rightarrow \mathbb{R}^n$ are two skew-symmetric operators then we have
$$ \left< (T^2 + S^2)x, x \right> = \left< T(Tx), x \right> + \left< S(Sx), x \right> = \left< Tx, T^{*}x \right> + \left< Sx, S^{*} x \right> \\= -\left< Tx, Tx \right> - \left< Sx, Sx \right> = -\| Tx \|^2 - \| Sx \|^2 $$
which implies that
$$ \ker(T^2 + S^2) \subseteq \ker(T) \cap \ker(S). $$
Let's assume now that $n$ is odd. In this case, if $T$ is skew-symmetric then $T$ is singular and so is $T^2$. Hence, to construct a counterexample it is enough to find two skew-symmetric operators $T,S$ such that $\ker(T) \cap \ker(S) = \{ 0 \}$ because then $T^2 + S^2$ will be invertible and so it can't be the square of a skew-symmetric operator.
To provide a concrete example, take $n = 3$. Any skew-symmetric operator on $\mathbb{R}^3$ has the form $L_{v} \colon \mathbb{R}^3 \rightarrow \mathbb{R}^3$ where $L_v(x) = v \times x$. Denote by $e_1,e_2,e_3$ the standard basis and consider the skew-symmetric operators $L_{e_i}$. The kernel of $L_{e_i}$ is $\operatorname{Span} \{ e_i \}$ and so $L_{e_1}^2 + L_{e_2}^2$ is invertible and can't be a square of a skew-symmetric operator.
A: This, of course, isn't possible when $n\le 2$.
The construction is easy when $n\ge3$. First, pick at random two nonzero real numbers $a$ and $b$ as well as two sets of orthonormal vectors $\{u,v\}$ and $\{w,x\}$ in $\mathbb R^3$. Then $A=a(uv^T-vu^T)$ and $B=b(wx^T-xw^T)$ are two skew symmetric matrices in $M_3(\mathbb R)$ and $S=A^2+B^2=-a^2(uu^T+vv^T)-b^2(ww^T+xx^T)$ is almost surely nonsingular. Hence $S$ almost surely isn't the square of a skew-symmetric matrix, because the latter has an even rank. Now, to extend this construction to a higher dimension, simply consider $Q(A\oplus0)Q^T$ and $Q(B\oplus0)Q^T$ for an orthogonal matrix $Q$.
