4.2 Quadratic Forms uᵀCu: Measuring Directional Variance in Any Direction
Once we have built the covariance matrix , how do we find out how spread out the data cloud is along an arbitrary tilted direction ? The answer is one of the most important expressions in applied mathematics: the quadratic form .
In this microlearning, we prove that equals the exact empirical variance along unit vector , expand it into a polynomial in the components of , and visualize its level sets as variance ellipses.
In this Article
1. Proving σ²(u) = uᵀCu in Three Lines of Matrix Algebra
Let be our centered data matrix and be any unit direction vector (). Projecting each row onto produces the vector of scalar projections:
Because is mean-centered, the average of is zero. Its empirical variance is the average squared entry of :
2. Expanding uᵀCu in 2D: How Cross-Terms Reward Alignment
In 2D, let and . Carrying out the multiplication gives a degree-2 homogeneous polynomial (which is why it is called a quadratic form):
Look closely at the middle term : when (positive correlation between and ), choosing and with the same sign (pointing into Quadrant I or III) makes positive and boosts the variance above the axis variances!
3. Visualizing the Quadratic Bowl and Variance Contours
If we allow an arbitrary vector and plot as a height in 3D, it forms an upward-curving elliptic paraboloid (a bowl). Slicing this bowl horizontally at a constant height produces concentric ellipses in the plane:
w2 ^
| . - ~ ~ - .
| . ' / ' . <-- Level curve w^T C w = constant
| / / \
------+---/---------------0-------+---> w1
| \ / /
| ' . / . '
| ' - . _ . - '
Minor axis = Steepest wall of bowl (largest eigenvalue lambda_1)
Major axis = Gentlest valley of bowl (smallest eigenvalue lambda_2)
4. Worked Numerical Directional Sweep
Suppose . Then for any unit vector :
| Angle | Unit Vector | Directional Variance |
|---|---|---|
| (Global Maximum = ) | ||
| (Global Minimum = ) |
5. Active Recall Check and Key Takeaways
Quick Check: Test Your Understanding
Question: Given , does a unit vector in Quadrant I () or Quadrant II () achieve larger projected variance?
Answer: Quadrant II! Because , the cross term becomes positive (+6 u_1 |u_2|) when and have opposite signs, yielding maximum variance at .
- Universal Variance Formula: for any unit vector .
- Cross-Term Geometry: Off-diagonal covariances reward directions aligned with the correlation sign of the cloud.
- Canonical References: See Wikipedia Reference on Quadratic Forms in Statistics.
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