← Module 03 / Understanding matrices

Lesson 03.8 · §3.11.1

Why does a larger eigenvalue make a shorter ellipse axis?

Derive quadratic level sets from a sphere and identify their eigenvector directions.

In this lesson 5 ideas
  1. Fix the output
  2. The square root and the change of variable
  3. Scale, then orient
  4. Explore in three dimensions
  5. Transfer

Source scope: §3.11.1. Worked numerical examples, experiments, and practice are teaching supplements unless identified as source results.

Fix the output

For f(x)=4x12+x22f(x)=4x_1^2+x_2^2, the level f(x)=1f(x)=1 meets the horizontal axis at ±1/2\pm1/2 and the vertical axis at ±1\pm1. A larger quadratic coefficient requires a smaller coordinate to keep the output fixed.

A level set, or c-isocontour, is {x∈dom⁡f:f(x)=c}\{x\in\operatorname{dom}f:f(x)=c\}. Let f(x)=xTAxf(x)=x^TAx with real symmetric positive definite AA.

The square root and the change of variable

Use A=QΛQTA=Q\Lambda Q^T. All eigenvalues are positive, so define

A1/2=QΛ1/2QT,Λ1/2=diag⁡(λ1,…,λn).A^{1/2}=Q\Lambda^{1/2}Q^T,\qquad \Lambda^{1/2}=\operatorname{diag}(\sqrt{\lambda_1},\ldots,\sqrt{\lambda_n}).

This matrix is symmetric positive definite, and multiplying it by itself gives AA. Source clarification: The source calls it the “unique matrix square root.” The precise assertion is the unique symmetric positive definite square root; other matrix square roots can exist (for instance −I-I also squares to II). The source does not prove uniqueness here.

Fix c≥0c\ge0. Symmetry gives

c=xTAx=xTA1/2A1/2x=∥A1/2x∥22.c=x^TAx=x^TA^{1/2}A^{1/2}x=\|A^{1/2}x\|_2^2.

Set z=A1/2xz=A^{1/2}x. Then ∥z∥2=c\|z\|_2=\sqrt c: the transformed level set is a sphere. Write z=c z^z=\sqrt c\,\hat z, with ∥z^∥2=1\|\hat z\|_2=1. Since A−1/2=QΛ−1/2QTA^{-1/2}=Q\Lambda^{-1/2}Q^T,

x=A−1/2z=c QΛ−1/2QTz^=c QΛ−1/2z~,x=A^{-1/2}z=\sqrt c\,Q\Lambda^{-1/2}Q^T\hat z=\sqrt c\,Q\Lambda^{-1/2}\tilde z,

where z~=QTz^\tilde z=Q^T\hat z also has unit length. For c>0c>0, this is the image of the unit sphere under an invertible linear map. At c=0c=0, the map with factor c\sqrt c is no longer invertible, and the level set is just {0}\{0\}. For c<0c<0 it is empty. This makes explicit the degenerate case in the source’s derivation.

Scale, then orient

The diagonal factor scales axis ii by λi−1/2\lambda_i^{-1/2}. Multiplying by c\sqrt c gives semiaxis length

ri=c/λi.r_i=\sqrt{c/\lambda_i}.

Then QQ rotates or reflects the axis-aligned ellipsoid while preserving length and angle. The iith unit coordinate vector has entries [ei]j=δij[e_i]_j=\delta_{ij}, so

Qei=∑j[ei]jqj=qi.Qe_i=\sum_j[e_i]_j q_j=q_i.

Thus each final axis points along its corresponding eigenvector. The isocontours are ellipsoids for c>0c>0, with radii inversely proportional to square roots of eigenvalues. In two dimensions they are ellipses. This is the source’s complete sphere-to-ellipsoid derivation; the interactive planar view illustrates it without replacing the general argument.

Explore it yourself

Build a level ellipse

Increase one eigenvalue. Does its corresponding level-set axis grow or shrink?

Preparing interactive controls…

x₁x₂-4-4-3-3-2-2-1-1011223344q₁q₂

A = [[2.500, 0.866], [0.866, 1.500]]. Level c = 1. Semiaxis lengths: 0.577, 1.000. Q turns the axes by 30°. Each constructed final point satisfies xᵀAx = 1.

Axes: first and second real coordinates, in unit steps. Endpoints and labels identify each vector.

Explore in three dimensions

Explore it yourself

From a sphere to a level ellipsoid

Scale by inverse square roots, then orient the axes. A larger eigenvalue should make its axis shorter.

Preparing interactive controls…

Teaching supplement · interactive 3D projection · one grid interval = one coordinate unit

axis 1axis 2axis 3xyz0

Change the mathematics

Stage 1/3: sphere of radius √c. Final semiaxes = (0.707, 1.000, 1.000). Final sample x = (0.579, 0.406, 0); xᵀAx = 1.000; target c = 1.000.

The final surface is xᵀAx = c with A = Q diag(λ₁,λ₂,λ₃) Qᵀ. Each semiaxis has length √(c/λᵢ). Scaling and orientation are mathematical operations; camera orbit changes neither A nor its level set.

Same parameters: the z = 0 cross-section

This flat ellipse is the final ellipsoid cut by z = 0. Its equation is A₁₁ x² + 2A₁₂ xy + A₂₂ y² = c, where the coefficients come from the first two rows and columns of A. It stays linked to all eigenvalue, orientation, and level controls above.

xy101

The corresponding quadratic surface

Here the vertical axis is f(x,y,0)/2. The amber curve lies on the surface at height c/2; its shadow on the xy plane is the ellipse above. All three views share A and c. The third eigenvalue changes the ellipsoid’s vertical radius, while this z = 0 section stays fixed.

f = cxyf / 20
Camera controls · change only the view

Drag the diagram with a mouse, or use these sliders with a keyboard or touch. Projection can make perpendicular directions look oblique; the coordinate readout is unchanged.

Red: input or first direction. Blue: second direction or reference. Green: result. Amber: residual, normal, or third direction. Labels distinguish overlapping objects.

Transfer

For eigenvalues nine and one at level four, what are the two semiaxis lengths?

Take the inverse square root

They are 2/32/3 and 22. The eigenvector for nine gives the short axis. Multiplying by λ\sqrt\lambda instead would describe the wrong level set.