Intuition for Ellipsoid Semi-axis Equation

ellipsoidsgeometrylinear algebralinear-transformations

Background:
I am trying to develop an understanding of the equation for semi-axes of an ellipsoid.

Consider the general form of an ellipsoid with a center at $\vec{s}$:
$$
\left[
\begin{matrix}
x & y & z & 1\\
\end{matrix}
\right]
\mathbf E
\left[
\begin{matrix}
x\\
y\\
z\\
1\\
\end{matrix}
\right]
=
0
$$

$$
Where\
\mathbf E =
\begin{pmatrix}
a & h & g & p\\
h & b & f & q\\
g & f & c & r\\
p & q & r & d
\end{pmatrix}
=
\left[
\begin{array}{c|c}
\mathbf M_{3×3} & \vec{\mathbf n}\\
\hline
\vec{\mathbf n}^T & d\\
\end{array}
\right]
$$

In the case of an axis aligned ellipsoid at the origin, the eigenvalues represent the squares of the reciprocals of the semi axes. However in the case that an ellipsoid is at some arbitrary rotation and location in space, the semi-axes can be determined like so:

$$
L_1 = \sqrt{\frac{\mathbf{\vec{n}}^T\mathbf{M}^{-1}\mathbf{\vec{n}} – d}{\lambda_1}} = \sqrt{\frac{\mathbf{\vec{s}}^T\mathbf{M}\mathbf{\vec{s}} – d}{\lambda_1}}
$$

$L_2$ and $L_3$ are the same except divided by their respective eigenvalues.

My Question:

What is the intuition behind the $(\mathbf{\vec{n}}^T\mathbf{M}^{-1}\mathbf{\vec{n}} – d)$ and $(\mathbf{\vec{s}}^T\mathbf{M}\mathbf{\vec{s}} – d)$ terms arise from? These terms are identical, seem to come from nowhere, and I can't wrap my head around what they mean.

I would appreciate an explanation on where they come from.

Thank you for your time.

Best Answer

Define the position vector of a point on the ellipsoid as ${r} = [x, y, z]^T$

Then the equation of the ellipsoid is:

$ r^T M r + 2 r^T n + d = 0$

Define $s = -M^{-1} n$ , then the above quadratic equation becomes,

$ (r - s)^T M (r - s) - s^T M s + d = 0$

i.e.

$ (r - s)^T M (r - s) = s^T M s - d $

Dividing by the right side,

$ (r - s)^T G (r - s) = 1 $

where $G = \dfrac{1}{s^T M s - d} M$

The last equation is the standard equation of an ellipsoid with center at $s$. The semi-axes lengths of this ellipsoid are the square root of the receiprocals of the eigenvalues of $G$. The eigenvalues of $G$ are a scaled version of the eigenvalues of matrix $M$ by a factor of $\dfrac{1}{s^T M s - d }$, hence,

$ \lambda_{Gi} = \dfrac{\lambda_{Mi}}{s^T M s - d} $

And therefore the semi-axes lengths are

$ L_i = \dfrac{1}{\sqrt{\lambda_{Gi}}} = \sqrt{ \dfrac{s^T M s - d}{ \lambda_{Mi} }}$

Finally we note that $s^T M s - d = (-M^{-1} n)^T M (- M^{-1} n ) - d = n^T M^{-1} n - d$

Related Question