Lecture 27 · Positive definite matrices and minimum values
Use positive definite matrices to determine the minimum value of a multivariate function, and master the combination method and principal formula.
On this page
Positive definite matrices and minima | Gilbert Strang | MIT 18.06 Linear Algebra
Lecture 27 / Total 35 Lectures |Part 3 · Eigenvalues, positive definiteness and linear transformation
Video of this lecture: Bilibili p28 · Positive definite matrix and minimum value ↗(50:40)| MIT OCW official page ↗
Illustration: MIT OCW 18.06SC official lecture summary (CC BY-NC-SA 4.0) and Bilibili classroom video frames (time stamped), about 10 frames per lecture.
Introduction to this lecture
The previous lecture extended the symmetric matrix theory to the complex number domain. This lecture returns to real matrices and discusses a type of matrix that is extremely important in theory and application——Positive definite matrix (positive definite matrix). The special thing about positive definiteness is that it ties together several clues from the entire course: pivot, determinant, eigenvalue, plus a new object that has not been dealt with head-on before - quadratic form .
This lecture will answer three questions. judge:Give one How to quickly determine whether a matrix is positive definite? meaning: What exactly does the property of Zhengding mean, and why is it worth caring about? Geometry: Positive definite figures are bowls, ellipses, and ellipsoids, while incorrect definite figures are saddle points and hyperbolas. The three answers finally converge to the same place - the positive definite matrix describes the minimum value of a multivariate function at a point, which is the generalization of the criterion “the second derivative is positive” in calculus to multi-dimensional situations.
The main line is: first The four criteria are laid out side by side, and an example with parameters is used to complete the three stages of “positive definite-critical-indefinite”; then the quadratic form is introduced to explain why the combination method can determine positive certainty; then the combination method is regarded as elimination, and it is explained why the pivot falls outside the square term; then the second-order derivative matrix is connected to the minimum value; finally, using Example showing ellipsoid and principal axis theorem.

MIT OCW Official Lecture Notes Summary Page 1/4 (18.06SC Lecture 27 Summary, CC BY-NC-SA 4.0).
1. View the four criteria side by side
The object of discussion is always real symmetric matrix (symmetric matrix), this is not moved by default. from Start:
Each of the following four items is sufficient to judge independently. Whether it is right concentration.
- Eigenvalue criterion: and , that is, the two eigenvalues (eigenvalues) are all positive. The eigenvalues of a symmetric matrix are all real numbers (this is the basic fact of a symmetric matrix), so the sentence “is positive” makes sense.
- determinant criterion:all sequential subject form (leading principal minor) are all positive—— of , Determinant of . The sequential main subforms refer to the determinants of those submatrices that extend from the upper left corner (northwest corner) to the lower right step by step.
- pivot criterion: Both pivots are positive. The first pivot of is ;The product of pivot components is equal to the determinant, so the second pivot component must be .
- quadratic criterion: for all non-zero vectors , both .
Article 4 is the new face of this lecture and the real protagonist. Most textbooks directly treat it as positive definite definition, and regard the first three items as criteria; this lecture will first go through the first three items in the order of use, and then go back and explain the fourth item thoroughly.
Each of the four has its own use. give one For matrices, no one actually solves the quintic equation to find the eigenvalues; the actual method is to perform elimination once to see the sign of the pivot component, or to calculate a series of determinants by order. Both of these methods only require four arithmetic operations. The value of the eigenvalue criterion is in interpretation, and the value of determinant and pivot criterion is in calculation.
Also make sure that these four picks are from the same batch of matrices. The situation can be verified by hand calculation. If and , then , so , so trace is positive, the determinant is positive, the two eigenvalues have the same sign and their sum is positive, both must be positive. On the other hand, if both eigenvalues are positive, then the determinant is positive and the trace is positive; by know with They have the same number, and then from the traces, we know that both are correct. That’s it. The four criteria do point to the same batch of matrices. behind The example walks the argument through again.

Video 00:05:04 | Approximately corresponding to Section 1 “1. View the four criteria side by side”.
2. Examples with parameters: positive definite, critical, indefinite
take
ask At least how big must it be for the matrix to be positive definite.
There is no need to find the eigenvalues, the determinant criterion is the fastest. The first sequential subject is , is established automatically; the second one is
Require it to be positive and get . The second pivot is more straightforward: the product of the pivots is equal to the determinant, , so “the main elements are all positive” is , critical value It’s clear at a glance. take , the determinant is , the second pivot is , both main elements are positive, positive definite.
put Pressed to critical value : , is no longer strictly positive. Its trace is , the determinant is , so the two eigenvalues are with : Non-negative, but one of them happens to be . This situation is called positive semidefinite (positive semi-definite), the word “semi” comes from that . The pivot situation illustrates the problem even more: the first pivot is , the second pivot is ;Elimination cannot proceed because
The second line is the first line times, the matrix is singular, and the rank is , there is only one pivot. The main element criterion requires “all positive”, which appears here , so the criterion stops exactly on the critical line.
again pressed to : , the second pivot is , one positive and one negative. This matrix is called Uncertain (indefinite). Its two eigenvalues are one positive and one negative - there is no need to calculate them. If the determinant is negative, it means that the product is negative, so one must be positive and the other negative.
critical value put The value of is divided into two sections: Right concentration, Uncertain, but It alone becomes the dividing line of positive semi-definite. This is why the criterion is trustworthy: the behavior at the critical point is completely explainable - if a pivot is lost there, a direction is also lost. The three scenarios are as follows:
| range | determinant | two pivots | eigenvalue | Type |
|---|---|---|---|---|
| Right | with , all correct | All are correct | positive definite | |
| with | with | positive semidefinite | ||
| Negative | One positive and one negative | One positive and one negative | Uncertain |

Video 00:12:10 | Approximately corresponding to section 2 “2. Examples with parameters: positive definite, critical, indefinite”.
3. Quadratic type: new protagonist
Now figure out the fourth criterion. take , use Calculate . Do it first :
reuse Multiply left and combine similar terms:
Each of the three coefficients has its origin: from elements, from element, middle from the sum of two symmetric positions . Generally, yes Yes
This expression contains only quadratic terms: no linear terms, no constant terms, and no cubic terms. Such a function is called Quadratic type (quadratic form). Note itself is still linear, multiplied to the front Raise the count to two.
One thing worth remembering about the structure: two pure square terms with in Time is always non-negative. The only thing that can go wrong is the middle term, which can be positive or negative. Whether it is positive definite or not depends on whether the two square terms “overwhelm” the cross term; this sentence will become a very specific condition in the combination method.
The definition of positive certainty falls on this formula: if for everything non-zero All , then it is called positive definite.
return to matrix. Its quadratic form is . take , got , so it is not positive definite. This counterexample is graphically convincing: along The axis function is , upward; along The axis function is , also upward; along direction is , still upward; but along The direction becomes . Some directions rise and some directions fall. Such a stationary point is called a stationary point. saddle point (saddle point): It is the highest point in some directions and the lowest point in other directions. The best way to see these directions is in the eigenvector directions - as you move along the eigenvectors, the quadratic form degenerates exactly into a single square term.
The situation is completely different. The quadratic form is , the same generation Got . But one point is not enough, you have to prove it to all All are positive.
In fact, the eigenvalue level has already been passed first. time , the trace is ;The product of two eigenvalues is equal to the determinant , the sum is equal to the trace . If the product is positive, it means that the two have the same sign. If the sum is positive, it excludes the same sign, so both are positive. Without solving the equation, the symbol is determined - this is the value of the criterion. But to make “positive everywhere” clear from the formula, this function must be written directly as a sum of squares.

MIT OCW Official Lecture Notes Summary Page 2/4 (18.06SC Lecture 27 Summary, CC BY-NC-SA 4.0).

Video 00:19:15 | Approximately corresponding to section 3 “3. Quadratic Type: New Protagonist”.
4. The matching method is to eliminate elements
Judgment The best way is to write it as a sum of squares. The trouble is all in the cross terms Above: As long as you can fit it into a square, the rest is just the sum of several squares. this is Preparation method (completing the square). Set
Why is it in parentheses? ? because The expanded cross term is , take another ride outside Just given ; and it contributes The item is , multiplied by the outside That’s it . original style , not even close , so
The right side is the sum of two squares, the coefficients are all positive, for any real number cannot be negative, so The matrix of is positive definite.
put Change to other values, the structure remains unchanged and the conclusion follows the coefficients. when, happens to be contributed Used up, leftover , got , this is semi-positive definite. This square is only on the straight line Take zero up, and along this straight line direction ——It is exactly the eigenvalue The corresponding eigenvector direction is the direction in which the positive semidefinite matrix is “lost”. Graphically, the bowl is flattened into a trough: the minimum is no longer an isolated point, but an entire straight line. Need to make up when needed , got : A negative coefficient appears, which is why it can be Source of negative values.
to general matrix(), the recipe can be written in one step:
inside the square It is the elimination multiplier, outside the square with Just two main elements. This line of identities completes the explanation of “combination method equals elimination”, and the origin of each term is clear at a glance.
The two outside the square inside the peace square None of this is accidental. Yes Do elimination: the first pivot is , the second row minus the first row times (the multiplier is ),
The second pivot is . Compare this: The coefficient outside the square is the pivot element, and the coefficient inside the square is the elimination multiplier..
So the matching method is just another way of writing elimination. In the sum of squares form, there is a pivot hanging outside each square term; if the pivots are all positive, the sum of squares is all positive, the function is always positive, the graph is upward, and the origin is the minimum point. This chain strings together criteria, algebraic identities, and geometric shapes. Conversely, as long as a certain pivot is negative, a negative term will appear in the sum of squares, the function will go down in a certain direction, and a saddle point will appear. The value of this translation is that it is not limited to second order: elimination pairs It’s ready-made, It can always be broken down into The sum of squares, the coefficient outside each square term is the pivot of that step. This correspondence between positive pivots and positive sums of squares holds for any order.
The geometric image becomes clear. The function graph is a bowl, and the origin is the lowest point. water level To cut this bowl, the cross-section is
This is a ellipse (ellipse); replace with In the indefinite case of , the cross-sections at the same height are Hyperbola (hyperbola). The difference between a bowl and a saddle point is the difference between an ellipse and a hyperbola.
5. Second-order derivative matrix and minimum value
The relationship between bowls and minima is a direct translation of the conclusions of calculus. unary function The necessary condition for taking the minimum is that the first-order derivative is zero; but the derivative being zero only indicates the tangent level, which may be the maximum, minimum or inflection point. The real determination requires the second-order derivative: is the minimum point at which the curve bends upward.
Multivariate functions are exactly the same, except that each item must be replaced by a matrix. Yes , the first-order partial derivative always contains or , so it is automatically all zero at the origin - the necessary condition does not provide any information, everything is determined by the second derivative. In general functions, zero first-order derivative only indicates the level of the tangent plane, which may be minimum, maximum or saddle point. To distinguish, you have to look at the second-order derivative matrix. Arrange the second-order partial derivatives into a matrix:
It must be symmetric because the order of mixed partial derivatives can be exchanged, . this is second derivative matrix (matrix of second derivatives), which is exactly ""A stand-in for multiple situations.
Determining minimal requires two things. First, two pure second-order partial derivatives with Must be positive - it must curve upward along the coordinate axis. Second, this is not enough: cross terms It is possible to pull down the entire surface, so , Must be big enough to overwhelm . The binary criterion given in the calculus textbook is
It is actually that the determinant of the second-order derivative matrix is positive - exactly the criterion of the previous sequential principal formula. Yes Check calculation: , , , while , established. Written as a matrix, it is
Right Taking the derivative twice, the second derivative matrix obtained is exactly ;Constant factor does not affect the positive definiteness, so “testing that the second-order derivative matrix is positive definite” is the same as “testing Right concentration” is the same thing.
So the core conclusion of this lecture can be written in one sentence: the second derivative matrix of multivariate functions at stationary points positive definite When , it must be strictly minimized; conversely, if it is minimized, the second-order derivative matrix is at least positive semi-definite. Positive definiteness is a sufficient condition and the most commonly used criterion - the condition “the second-order derivative is positive” in one dimension is translated into matrix language as “the second-order derivative matrix is positive definite”; and positive definiteness has four operable criteria, and there are operable algorithms for judging the minimum value. The metafunction copies this sentence, except that the matrix becomes , and elimination, determinant, and eigenvalue are true for any order.

Video 00:32:56 | Approximately corresponding to Section 5 “5. Second-order derivative matrix and minimum value”.

MIT OCW Official Lecture Notes Summary Page 3/4 (18.06SC Lecture 27 Summary, CC BY-NC-SA 4.0).

Video 00:39:30 | Approximately corresponding to Section 5 “5. Second-order derivative matrix and minimum value”.
6. Third-order example: ellipsoid and principal axis theorem
Move the same four questions to :
Is it right concentration? What is the quadratic type? Does the function take the minimum at the origin? What is the geometric shape?
The fastest is still the sequential master style. The first level is ;The second order is ;The third level is expanded according to the first row,
The three sequential main formulas are , all are positive, so Right concentration. This type of diagonal is , the sub-diagonal is is a matrix whose sequential principal formulas are , rising one after another.
The main element can also be read out. After elimination
They coincide exactly with the determinant: is the second-order sequential principal formula, is a third-order determinant. The main components are all positive, consistent with the determinant criterion.
Eigenvalues are less readily available - a cubic equation needs to be solved to the third order. But it can be concluded that they are all positive, and these three numbers are , , . Check with two simple tests: the trace is , which is exactly the sum of the diagonal elements of the third-order matrix; the determinant is , consistent with the determinant calculated above.
The quadratic form is
Contributions to each diagonal dollar ; with of two Taken together it gives ; with given ; The location is , so there is no item. As the sum of squares, the coefficients outside the square are exactly three principal elements:
Multiply and check: the first item is given , the second item gives , the third item gives ; coefficient of , coefficient of , the cross terms add up to exactly , consistent with the quadratic form. square miles , The coefficient of also comes from the elimination multiplier. All three coefficients are positive, so this quadratic form is always positive except for the origin.
Geometrically, The graph needs to have three independent variables plus one function value, with a total of four dimensions, so it cannot be drawn; but it is still a bowl, to be precise. Paraboloid (paraboloid), the origin is the lowest point. use to cut, to get
This is a ellipsoid (ellipsoid) surface, like a squashed rugby ball. The difference between the spherical surface and it lies in symmetry: the spherical surface looks the same from any direction, which corresponds to the situation where the three eigenvalues are all equal like the unit matrix; a real football has one long direction and the other two directions are equal, corresponding to the situation where the two eigenvalues are equal; in general, the three eigenvalues are different from each other, and the ellipsoid has three main axes: the major axis, the middle axis, and the minor axis.
three main axes direction Given by the eigenvector, length given by the eigenvalues. Writing this sentence as algebra, it is the decomposition of a symmetric matrix
Among them The columns of are orthonormal eigenvectors, The diagonal element of is the corresponding eigenvalue. This is by far the most important matrix factorization in the eigenvalue part - it is the diagonalization of a symmetric matrix, just because , the inverse matrix is replaced by transpose.
The axis length can be calculated using this decomposition. order , that is , then
in In coordinates, the ellipsoid equation become , the coordinate axis is exactly along the direction of the eigenvector, along the The length of the semi-axis in one direction is . The three eigenvalues of this question are approximately , , , corresponding to the semi-axis length approximately , , , the longest axis is assigned the smallest eigenvalue. this is Principal Axis Theorem The geometric content of (principal axis theorem): the eigenvector has a fixed direction, and the eigenvalue has a fixed length.

Video 00:45:36 | Approximately corresponding to Section 6 “6. Third-order Example: Ellipsoid and Principal Axis Theorem”.

MIT OCW Official Lecture Notes Summary Page 4/4 (18.06SC Lecture 27 Summary, CC BY-NC-SA 4.0).
Summary of this lecture
- Positive definite matrix By default, it refers to the real symmetric matrix; it is the generalization of “the second derivative is positive” in the multi-dimensional case, corresponding to the minimum value of the multivariate function.
- Four equivalence criteria: all eigenvalues are positive; all sequential principal subforms are positive; all principal components are positive; quadratic form for everything non-zero is positive (most textbooks take this as the definition).
- The four criteria here are indeed equivalent: by with available , so the trace and determinant are both positive, and the eigenvalues are both positive; and vice versa.
- Example : Right concentration; positive semidefinite (eigenvalue , rank , there is only one pivot, the second row is the first row times); Uncertain (, pivot with ).
- Quadratic type is a pure quadratic homogeneous expression; when it is The value is , the corresponding figure is a saddle point.
- Preparation method: . The coefficient outside the square is the pivot element, and the coefficient inside the square is the elimination multiplier. The matching method is elimination;The positive pivot gives a positive sum of squares, the graph is upward, and the origin is the minimum point.
- In the positive situation of , use Slice into ovals; In the indefinite case, the same slice is a hyperbola.
- The binary function takes a strict minimum when the second-order derivative matrix of the stationary point is positive definite; conversely, taking the minimum only ensures that the second-order derivative matrix is positive semi-definite. Positive determination is a sufficient criterion; in calculus is the determinant criterion of this matrix. Yes , the second derivative matrix is .
- Third order example :Sequential main form , pivot , characteristic value .
- third order quadratic form dubbing ; slice It’s an ellipsoid. Principal Axis Theorem That is, the diagonalization of a symmetric matrix: the eigenvector determines the main axis direction, and the eigenvalue determines the axis length (semi-axis length) ).
keywords
| English | Chinese | One sentence explanation |
|---|---|---|
| positive definite matrix | Positive definite matrix | Symmetric matrix, quadratic form takes positive value for all non-zero vectors |
| positive semi-definite | positive semidefinite | The quadratic form is nonnegative and allowed to be obtained , which is equivalent to non-negative eigenvalues |
| indefinite | Uncertain | The quadratic form is positive in some directions and negative in some directions. |
| quadratic form | Quadratic type | shaped like Pure quadratic homogeneous function of |
| leading principal minor | sequential subject form | Determinant of a submatrix that expands step by step starting from the upper left corner |
| completing the square | Preparation method | Write the quadratic form as the sum of squares, and the square external coefficient is the pivot element |
| matrix of second derivatives | second derivative matrix | A symmetric matrix composed of second-order partial derivatives, used to determine the minimum value |
| saddle point | saddle point | Stationary points that rise in some directions and fall in others |
| ellipse | ellipse | Intersection of the positive definite quadratic form on the horizontal plane |
| ellipsoid | ellipsoid | The graph of the positive definite ternary quadratic form on the isosurface |
| hyperbola | Hyperbola | Intersection of the indefinite quadratic form on the horizontal plane |
| paraboloid | Paraboloid | “Bowl” shaped surface of positive definite quadratic figure |
| principal axis theorem | Principal Axis Theorem | , the eigenvector gives the principal axis direction |
| major axis | long axis | The longest axis of the ellipsoid corresponds to the smallest eigenvalue |
Machine-assisted translation · Read Chinese original
