5.1 Why Unconstrained Variance Maximization Fails and Why uᵀu = 1 Is Essential

One of the most frequent questions students ask when seeing the PCA optimization problem for the first time is: "Why do we need the constraint uTu=1\mathbf{u}^T \mathbf{u} = 1? Why can't we just set the derivative of uTCu\mathbf{u}^T C \mathbf{u} to zero directly?"

In this microlearning, we see exactly what goes wrong when you remove the unit-norm constraint—both algebraically and geometrically—and introduce the equivalent scale-free formulation known as the Rayleigh quotient.

In this Article

1. The Quadratic Scaling Trap: Scaling u by α Scales uᵀCu by α²

Suppose you fix a direction in space via a unit vector u0\mathbf{u}_0 with true directional variance u0TCu0=3\mathbf{u}_0^T C \mathbf{u}_0 = 3. Now consider what happens if you simply stretch the ruler by defining w=αu0\mathbf{w} = \alpha \mathbf{u}_0 for any scalar α>0\alpha > 0:

wTCw=(αu0)TC(αu0)=α2(u0TCu0)=3α2\mathbf{w}^T C \mathbf{w} = (\alpha \mathbf{u}_0)^T C (\alpha \mathbf{u}_0) = \alpha^2 (\mathbf{u}_0^T C \mathbf{u}_0) = 3\alpha^2

   Length ||w|| = 1          Length ||w|| = 10           Length ||w|| -> infinity
   w^T C w = 3               w^T C w = 300               w^T C w -> +infinity!
   (True Variance)           (Fake 100x Inflation!)      (Unbounded Explosion!)

Without restricting ∥w∥=1\|\mathbf{w}\| = 1, an optimizer can drive wTCw\mathbf{w}^T C \mathbf{w} to +∞+\infty along any non-zero variance direction just by making ∥w∥\|\mathbf{w}\| larger and larger. That tells us nothing about which direction in the data cloud has the greatest spread!

2. Why Setting ∇(uᵀCu) = 0 Directly Gives Only u = 0

What if you try to find a stationary point of f(u)=uTCuf(\mathbf{u}) = \mathbf{u}^T C \mathbf{u} without constraints by setting ∇f(u)=2Cu=0\nabla f(\mathbf{u}) = 2C\mathbf{u} = \mathbf{0}? When CC is positive definite, the only solution to 2Cu=02C\mathbf{u} = \mathbf{0} is u=0\mathbf{u} = \mathbf{0}—the bottom of the quadratic bowl where variance is zero (the global minimum), not the maximum!

3. The Rayleigh Quotient R(w) = (wᵀCw)/(wᵀw): Built-In Normalization

There are two mathematically identical ways to prevent length inflation:

  1. Sphere-Constrained Formulation: Maximize uTCu\mathbf{u}^T C \mathbf{u} over vectors on the unit sphere uTu=1\mathbf{u}^T \mathbf{u} = 1.
  2. Rayleigh Quotient Formulation: Maximize the scale-invariant ratio

    R(w)=wTCwwTwfor any w≠0R(\mathbf{w}) = \frac{\mathbf{w}^T C \mathbf{w}}{\mathbf{w}^T \mathbf{w}} \quad \text{for any } \mathbf{w} \neq \mathbf{0}

    Notice that substituting u=w/∥w∥\mathbf{u} = \mathbf{w}/\|\mathbf{w}\| gives R(w)=uTCuR(\mathbf{w}) = \mathbf{u}^T C \mathbf{u} with uTu=1\mathbf{u}^T\mathbf{u} = 1 automatically!

4. Worked Numerical Comparison

Let C=[4001]C = \begin{bmatrix} 4 & 0 \\ 0 & 1 \end{bmatrix}. Compare a short vector along the high-variance x1x_1 axis, w1=[10]\mathbf{w}_1 = \begin{bmatrix} 1 \\ 0 \end{bmatrix}, against a stretched vector along the low-variance x2x_2 axis, w2=[05]\mathbf{w}_2 = \begin{bmatrix} 0 \\ 5 \end{bmatrix}:

  • Unnormalized quadratic form: w1TCw1=4\mathbf{w}_1^T C \mathbf{w}_1 = 4 vs. w2TCw2=25\mathbf{w}_2^T C \mathbf{w}_2 = 25. The unnormalized form is fooled into picking w2\mathbf{w}_2 solely because ∥w2∥=5\|\mathbf{w}_2\| = 5!
  • Normalized Rayleigh quotient (or unit sphere uTu=1\mathbf{u}^T\mathbf{u}=1): R(w1)=4/1=4R(\mathbf{w}_1) = 4/1 = 4 vs. R(w2)=25/25=1R(\mathbf{w}_2) = 25/25 = 1. Normalization exposes the true directional variances 44 vs. 11.

5. Active Recall Check and Key Takeaways

Quick Check: Test Your Understanding

Question: If w=(3,4)T\mathbf{w} = (3, 4)^T and wTCw=100\mathbf{w}^T C \mathbf{w} = 100, what is the true projected variance of the data along the direction of w\mathbf{w}?

Answer: Since wTw=32+42=25\mathbf{w}^T \mathbf{w} = 3^2 + 4^2 = 25, the unit vector is u=w/5\mathbf{u} = \mathbf{w}/5 and the true directional variance is the Rayleigh quotient R(w)=wTCwwTw=10025=4R(\mathbf{w}) = \frac{\mathbf{w}^T C \mathbf{w}}{\mathbf{w}^T \mathbf{w}} = \frac{100}{25} = 4.

  • Why uTu=1\mathbf{u}^T\mathbf{u}=1 Exists: It separates pure geometric direction from artificial coordinate scaling.
  • Rayleigh Quotient Equivalence: Maximizing uTCu\mathbf{u}^T C \mathbf{u} on uTu=1\mathbf{u}^T\mathbf{u}=1 is identical to maximizing (wTCw)/(wTw)(\mathbf{w}^T C \mathbf{w})/(\mathbf{w}^T\mathbf{w}) over w≠0\mathbf{w} \neq \mathbf{0}.
  • Canonical References: See Wikipedia Reference on the Rayleigh Quotient.

Take a Quiz Based on This Article

Test your understanding with AI-generated questions tailored to this content

Adaptive Learning with SynLearn

Explore this article through guided practice that adapts to your answers

✓Step-by-step concepts & lessons
✓Active recall & adaptive feedback
✓Personalized spaced repetition
constrained-optimization
unit-sphere
quadratic-forms
rayleigh-quotient
pca
linear-algebra