Principal-axis freedom in a repeated ellipsoid eigenspace (source code)

= Principal-axis freedom in a repeated ellipsoid eigenspace
{title2=$a=\sqrt{c/\lambda}$}

For a positive-definite real <quadratic form> $x^TMx=c>0$, an orthonormal eigenvector of $M$ with eigenvalue $\lambda$ gives a principal semi-axis of length $\sqrt{c/\lambda}$. If an eigenvalue is repeated, any orthonormal basis of its eigenspace gives equally valid principal axes. Thus an angle attached to “the longest axis” need not be unique when the smallest eigenvalue is repeated. For example, the form with eigenvalues $6,1,1$ and short direction $(2,0,1)$ has every direction in $2x_1+x_3=0$ as a longest-axis direction. Its unit directions $(0,1,0)$ and $(1,0,-2)/\sqrt5$ make different angles, $0$ and $\arcsin(1/\sqrt5)$, to the plane $x_1=0$.