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 ? Why can't we just set the derivative of 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 with true directional variance . Now consider what happens if you simply stretch the ruler by defining for any scalar :
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 , an optimizer can drive to along any non-zero variance direction just by making 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 without constraints by setting ? When is positive definite, the only solution to is —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:
- Sphere-Constrained Formulation: Maximize over vectors on the unit sphere .
- Rayleigh Quotient Formulation: Maximize the scale-invariant ratio
Notice that substituting gives with automatically!
4. Worked Numerical Comparison
Let . Compare a short vector along the high-variance axis, , against a stretched vector along the low-variance axis, :
- Unnormalized quadratic form: vs. . The unnormalized form is fooled into picking solely because !
- Normalized Rayleigh quotient (or unit sphere ): vs. . Normalization exposes the true directional variances vs. .
5. Active Recall Check and Key Takeaways
Quick Check: Test Your Understanding
Question: If and , what is the true projected variance of the data along the direction of ?
Answer: Since , the unit vector is and the true directional variance is the Rayleigh quotient .
- Why Exists: It separates pure geometric direction from artificial coordinate scaling.
- Rayleigh Quotient Equivalence: Maximizing on is identical to maximizing over .
- 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