Linear Algebra
8.510 min read

Shapes of Quadratic Functions

In two dimensions, the graph of a quadratic form z=f(x1,x2)=λ1x12+λ2x22z = f(x_1, x_2) = \lambda_1 x_1^2 + \lambda_2 x_2^2 takes on beautifully distinct shapes depending on the signs of λ1\lambda_1 and λ2\lambda_2. When both are positive, the graph is a bowl opening upward (elliptic paraboloid) — it has a unique global minimum at the origin. When both are negative, the bowl flips to open downward (unique global maximum). When λ1>0\lambda_1 > 0 and λ2<0\lambda_2 < 0, the graph is a saddle — upward in one direction, downward in another, with no global minimum or maximum.

What if one eigenvalue is zero? When λ1>0\lambda_1 > 0 and λ2=0\lambda_2 = 0, the surface is a half-pipe or parabolic cylinder — it curves up in the x1x_1-direction but is flat in the x2x_2-direction. Points along the x2x_2-axis are all global minima (not a unique minimum). This geometric classification based on eigenvalue signs is exactly what definiteness formalizes (Section 8.16).

Formal View

Remark 8.1 — Eigenvalue Sign Classification
For a diagonal quadratic f(x)=λ1x12+λ2x22f(\mathbf{x}) = \lambda_1 x_1^2 + \lambda_2 x_2^2:\n- Both λi>0\lambda_i > 0: bowl opening upward (unique minimum at 0\mathbf{0})\n- Both λi<0\lambda_i < 0: bowl opening downward (unique maximum at 0\mathbf{0})\n- Mixed signs: saddle (no global extremum)\n- One λi=0\lambda_i = 0, rest positive: half-pipe (minimum along a line)

For general symmetric AA, the shapes are the same but the "axes" are the eigenvectors of AA rather than the coordinate axes.

Interactive Visualization

Quadratic Surface Explorer

Why This Matters

The shape of a quadratic tells you everything about whether an optimization problem has a solution, and how robust that solution is.

  • In machine learning, a "convex" loss function (bowl-shaped) guarantees that gradient descent converges to the unique global minimum.
  • In game theory, saddle points correspond to Nash equilibria in zero-sum games.
  • In structural mechanics, a half-pipe corresponds to a neutral mode — the structure can deform freely in one direction without any restoring force.

Quiz

Question 1

The quadratic form f(x1,x2)=x12x22f(x_1, x_2) = x_1^2 - x_2^2 has what shape?

Question 2

If all eigenvalues of AA are positive, the quadratic f(x)=xAxf(\mathbf{x}) = \mathbf{x}^\top A \mathbf{x} has a unique global minimum at the origin.

Common Mistakes

  • Thinking the shape depends on the entries of AA directly — it depends on the eigenvalues of AA (their signs determine the shape).
  • Confusing a saddle point with a local minimum — at a saddle, the function decreases in some directions and increases in others.