Quadratic Forms
A quadratic form is a function of several variables built only from squares and cross terms. Turning to the eigenvector axes of the symmetric matrix gets rid of the cross terms, so the signs of the eigenvalues decide its shape: a bowl, a dome, or a saddle.
What the symbols mean
- Cross term
Its coefficient is split evenly between the two off-diagonal entries.
Explanation
A quadratic form is simply a polynomial in which every term has degree exactly two, like : squares and cross products, with no plain terms and no constant. "Quadratic" because of the degree two, and "form" is the old word for a polynomial whose terms all have the same degree. What it's good for: it's the multivariable version of , and it's how you tell whether a critical point is a minimum, a maximum or a saddle. All we're really saying here is that packs those coefficients into a symmetric matrix: and (the coefficients of the squares) go on the diagonal, and (half the cross-term coefficient) goes in both off-diagonal spots. Multiply it out and you get back . It's a polynomial written as a matrix product, nothing more.
A common mistake. It's tempting to put the whole cross-term coefficient, like the in , in each off-diagonal spot, because that's the number you see. It isn't right: multiplying out produces the cross term twice, once from each off-diagonal entry, so each spot gets half, here .
Principal axes. Changing to the eigenvector basis removes the cross term: . Think about why that works. is symmetric, so the last lesson gives . Substitute and you get , and a diagonal matrix has no off-diagonal entries to make cross terms. The level curves are ellipses or hyperbolas aligned with the eigenvectors.
Classification: once , its shape is all about the signs of the eigenvalues.
- All eigenvalues positive: positive definite, for (a bowl).
- All negative: negative definite (a dome).
- Mixed signs: indefinite (a saddle).
Constrained extremes. On the unit sphere , the maximum of is the largest eigenvalue and the minimum is the smallest. It makes sense from the same picture: preserves lengths, so is a unit vector too, and with is a weighted average of the eigenvalues, which can't go above the largest or below the smallest.
There's an animation further down that shows a bowl turning into a saddle as one eigenvalue changes sign.
See it
Worked examples
Write as and classify it.
- 1
Split the cross-term coefficient evenly between the two off-diagonal spots: , with trace 8 and determinant 11.
Practice
Type your answer and check it. Solve them all to complete the lesson.
Give the matrix of , row by row.
Evaluate that at .
Classify .
Classify .
Find the maximum of on the unit circle.
Near a minimum, a neural network's loss is approximately . The eigenvalues of its matrix are the curvatures along the principal directions, and they decide how fast gradient descent settles. Find them.
The hardest one here. Get it, and you've got this lesson.
Find the maximum value of over all unit vectors in .
Where it's used
The second derivative test in several variables is a quadratic form classification (of the Hessian); energy in physics and risk in portfolio theory are quadratic forms.