c09 · Section 5
When is a quadratic form a bowl?
When is a quadratic form a bowl?
L1Core
The idea, one concrete case and enough to use it. Every simplification is marked and linked to the precise statement.
Two expressions in two real variables and look almost the same:
The first is a sum of two squares, so it can never be negative. The second is a square minus a square, so it can. At and the first expression is , and the second is [S:27:80]. One expression is a bowl with a single bottom. The other is a saddle: it curves up in some directions and down in others.
The two expressions differ only in the coefficient of , which is five in the first and three in the second. The cross term, , is the same in both. That small change is enough to turn a sum of two squares into a difference of squares, and the next paragraphs show that it also moves one eigenvalue across zero.
Both are quadratic forms, expressions of the shape for a symmetric matrix . When you multiply out , the two off-diagonal entries each contribute one copy of the cross term, so an off-diagonal entry of produces the coefficient . That is why the matrix for the first expression is and the matrix for the second is . A symmetric matrix is positive definite when its quadratic form is positive for every nonzero vector [S:27:80]. That is exactly the bowl condition.
The eigenvalues decide which case you are in. Change to the eigenbasis of , which exists by the spectral theorem [S:27:117], and call the new coordinates and . In those coordinates the cross terms disappear, and the form becomes a weighted sum of squares with weights and :
Each eigenvalue is the curvature along one perpendicular axis. The curvature is how quickly the slope changes as you move away from the origin along that axis: a large eigenvalue means a steeply bending direction, and a small one means a flat direction.
Two positive eigenvalues give a bowl. One positive and one negative give a saddle point. A zero eigenvalue gives a flat direction, and the shape is a trough rather than a bowl. A positive definite matrix always has positive eigenvalues [S:27:112].
Three dimensions work the same way, with three eigenvalues and a list of signs. Three positive numbers give a bowl. Two positive and one negative give a saddle with one downhill direction, and two negative with one positive give a saddle with two downhill directions. A zero makes a flat direction and a trough.
Worked example. For the first matrix, the trace is and the determinant is , so the eigenvalues solve . They are and , about and . Both are positive, so the form is a bowl.
For the second matrix, the trace is and the determinant is , so the eigenvalues solve . They are and , about and . The negative eigenvalue is the downhill direction, and the value at is that direction made concrete.
The eigenvalue test is the same test as the completed square, read in a different language. Completing the square means rewriting the expression as a square plus a leftover, as the opening lines do: . The square shows the sign directly for a two-by-two form. The eigenvalues show it in any dimension, and they also tell you how steep each direction is. The smallest eigenvalue is the curvature of the flattest direction; the largest is the curvature of the steepest one.
The signs can also be read without solving the polynomial. The trace is the sum of the eigenvalues, and the determinant is their product [S:27:118][S:27:119]. A negative determinant already proves that the two eigenvalues have opposite signs, so the form is a saddle. That is how the second matrix is caught in one line.
Stop and try
take and evaluate at . Is the form a bowl or a saddle?
Key idea
A symmetric quadratic form is a bowl exactly when all its eigenvalues are positive. In the eigenbasis it is a weighted sum of squares, and the signs of the weights say whether each direction curves up, down or not at all.
The idea has a limit. It describes one fixed quadratic form. It says nothing about where the bottom of the bowl is, how far away it lies, or what happens to a function that is not quadratic at all. The eigenvalue test also asks about every nonzero vector at once, so checking a few directions proves nothing.
The test can also be expensive. For a large matrix, deciding positive definiteness is a computation in its own right, and the eigenvalues are one route to the answer rather than the only one. Finally, a bowl can be extremely elongated. If one eigenvalue is and the other is , the curvature differs by a factor of about twenty, and gradient descent, which steps along the negative gradient, will crawl along the flat one.
L2Deepen
The formal statement, the derivation and the edge cases. It refines L1 and never contradicts it.
The formal statement. Let be a real symmetric matrix and let . Then for every nonzero exactly when every eigenvalue of is positive [S:27:80]. More generally, the signs of the eigenvalues give the shape. All positive is a bowl, all negative is a downward bowl, mixed signs give a saddle, and a zero eigenvalue gives a flat direction. A positive definite matrix always has positive eigenvalues [S:27:112].
The derivation. By the spectral theorem, has an orthonormal eigenbasis with real eigenvalues [S:27:117]. Write . Orthonormality gives . Each is nonnegative, and the are not all zero when is nonzero. If every is positive, every term is nonnegative and at least one is positive, so . If some , take . Then , and the form is not positive definite. That proves both directions, and no step is omitted.
The edge case. The core writes the form with a symmetric . Take instead the non-symmetric matrix . Then , which is positive at and negative at , so the form is a saddle. Both eigenvalues of are zero. A reader who applies the eigenvalue test to concludes "flat in every direction", which is wrong. Only the symmetric part enters a quadratic form, so you must symmetrize before you read eigenvalues.
What the core hid. The core checked the sign by completing the square in two variables. That trick is special to two dimensions and to a form with no linear term. The eigenbasis argument works in any dimension and needs only the spectral theorem. Completing the square was safe in the example because the example was two-by-two and had no linear term.
Where the analogy breaks. A bowl has a bottom, and has its bottom at the origin only because no linear term is present. The general quadratic has the same curvature and a different bottom, at the solution of when is invertible. The eigenvalues describe the shape, not the location. A second limit: "bowl" suggests one lowest point, but a positive semidefinite form with a zero eigenvalue has a whole flat trough. The core says this. The analogy does not.
L3Research
Full rigour, the original sources and the open questions. This is the research frontier.
Original sources. The definition of a symmetric positive definite matrix is Definition 3.4 in MML, and the two two-by-two examples are the ones in the core [S:27:80]. The step from a quadratic form to a general function is the second-order condition: a twice differentiable function is convex exactly when its Hessian is positive semidefinite at every point, and strictly convex when the Hessian is positive definite [S:63:310]. The same condition is Proposition 15.4 in the differentiable-programming text [S:72:423].
An open question. For a quadratic form the test is finite: list the eigenvalues, or factor the matrix. For a loss surface that is not quadratic, the test asks for the Hessian at every point, and the field has not settled how to certify a bowl over a whole region at a cost that scales. Evidence that would settle a given case: a certificate that holds on the region, checked against a dense grid of Hessian eigenvalues, including points the certificate was not fitted to. A local test on a grid is evidence, not a proof.
A frontier result. Strong convexity is the quantitative form of the bowl condition: the Hessian satisfies for some positive [S:72:424]. It is not enough on its own for a rate. The linear bound needs a second hypothesis, -smoothness, which says the gradient changes no faster than , together with a step : under both, gradient descent satisfies [S:72:433-434]. Without smoothness the gradient can change arbitrarily fast, and without the step bound the iteration can diverge. For a quadratic form the ratio is the ratio of the largest eigenvalue to the smallest, which is the condition number you read from the same eigendecomposition. The eigenvector for the smallest eigenvalue points along the flattest direction, which is the one a descent method crosses most slowly.
What to read next. Read MML 3.2.3 for the definition and the two examples [S:27:80], Murphy 8.1.3 for the Hessian test and the four surfaces [S:63:310], and Blondel and Roulet 15.4 for strong convexity and the rate it buys [S:72:424].