Quadratic Forms
Quadratic forms turn symmetric matrices into geometry: ellipses, saddles, optimization bowls, Hessians, and covariance shapes.
Opening idea
A symmetric matrix does not only transform vectors. It also defines a geometric landscape. Given a symmetric matrix $A$, the expression assigns a number to each vector $x$. For example, in two variables, we get This is a quadratic form. Quadratic forms describe ellipses, hyperbolas, paraboloids, energy landscapes, curvature, optimization problems, covariance geometry, and least-squares objectives. The central question of this chapter is: How does a symmetric matrix shape a quadratic landscape? The answer comes from eigenvalues and eigenvect...
Central formula
Learning goals
Condensed from the chapter source.
- Define a quadratic form.
- Write a quadratic form as $x^TAx$ using a symmetric matrix.
- Classify quadratic forms using eigenvalues.
- Understand positive definite, positive semidefinite, negative definite, and indefinite matrices.
- Use orthogonal diagonalization to remove cross terms.
- Interpret level curves and level surfaces geometrically.
- Connect quadratic forms to optimization.
- Understand the Hessian matrix and curvature.
- Analyze least-squares objectives as quadratic functions.
- Use Python to visualize quadratic forms and optimization geometry.
Chapter map
Key ideas to keep visible while exploring the interactive tools.
Quadratic form
$x^TAx$ measures squared geometry shaped by $A$.
Diagonalize
Orthogonal eigenvectors remove cross terms.
Eigenvalues
Signs classify bowls, saddles, and flat directions.
Quadratic form explorer
Explore $q(x,y)=ax^2+2bxy+cy^2$ through eigenvalues, contours, and geometry.
Positive definite checker
Use eigenvalues and Sylvester's criterion for $2\times2$ symmetric matrices.
Sylvester's criterion
Gradient descent on a quadratic bowl
For $f(x)=\frac12x^TAx$, the eigenvalues control the contour shape and optimization speed.
Quick check
Classification by eigenvalues.
Question. What does it mean if a quadratic form has both positive and negative eigenvalues?
Chapter summary
The main takeaways in one place.
- Every real quadratic form can be represented by a symmetric matrix.
- Orthogonal diagonalization removes cross terms and reveals principal axes.
- The signs of eigenvalues classify positive definite, negative definite, semidefinite, and indefinite forms.
- Quadratic forms appear in optimization, least squares, covariance geometry, and Mahalanobis distance.