Quadratic Forms

Geometry and algebra of linear maps, vectors, and matrices

A quadratic form xᵀAx takes a vector and returns a single number that varies quadratically in x, the matrix version of ax². As x ranges over all directions, this number traces out a surface, and the matrix A (taken symmetric) decides the shape of that surface.

Its eigenvalues are the curvatures along the eigen-axes, and their signs classify the surface completely. All positive: a bowl opening up (positive definite) with a clean minimum. All negative: a dome (negative definite) with a maximum. Mixed signs: a saddle (indefinite), up in some directions, down in others.

Toggle the eigenvalue signs in the figure and watch the surface morph between bowl, dome, and saddle.

Where this lives in MLThe quadratic form δᵀHδ is the second-order term in the Taylor expansion of a loss; it is the local curvature. A positive-definite Hessian means a local minimum (a bowl); an indefinite one means a saddle, which high-dimensional loss surfaces are riddled with. This curvature analysis drives second-order optimizers (Newton's method) and explains why training escapes saddles rather than getting…
▶ Quadratic Forms
← ProjectionsVectors & Geometry of Rⁿ →