Solution (source code)

= Solution

The positive-definite symmetric form $b$ is a real <inner product>. Choose a $b$-orthonormal <basis> by the <Gram-Schmidt process>. The stated identity means that the <matrix> $K$ of $\psi$ satisfies $K^T=-K$. If $d=\dim U$, then
$$
\det K=\det K^T=\det(-K)=(-1)^d\det K.
$$
An invertible $K$ has nonzero <determinant>, so \b[$d$ is even].

To cover a possibly singular map, first show $\ker\psi=(\operatorname{im}\psi)^\perp$. If $x\in\ker\psi$, then $b(x,\psi y)=-b(\psi x,y)=0$ for every $y$, giving one inclusion. Conversely orthogonality to the image gives $b(\psi x,y)=0$ for all $y$, so nondegeneracy of $b$ gives $\psi x=0$. Positivity then implies $\operatorname{im}\psi\cap\ker\psi=\{0\}$.

The image is invariant under $\psi$, and its restricted map $\psi|_{\operatorname{im}\psi}$ is injective by that trivial intersection. In finite dimension it is consequently invertible. The restricted <inner product> is positive definite and the same skew-adjoint identity holds, so the first argument applied to this restriction makes $\dim\operatorname{im}\psi$ even. Thus
$$
\boxed{\operatorname{rank}\psi\text{ is always even},}
$$
including <rank> zero. This is the <even rank of a skew-adjoint linear map>.