Positive Definite Matrices and Minima
Positive definite matrices pull the whole course together — pivots, determinants, eigenvalues — and add the new quantity x transpose A x. Strang gives four equivalent tests for positive definiteness, shows that completing the square is Gaussian elimination in disguise, and connects it all to the calculus question of recognizing a minimum. Slicing the bowl-shaped graph gives ellipses, and the principal axis theorem reads their axes off the eigenvectors and eigenvalues.
Four tests for one property
This lecture, Strang says, “brings the whole course together” — pivots, determinants, eigenvalues — plus something new: the expression , “the guy to watch in this lecture.” Two goals. First: given a matrix — say five by five — how can you tell whether it’s positive definite? Second, and more important: what does the property mean, and why do we care? At the end comes geometry — ellipses go with positive definite matrices; hyperbolas do not.
Throughout, every matrix is symmetric — that’s understood. For a symmetric matrix
each of the following is a complete test for positive definiteness:
- Eigenvalue test: and .
- Determinant test: and — all the leading determinants positive. (For an matrix, the determinants of all the upper-left submatrices — the “northwest, Seattle submatrices” — must be positive.)
- Pivot test: the first pivot , and the second pivot , since the pivots multiply to the determinant.
- The energy test ★: for every .
Test 4 gets the star. In most presentations it’s the definition of positive definiteness, and tests 1–3 are the ways to check it. It’s the new idea of the lecture.
A family of examples: 2, 6, 6, and what?
Start with
and ask: what number in the corner makes it positive definite? Don’t find eigenvalues — use the determinant test. The first entry is positive, fine. The determinant must be positive, so the corner had better be more than eighteen. Put there: determinant — positive definite.
Now play it really close and put there:
Not quite. This matrix is on the borderline — Strang calls it positive semi-definite. It’s singular: the second row is a multiple of the first, so it’s a rank-one matrix with one eigenvalue , and from the trace the other eigenvalue is . Eigenvalues — it’s that “equal to” that brings in the word semi-definite. And the pivots? The first pivot is ; there is no second pivot — a singular matrix only has one.
What is ? Take and multiply it out for the matrix with :
The comes from the diagonal, the from the diagonal, and the cross term collects from each side — twelve ‘s in all. In general : a quadratic form. was linear; with an on the left we’re up to degree two — purely degree two, no linear part, no constant, no cubes. The question of positive definiteness is: is that quantity positive for every ?
When it fails: the saddle
Push the corner entry all the way down to — “such a total disaster.” The determinant is , the pivots are and , and one eigenvalue is certainly negative. The quadratic form is
and there must be inputs that make it negative. Try , : the squares give , but the cross term gives , and .
What does the graph of look like? It goes through the origin. Along the -axis it climbs like ; along the -axis it climbs like ; along the forty-five degree line it climbs too. Going up in some directions — but we just checked it goes down along the direction . The surface is a saddle: up one way, down the other, like the way a saddle drops for your legs and rises fore and aft. The origin is a saddle point — a maximum in some directions and a minimum in others. And the perfect directions to look, it will turn out, are the eigenvector directions.
When it works: the bowl, and the calculus of minima
Now raise the corner to and make the matrix really positive definite:
Check the tests without finding the eigenvalues. The determinant is , so : both eigenvalues have the same sign. The trace is , so they can’t both be negative — both positive. The pivots are and : positive. And the function should be positive everywhere except at — “I don’t expect miracles.”
The graph is now a bowl (the long word is paraboloid), with its minimum at the origin. Here is where linear algebra meets calculus. In first-year calculus, a minimum required the first derivative to be zero — but that alone couldn’t distinguish minimum from maximum. The second derivative had to be positive: the slope increasing, the curvature upward. For a pure quadratic, the first derivatives automatically vanish at the origin (each term of or still carries an or a ). It’s the second derivatives that control everything — and the second derivatives are exactly what the matrix holds.
That matrix of second derivatives, in two variables, is
— symmetric, because the beautiful fact about mixed second derivatives is that in either order. The pure second derivatives and must be positive, but that’s not enough: they have to be big enough to overcome the cross derivative. You may remember, tucked in near the end of 18.02, the condition — that’s just our determinant test.
Completing the square is elimination
How do you see that is always positive? Squares are what we know to be nonnegative — so write it as a sum of squares. Start the square: gets the and the right, and produces ; two more ‘s are left over:
Two squares added together — it couldn’t go negative. With the marginal in the corner, nothing is left over: , positive semi-definite. With the disastrous , you’d have to remove eleven: — the indefinite case, the saddle.
Now look hard at the numbers , , . They are no accident.
And elimination works for matrices — which is how the whole story scales past two by two: pivots outside squares.
Three by three: the favorite matrix
The graph of this lives in four dimensions — in the base and going up — “I’m asking you to stretch your visualization here.” But slice it at height one, taking all points where
and you get an ellipsoid — a lopsided football (closer to a rugby ball). In the bowl, the slice at was an ellipse; slicing through a saddle would give a hyperbola instead.
A general ellipsoid has a center and three principal directions: a major axis, a middle axis, and a minor axis. A sphere is the case of the identity — all eigenvalues equal; a rugby ball has two eigenvalues repeated and one different; our matrix, with three different eigenvalues, gives three different axis lengths.
Problems
Work these with the four tests and the completing-the-square trick from the lecture.
For which values of is
positive definite? For the borderline value of , find both eigenvalues and the pivots, and classify the matrix.
Show solution
Determinant test: ✓ and , so is positive definite exactly when .
At the borderline the determinant is zero, so the matrix is singular: one eigenvalue is , and from the trace the other is . The pivots: the first is ; there is no second pivot (rank one — the second row is times the first). Eigenvalues but not all : positive semi-definite.
Write out for
decide whether the graph of is a bowl or a saddle, and exhibit a specific where is negative if one exists.
Show solution
The form is (the off-diagonal doubles into ).
Determinant test: the first entry , but . The eigenvalues multiply to , so one is negative: is indefinite and the graph is a saddle.
A negative direction: try , : . (Completing the square shows the same thing: — a negative number, , appears outside the second square, matching the second pivot .)
For
find the pivots and the multiplier by elimination, then use them to write as a sum of squares. Confirm the matrix is positive definite.
Show solution
Elimination: the first pivot is , the multiplier is ; subtracting row one from row two leaves , so the second pivot is (check: ).
Pivots outside, multiplier inside:
Check: , and ✓. Both coefficients outside the squares are positive, so for every : positive definite, and the graph is a bowl.
Does have a minimum at the origin? Write down the matrix of second derivatives and apply the positive definiteness test.
Show solution
The first derivatives and are both zero at the origin, so the origin is a critical point. The matrix of second derivatives is
Determinant test: but . Not positive definite — indefinite. The origin is a saddle point, not a minimum: rises along the axes ( and are positive) but the cross term overwhelms them; for instance .
Show that
is positive definite using the determinant test, find its pivots, and write out . What surface do you get by setting , and which directions are its principal axes?
Show solution
Leading determinants: , then , then . All positive: positive definite.
Pivots: , then (ratio of the first two determinants), then .
The quadratic form: the diagonal gives , and the pair gives one cross term:
Setting it equal to gives an ellipsoid centered at the origin. By the principal axis theorem , its axes point along the eigenvectors. The block structure makes them visible: in the -plane the eigenvectors of are with and with ; the third axis is with . All eigenvalues positive (as they must be), the longest axis along — the smallest eigenvalue gives the longest half-length.