Trace height on the special orthogonal group (source code)

= Trace height on the special orthogonal group
{title2=$f(X)=\operatorname{tr}(CX)$}

For positive distinct diagonal entries $c_1<\cdots<c_n$, the <critical points> of this function are diagonal sign <matrices> $D=\operatorname{diag}(\varepsilon_1,\ldots,\varepsilon_n)$ with $\prod\varepsilon_i=1$. Criticality forces $CX$ symmetric; its square is $C^2$, so it commutes with the distinct-spectrum diagonal <matrix> $C^2$ and is diagonal. In the skew coordinates $a_{ij}$ its <Hessian> is $-\sum_{i<j}(c_i\varepsilon_i+c_j\varepsilon_j)a_{ij}^2$. The sign of each parenthesis is that of $\varepsilon_j$, giving <Morse index> $\sum_{j:\varepsilon_j=1}(j-1)$.