A symmetric matrix draws a surface over the plane. Watch it change from a round bowl to a valley, then to a saddle.
Bowl, valley, saddle
The surface z = 2x^2 + 2sxy + 2y^2 of the matrix A = [2 s; s 2].
s = 0: z = 2x^2 + 2y^2, a round bowl. Both eigenvalues of A = [2 0; 0 2] are 2.
Describe this picture
A slowly turning 3-D view of the surface over a round patch of the plane, for the matrix . Two curves run across the surface: along the line (labelled with the eigenvalue ) and along (labelled ). Two points on the rim are marked with their heights, and . Parts of the surface below the floor are shaded in a second colour. Over about 12 s, moves from 0 to 1, to 2, to 3, resting at each. At the surface is a round bowl. At the bowl is stretched. At it is a valley, flat along the line . At it is a saddle: it rises along and falls along , where , while . Readouts give , the two eigenvalues and the shape. One control after the clip: a slider for from to 3 in steps of 0.5.
Energy
A symmetric matrix turns every point into one number:
For in the picture, . Draw that number as a height above each point, and you get the surface. In mechanics and circuits is often an energy, which is why it matters whether it can go negative.
The matrix is positive definite when the surface is a bowl that touches zero only at the origin:
When is never negative but can be 0 away from the origin, the matrix is positive semi-definite: a valley.
Which is it? Turn to the matrix’s axes. By Symmetric matrices, . Write for the coordinates of along the two eigenvectors. Then
For the eigenvectors are and , with eigenvalues and . So . Both eigenvalues positive: a bowl. One of them 0: a valley along that eigenvector. One negative: a saddle. Drag past 2 and watch the surface bend down exactly when goes below zero.
Four tests, one question
For a symmetric matrix, these four tests always agree. Each is a different way to ask “is the surface a bowl?”
- Eigenvalues. Every eigenvalue is positive. That is the formula above.
- Pivots. Every pivot of elimination, from Elimination, is positive. Elimination writes as a sum of squares with the pivots as weights: , with pivots 2 and 1.5.
- Leading determinants. The determinants of the top-left , , … corners are all positive. Each one is a product of pivots: 2, then .
- A product. for some matrix with independent columns. Then , a length squared, and it is 0 only when , which independence allows only for .
Four tests
Four ways to ask one question: is x^T A x > 0 for every nonzero x?
A = [2 1; 1 2], symmetric. Four tests ask one question: is x^T A x > 0 for every nonzero x?
Describe this picture
The matrix as a grid of cells, and beside it (below it on a phone) its four tests appear one after another, each as a small grid with its name: its eigenvalues 3 and 1; its pivots 2 and 1.5; its leading determinants 2 and 3; and its lower triangular factor , with , and , under the name “L, with ”. Under each, a check mark says “all > 0”: every test is passed. There is no control.
Watch out
Positive entries are not enough. has every entry positive, but its pivots are 1 and , its eigenvalues 3 and , and : a saddle. And the eigenvalue test needs symmetry. has eigenvalues 1 and 1, yet .
Cholesky: the square root of a bowl
Test 4 has a standard choice of . Every positive definite matrix factors as
with lower triangular and a positive diagonal. This is the Cholesky factorisation, and . It is the factorisation of LU factorisation with the pivots shared out evenly between the two factors. For :
Check: the top-left entry of is , the off-diagonal one , and the bottom-right . The diagonal of holds the square roots of the pivots.
To solve , solve two triangular systems: first from the top down, then from the bottom up. With , the first gives and the second . Check: .
Bowls, valleys and saddles in calculus
Near a point where a smooth function of two variables is flat, it looks like a surface , where is the symmetric matrix of its second derivatives, the Hessian. So the four tests decide what kind of point it is: positive definite means a minimum, and a negative eigenvalue means a saddle.
- has Hessian , positive definite: the origin is a minimum.
- has : the origin is a saddle.
- has determinant 0: it is only semi-definite, a valley.
Here is the Hessian, not the system matrix of signal processing.
Worked example
1. Four tests on one matrix. : eigenvalues 3 and 1; pivots 2 and 1.5; leading determinants 2 and 3; Cholesky factor as above. At : .
2. A saddle. : pivots 1 and , eigenvalues 3 and , .
3. A product. Take , whose columns are independent. Then
must be positive definite, and every test agrees: pivots 2, 1.5 and ; leading determinants 2, 3 and 4; eigenvalues 4, 1 and 1. Its Cholesky factor is
and the last row checks as . At , , so .
4. Correlated noise. The covariance matrix has leading determinants 1 and , so it is positive definite exactly when . For , .
Try these before you read the answers.
- Is positive definite? No: one eigenvalue is .
- Is ? No, only semi-definite: its determinant is 0, a valley.
- Can be negative? No: it is .
- At which does stop being a bowl? At , where reaches 0.
In signal processing · prediction equations
Parametric models and linear prediction, in the signal processing course, solves a symmetric system built from a signal’s autocorrelations. That matrix is positive semi-definite, since is an average of squares, so the four tests of this page apply. There, bold is the correlation matrix. Matrix entries count from 1, while lags count from 0.
Where you’ll meet this
Optimisation. A minimum of a smooth function has a positive definite Hessian. Newton’s method, the fast way to find a minimum, solves a linear system with that Hessian at each step, usually by Cholesky.
Covariance. A covariance matrix is for the centred data, divided by a count, so it is positive semi-definite, and positive definite unless one measurement is a fixed mix of the others.
Making correlated noise. To draw two Gaussian values with correlation 0.8, draw two independent ones and form with the of example 4: . The covariance of is .
Where this leads · covariance matrices
Covariance and correlation, in the probability and statistics course, measures how two quantities vary together. The matrix of those covariances is always positive semi-definite, by the argument of test 4 of this page.
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Energy | symmetric | |
| Positive definite | for | a bowl |
| Semi-definite | a valley allowed | |
| Eigenvalue form | : the coordinate along eigenvector | |
| Four tests | all ; all pivots ; all leading determinants ; | with independent columns |
| Cholesky | lower triangular, diagonal | |
| Solve | , then | two triangular solves |
| Second-derivative test | Hessian positive definite | a minimum |