BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

Symmetric matrices and positive definiteness

A real symmetric matrix (A = Aᵀ) has real eigenvalues, and its eigenvectors can be chosen perpendicular (with a repeated eigenvalue there is a whole plane to choose from), and there is a full set of them. Made into unit vectors they form an orthogonal matrix Q, so A = SΛS⁻¹ becomes A = QΛQᵀ: the spectral theorem, or in mechanics the principal axis theorem. Why real: from Ax = λx, conjugate and transpose to get x̄ᵀA = λ̄x̄ᵀ (this uses A = Aᵀ and A real), multiply by x and compare with x̄ᵀAx = λx̄ᵀx; since x̄ᵀx = |x₁|² + ⋯ + |xₙ|² > 0, λ = λ̄. For complex matrices the good ones (real eigenvalues, perpendicular eigenvectors) have Āᵀ = A. Written out, A = λ₁q₁q₁ᵀ + λ₂q₂q₂ᵀ + ⋯: a combination of perpendicular projection matrices. For a symmetric matrix the signs of the pivots are the signs of the eigenvalues: as many positive pivots as positive eigenvalues, which is a safe way to count them. Positive definite matrices are the symmetric ones with all eigenvalues positive, equivalently all pivots positive, equivalently all upper-left sub-determinants positive. Strang's example (5 2; 2 3) has pivots 5 and 11/5, sub-determinants 5 and 11, and eigenvalues 4 ± √5; (−1 0; 0 −3) has a positive determinant but is not positive definite.

You need this first

Full reading path (23 pages)
  1. Vectors (8.01)
  2. Vectors and the dot product (18.02)
  3. Determinants and the cross product (18.02)
  4. Planes through three points, and matrices (18.02)
  5. Equations of planes and square systems (18.02)
  6. The geometry of linear equations (18.06)
  7. Elimination with matrices (18.06)
  8. Matrix multiplication and inverse matrices (18.06)
  9. Factorization into A = LU (18.06)
  10. Transposes, permutations and vector spaces (18.06)
  11. Properties of determinants (18.06)
  12. Determinant formulas and cofactors (18.06)
  13. Cramer's rule, the inverse matrix and volume (18.06)
  14. Column space and nullspace (18.06)
  15. Eigenvalues and eigenvectors (18.06)
  16. Diagonalisation and powers of A (18.06)
  17. Solving Ax = 0: pivot variables and special solutions (18.06)
  18. Solving Ax = b: the complete solution (18.06)
  19. Independence, basis and dimension (18.06)
  20. The four fundamental subspaces (18.06)
  21. Orthogonal vectors and subspaces (18.06)
  22. Projections onto subspaces (18.06)
  23. Projection matrices and least squares (18.06)
On this page · 7 sections
  1. Real eigenvalues, perpendicular eigenvectors
  2. The spectral theorem
  3. Why the eigenvalues are real
  4. A sum of projections
  5. Signs of pivots and eigenvalues
  6. Positive definite matrices
  7. Summary

Symmetric matrices, A=ATA = A^T, are "the most important class" of matrices (transcript, p. 1). Having learned to look at a matrix through its eigenvalues and eigenvectors, the question for each special kind is what it says about them, as Markov matrices always have eigenvalue 1 (p. 1).

Real eigenvalues, perpendicular eigenvectors#

The two main facts for a real symmetric matrix (p. 1):

  1. the eigenvalues are real (so the complex eigenvalues of rotations cannot happen);
  2. the eigenvectors are perpendicular (orthogonal).

Strang proves the first and leaves the second to the book (p. 1). The second needs care. For the identity every vector is an eigenvector, so "are perpendicular" really means can be chosen perpendicular (pp. 1–2). When the eigenvalues are all different, each has one line of eigenvectors and the lines are perpendicular; when one is repeated there is a whole plane of eigenvectors, in which perpendicular ones can be chosen. There is also a full set of them (p. 2).

The spectral theorem#

The usual diagonalisation is A=SΛS−1A = S\Lambda S^{-1} (p. 2). For a symmetric matrix the eigenvectors can be scaled to length one as well as made perpendicular: orthonormal. So the eigenvector matrix deserves the letter QQ, and for orthonormal columns Q−1=QTQ^{-1} = Q^T (p. 3):

Spectral theorem
A=QΛQ−1=QΛQTA = Q\Lambda Q^{-1} = Q\Lambda Q^T
In words

capital A equals capital Q capital lambda capital Q to the power minus 1 equals capital Q capital lambda capital Q ^ capital T

This is "one of the famous theorems of linear algebra": every symmetric matrix factors as an orthogonal matrix times a diagonal matrix times its transpose (p. 3). Conversely, any such product is symmetric, since transposing QΛQTQ\Lambda Q^T gives it back (pp. 3–4). The name comes from the spectrum, the set of eigenvalues, as light is broken into pure colours; in mechanics it is the principal axis theorem: along the right axes a material's directions do not couple (p. 4).

Why the eigenvalues are real#

Start from Ax=λxAx = \lambda x, allowing λ\lambda and xx to be complex (p. 4). Taking the complex conjugate of everything (change a+iba + ib to a−iba - ib; products conjugate factor by factor) and using that AA is real gives Axˉ=λˉxˉA\bar x = \bar\lambda\bar x (p. 5). This already shows that complex eigenvalues of a real matrix come in pairs λ\lambda, λˉ\bar\lambda (p. 5). Now transpose, and use symmetry, AT=AA^T = A (p. 5):

Conjugate and transpose
xˉTAT=xˉTλˉ⇒xˉTA=λˉ xˉT\bar x^TA^T = \bar x^T\bar\lambda \quad\Rightarrow\quad \bar x^TA = \bar\lambda\,\bar x^T
In words

x bar ^ capital T capital A ^ capital T equals x bar ^ capital T lambda bar which gives x bar ^ capital T capital A equals lambda bar x bar ^ capital T

Multiply this on the right by xx, and multiply the original equation on the left by xˉT\bar x^T (pp. 5–6). The left sides are the same, so the right sides are equal (p. 7):

The comparison
xˉTAx=λ xˉTxandxˉTAx=λˉ xˉTx⇒λ=λˉ\bar x^TAx = \lambda\,\bar x^Tx \quad\text{and}\quad \bar x^TAx = \bar\lambda\,\bar x^Tx \quad\Rightarrow\quad \lambda = \bar\lambda
In words

x bar ^ capital T capital A x equals lambda x bar ^ capital T x and x bar ^ capital T capital A x equals lambda bar x bar ^ capital T x which gives lambda equals lambda bar

A number equal to its own conjugate has no imaginary part: λ\lambda is real (p. 7). The cancellation needs xˉTx≠0\bar x^Tx \neq 0. For a complex vector this is the right quantity, the length squared (pp. 7–9):

Length squared of a complex vector
xˉTx=xˉ1x1+xˉ2x2+⋯+xˉnxn,(a−ib)(a+ib)=a2+b2\bar x^Tx = \bar x_1x_1 + \bar x_2x_2 + \cdots + \bar x_nx_n, \qquad (a - ib)(a + ib) = a^2 + b^2
In words

x bar ^ capital T x equals x one bar x one plus x two bar x two plus and so on plus x sub n bar x sub n, the quantity a minus i b, the quantity a plus i b, equals a squared plus b squared

The imaginary parts iabiab and −iab-iab cancel, so the sum is positive for every x≠0x \neq 0 (pp. 8–9). Plain xTxx^Tx would not do: "multiply numbers by their conjugates" (p. 9). The next lecture builds on this (p. 9).

Complex matrices (pp. 9–10). Where was symmetry used? If AA were complex, the step above would have produced AˉT\bar A^T. The proof works whenever AˉT=A\bar A^T = A. So the "good" matrices, with real eigenvalues and perpendicular eigenvectors, are those with A=ATA = A^T if real and AˉT=A\bar A^T = A if complex; nearly all applications have real matrices, where this is just symmetry (p. 10).

A sum of projections#

Multiply out QΛQTQ\Lambda Q^T as columns times rows (p. 11):

Spectral sum
A=λ1q1q1T+λ2q2q2T+⋯+λnqnqnTA = \lambda_1q_1q_1^T + \lambda_2q_2q_2^T + \cdots + \lambda_nq_nq_n^T
In words

capital A equals lambda one q one q one ^ capital T plus lambda two q two q two ^ capital T plus and so on plus lambda n q n q n ^ capital T

Each qiqiTq_iq_i^T, a unit column times its row, is a projection matrix (the aaT/aTaaa^T/a^Ta of chapter 4 with aTa=1a^Ta = 1): it is symmetric, and its square is itself because qiTqi=1q_i^Tq_i = 1 (p. 12). Every symmetric matrix is a combination of mutually perpendicular projection matrices, another way to state the spectral theorem (p. 12).

Signs of pivots and eigenvalues#

Once the eigenvalues are known to be real, the next question is their signs, which decide stability for differential equations (pp. 12–13). Computing all 50 eigenvalues of a 50×5050 \times 50 matrix is a real job; the textbook method, the roots of det⁡(A−λI)\det(A - \lambda I), is a very bad way numerically, fine for 2×22 \times 2 and 3×33 \times 3 but highly unreliable at that size (p. 13). Strang recalls that some 20 or 30 years earlier nobody really knew how to do it (p. 13). Pivots, though, are computed safely and quickly, and for symmetric matrices (p. 14):

Pivots and eigenvalues
number of positive pivots=number of positive eigenvalues(A=AT)\text{number of positive pivots} = \text{number of positive eigenvalues} \qquad (A = A^T)
In words

number of positive pivots equals number of positive eigenvalues ( capital A equals capital A ^ capital T )

If 28 of 50 pivots are positive, 28 eigenvalues are positive (p. 14). Shifting to A−7IA - 7I moves every eigenvalue down by 7, so its pivots count the eigenvalues above 7: a start on computing eigenvalues (p. 14). The pivots are not the eigenvalues. Their products agree, since both give det⁡A\det A (the pivots when there are no row exchanges), but that says nothing about the individual numbers; the sign rule does (p. 14).

Positive definite matrices#

Positive definite matrices are an excellent subclass of the symmetric ones, the next section of the book (p. 15). They are symmetric with all eigenvalues positive, and by the sign rule, all pivots positive, which is the good way to test (pp. 15–16). Strang's example (pp. 15–16):

Strang's example
A=(5223):pivots 5, 115;λ2−8λ+11=0, λ=4±5A = \begin{pmatrix} 5 & 2 \\ 2 & 3 \end{pmatrix}: \quad \text{pivots } 5,\ \tfrac{11}{5}; \qquad \lambda^2 - 8\lambda + 11 = 0,\ \lambda = 4 \pm \sqrt5
In words

capital A equals 5 2; 2 3 : pivots 5, 11 over 5; lambda squared minus 8 lambda plus 11 equals 0, lambda equals 4 plus or minus the square root of 5

(Strang reads the matrix aloud as "five three two two": diagonal 5 and 3, as the trace 8 confirms, and off-diagonal 2, as the determinant 15−4=1115 - 4 = 11 confirms.) The second pivot is det⁡A/5=11/5\det A/5 = 11/5, because the product of the pivots is the determinant (p. 16). Both eigenvalues are positive, as 4−5≈1.764 - \sqrt5 \approx 1.76 shows, but the pivots were simpler (p. 16).

The determinant is positive too, but that alone is not enough: (−100−3)\begin{pmatrix} -1 & 0 \\ 0 & -3 \end{pmatrix} has determinant 33, yet its pivots and eigenvalues are −1-1 and −3-3 (p. 17). The test needs all the upper-left sub-determinants, starting from the 1×11 \times 1 in the corner (pp. 17–18):

Determinant test
A=AT is positive definite if and only if all n upper-left determinants are positiveA = A^T \text{ is positive definite if and only if all } n \text{ upper-left determinants are positive}
In words

capital A equals capital A ^ capital T is positive definite if and only if all n upper-left determinants are positive

The example passes (5>05 > 0, 11>011 > 0); the diagonal one fails at −1-1 (p. 18). Pivots from the first week, determinants from the middle and eigenvalues from the last weeks come together here, for symmetric matrices (p. 18). The climax of the course, Strang says, will bring them together for n×nn \times n matrices that need not be symmetric (p. 18).

Worked example

A symmetric matrix taken apart

(a) Find the spectral factorisation QΛQTQ\Lambda Q^T of A=(6229)A = \begin{pmatrix} 6 & 2 \\ 2 & 9 \end{pmatrix} and write AA as a sum of projections. Check it by the pivots. (b) How many positive eigenvalues does C=(1331)C = \begin{pmatrix} 1 & 3 \\ 3 & 1 \end{pmatrix} have? Answer by pivots, then check.

(a) Eigenvalues and eigenvectors

Trace 1515, determinant 54−4=5054 - 4 = 50: λ2−15λ+50=(λ−10)(λ−5)\lambda^2 - 15\lambda + 50 = (\lambda - 10)(\lambda - 5). A−10I=(−422−1)A - 10I = \begin{pmatrix} -4 & 2 \\ 2 & -1 \end{pmatrix} gives (1,2)(1, 2); A−5I=(1224)A - 5I = \begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix} gives (2,−1)(2, -1). They are perpendicular; normalised, q1=(1,2)/5q_1 = (1, 2)/\sqrt5 and q2=(2,−1)/5q_2 = (2, -1)/\sqrt5. So Q=15(122−1)Q = \frac{1}{\sqrt5}\begin{pmatrix} 1 & 2 \\ 2 & -1 \end{pmatrix} and Λ=(10005)\Lambda = \begin{pmatrix} 10 & 0 \\ 0 & 5 \end{pmatrix}.

(a) Sum of projections

10q1q1T=105(1224)=(2448)10q_1q_1^T = \frac{10}{5}\begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix} = \begin{pmatrix} 2 & 4 \\ 4 & 8 \end{pmatrix} and 5q2q2T=(4−2−21)5q_2q_2^T = \begin{pmatrix} 4 & -2 \\ -2 & 1 \end{pmatrix}. Their sum is (6229)=A\begin{pmatrix} 6 & 2 \\ 2 & 9 \end{pmatrix} = A. The pivots are 66 and 50/6=25/350/6 = 25/3, both positive, like both eigenvalues: AA is positive definite (sub-determinants 66 and 5050).

(b) Counting by pivots

Elimination: first pivot 11, second 1−3⋅3=−81 - 3 \cdot 3 = -8. One positive and one negative pivot, so one positive eigenvalue. Check: λ2−2λ−8=(λ−4)(λ+2)\lambda^2 - 2\lambda - 8 = (\lambda - 4)(\lambda + 2), eigenvalues 44 and −2-2; the product of the pivots, −8-8, is their product.

Summary#

Symbols on this page

Show the 37 symbols used here
λ\lambda lambda.
An eigenvalue of A. Say it: “lambda”.
Λ\Lambda capital lambda.
The diagonal matrix of the eigenvalues. Say it: “capital lambda”.
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
≠\neq not equal.
Is not equal to. Say it: “is not equal to”.
⇒\Rightarrow implies.
Implies: what follows is a consequence of what came before. Say it: “which gives”.
±\pm plus or minus.
Plus or minus: both signs, or an uncertainty (67.3 ± 1.2). Say it: “plus or minus”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
∑\sum sum.
Sum: add up the terms over the range written below and above. Say it: “the sum of”.
det⁡\det determinant.
Determinant of a matrix. Say it: “the determinant of”.
ρˉ\bar\rho bar.
A mean (average) value, such as ρ̄; in 8.902 also a smoothed field (δ̄). Say it: “bar”.
aa a.
The real part of a complex number a + ib. Say it: “a”.
TT T.
As a superscript: the transpose. Say it: “capital T”.
xx x.
An eigenvector, possibly complex; x̄ is its complex conjugate. Say it: “x”.
ii i.
The imaginary unit, i² = −1; as a subscript, an index. Say it: “i”.
nn n.
The size of the matrix. Say it: “n”.
QQ Q.
The orthogonal matrix of orthonormal eigenvectors: A = QΛQᵀ. Say it: “capital Q”.
AA A.
A real symmetric matrix (A = Aᵀ); in the examples, the matrix with rows (5, 2), (2, 3) and the worked example's matrix with rows (6, 2), (2, 9). Say it: “capital A”.
CC C.
The worked example's matrix with rows (1, 3), (3, 1). Say it: “C”.
bb b.
The imaginary part of a complex number a + ib. Say it: “b”.
LL L.
The lower triangular factor in A = LU. Say it: “L”.
RR R.
The triangular factor in A = QR. Say it: “capital R”.
SS S.
The eigenvector matrix in the usual diagonalisation A = SΛS⁻¹. Say it: “S”.
x1x_{1} x 1.
The first component of the eigenvector x. Say it: “x one”.
x2x_{2} x 2.
The second component of x. Say it: “x two”.
UU U.
The upper triangular factor in A = LU. Say it: “U”.
xnx_{n} x n.
The last component of x. Say it: “x sub n”.
II I.
The identity matrix. Say it: “capital I”.
xix_{i} x i.
A component of x. Say it: “x sub i”.
q1q_{1} q one.
The first orthonormal vector. Say it: “q one”.
q2q_{2} q two.
The second orthonormal vector. Say it: “q two”.
qiq_{i} q sub i.
The i-th orthonormal vector. Say it: “q sub i”.
λ1\lambda_{1} lambda one.
The first eigenvalue. Say it: “lambda one”.
λ2\lambda_{2} lambda two.
The second eigenvalue. Say it: “lambda two”.
λi\lambda_{i} lambda i.
Any one of the eigenvalues. Say it: “lambda i”.
qnq_{n} q n.
The last orthonormal vector. Say it: “q n”.
λn\lambda_{n} lambda n.
The last eigenvalue. Say it: “lambda n”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 37 words used here

New here

spectrum.
The set of eigenvalues of a matrix.
principal axis theorem.
The theorem that every real symmetric matrix has real eigenvalues and perpendicular eigenvectors, so a turn of the axes makes it diagonal.
positive definite.
Of a symmetric matrix or quadratic form: always giving a positive value for any nonzero input; equivalently, all its eigenvalues are positive.

Also used

symmetric.
Unchanged by some swap, reflection or turn; for an expression in two quantities, unchanged when they are exchanged. Explained in Introduction to Fourier series.
matrix.
A rectangular table of numbers, which acts on vectors to give new ones and so describes a linear change of coordinates. Explained in Planes through three points, and matrices.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
eigenvalue.
A number λ for which a matrix turns some non-zero vector into λ times that vector, only stretching or shrinking it. Explained in Linear systems with constant coefficients: eigenvalues and eigenvectors.
eigenvector.
A non-zero vector that a matrix only stretches or shrinks without turning: multiplying it by the matrix gives a number times the same vector. Explained in Linear systems with constant coefficients: eigenvalues and eigenvectors.
Markov matrix.
A square matrix with no negative entries whose columns each add up to one; it moves probabilities or populations from one step to the next. Explained in Markov matrices and Fourier series.
perpendicular.
At right angles to a line, a surface or another direction. Explained in Inclined planes.
orthogonal.
At right angles; more generally, of two vectors or functions, having a dot product, or an integral of their product, of zero. Explained in Introduction to Fourier series.
vector.
A list of numbers written as a column, or more generally anything that can be added and multiplied by numbers. Explained in Orthogonal vectors and subspaces.
diagonalise.
To rewrite a matrix in a basis of its eigenvectors, where it becomes diagonal, with its eigenvalues down the diagonal. Explained in Diagonalisation and powers of A.
orthonormal.
Of a set of vectors: each has length one and each is at right angles to all the others. Explained in Projection matrices and least squares.
theorem.
A statement that has been proved true, step by step, from definitions and earlier results. Explained in Limits and continuity.
linear.
Of a map, operator or equation: respecting sums and multiples, so that L(au + bv) = aL(u) + bL(v). Explained in The geometry of linear equations.
orthogonal matrix.
A square matrix whose columns are perpendicular unit vectors; it rotates or reflects without changing lengths, and its inverse is its transpose. Explained in Orthogonal matrices and Gram–Schmidt.
diagonal.
In a square matrix, the entries running from the top left corner to the bottom right; a diagonal matrix has zeros everywhere else. Explained in The four fundamental subspaces.
transpose.
The matrix made by writing the rows of a matrix as columns, flipping it across its main diagonal. Explained in Planes through three points, and matrices.
complex conjugate.
The complex number with the sign of its imaginary part reversed: the conjugate of a + ib is a − ib. Explained in Complex numbers and complex exponentials.
symmetry.
A change, such as a reflection, a rotation or a shift, that leaves something looking exactly the same. Explained in The derivative: slope of the tangent line and rate of change.
proof.
A chain of reasoning showing beyond doubt that a statement follows from definitions and results already known. Explained in Limits and continuity.
projection matrix.
A matrix that sends every vector to its projection onto a fixed line, plane or subspace. Explained in Projection matrices and least squares.
spectral theorem.
The theorem that a symmetric (or Hermitian) matrix has real eigenvalues and a full set of perpendicular eigenvectors. Explained in Repeated and complex eigenvalues.
stability.
Whether a state or solution returns after a small disturbance (stable) or moves further and further from it (unstable). Explained in Autonomous equations, critical points and stability.
differential equation.
An equation that links an unknown function to its derivatives; solving it means finding the function. Explained in Circular motion dynamics: worked problems.
pivot.
In elimination, the first nonzero number in a row, used to clear out the entries below it. Explained in Positive definite matrices and minima.
row exchange.
Swapping two rows of a matrix, needed in elimination when a zero sits where a pivot should be.
trace.
The sum of the numbers on the main diagonal of a square matrix; it equals the sum of the eigenvalues. Explained in Linear systems with constant coefficients: eigenvalues and eigenvectors.
determinant.
A single number worked out from a square array of numbers (a matrix), which measures how the matrix stretches areas or volumes. Explained in Determinants and the cross product.
factorization.
Writing something, such as a number, a matrix or an operator, as a product of simpler pieces. Explained in Factorization into A = LU.
projection.
The shadow of a vector on a line or plane: the nearest point to it there, found by dropping a perpendicular. Explained in Projections onto subspaces.
elimination.
Solving equations by subtracting multiples of one from another until each unknown can be found in turn. Explained in The geometry of linear equations.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.
conversely.
Turning the statement round: what follows is the same idea seen from the other side.
numerically.
In terms of actual numbers rather than symbols; often worked out step by step, by computer, instead of from an exact formula.
analogue.
Something that behaves like something else in an important way.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

Pages that build on this

Practise

Check your understanding

  1. Which factorisation does every real symmetric matrix have?
  2. In the proof that λ\lambda is real, why may we cancel xˉTx\bar x^Tx?
  3. A 4×44 \times 4 symmetric matrix has pivots 3,−1,2,53, -1, 2, 5. How many of its eigenvalues are positive?
  4. Why is (−100−3)\begin{pmatrix} -1 & 0 \\ 0 & -3 \end{pmatrix} not positive definite, although its determinant is positive?
0 of 4 answered

Flashcards

1 / 5