Symmetric Matrices and Positive Definiteness
Total Page:16
File Type:pdf, Size:1020Kb
Symmetric matrices and positive definiteness Symmetric matrices are good – their eigenvalues are real and each has a com plete set of orthonormal eigenvectors. Positive definite matrices are even bet ter. Symmetric matrices A symmetric matrix is one for which A = AT . If a matrix has some special property (e.g. it’s a Markov matrix), its eigenvalues and eigenvectors are likely to have special properties as well. For a symmetric matrix with real number entries, the eigenvalues are real numbers and it’s possible to choose a complete set of eigenvectors that are perpendicular (or even orthonormal). If A has n independent eigenvectors we can write A = SLS−1. If A is sym metric we can write A = QLQ−1 = QLQT, where Q is an orthogonal matrix. Mathematicians call this the spectral theorem and think of the eigenvalues as the “spectrum” of the matrix. In mechanics it’s called the principal axis theorem. In addition, any matrix of the form QLQT will be symmetric. Real eigenvalues Why are the eigenvalues of a symmetric matrix real? Suppose A is symmetric and Ax = lx. Then we can conjugate to get Ax = lx. If the entries of A are real, this becomes Ax = lx. (This proves that complex eigenvalues of real valued matrices come in conjugate pairs.) Now transpose to get xT AT = xTl. Because A is symmetric we now have xT A = xT l. Multiplying both sides of this equation on the right by x gives: xT Ax = xTlx. On the other hand, we can multiply Ax = lx on the left by xT to get: xT Ax = xTlx. Comparing the two equations we see that xT lx = xTlx and, unless xT x is zero, we can conclude l = l is real. How do we know xTx 6= 0? 2 3 x1 6 x2 7 T � � 6 7 2 2 2 x x = x1 x2 · · · xn 6 . 7 = j x1j + j x2j + · · · + j xnj . 4 . 5 xn If x 6= 0 then xTx 6= 0. 1 With complex vectors, as with complex numbers, multiplying by the conju gate is often helpful. Symmetric matrices with real entries have A = AT, real eigenvalues, and perpendicular eigenvectors. If A has complex entries, then it will have real T eigenvalues and perpendicular eigenvectors if and only if A = A . (The proof of this follows the same pattern.) Projection onto eigenvectors If A = AT, we can write: A = QLQT 2 3 2 T 3 l1 q1 T 6 l2 7 6 q 7 � � 6 7 6 2 7 = q1 q2 · · · qn 6 . 7 6 . 7 4 . 5 4 . 5 T ln qn T T T = l1q1q1 + l2q2q2 + · · · + lnqnqn T The matrix qkqk is the projection matrix onto qk, so every symmetric matrix is a combination of perpendicular projection matrices. Information about eigenvalues If we know that eigenvalues are real, we can ask whether they are positive or negative. (Remember that the signs of the eigenvalues are important in solving systems of differential equations.) For very large matrices A, it’s impractical to compute eigenvalues by solv ing jA − lIj = 0. However, it’s not hard to compute the pivots, and the signs of the pivots of a symmetric matrix are the same as the signs of the eigenvalues: number of positive pivots = number of positive eigenvalues. Because the eigenvalues of A + bI are just b more than the eigenvalues of A, we can use this fact to find which eigenvalues of a symmetric matrix are greater or less than any real number b. This tells us a lot about the eigenvalues of A even if we can’t compute them directly. Positive definite matrices A positive definite matrix is a symmetric matrix A for which all eigenvalues are positive. A good way to tell if a matrix is positive definite is to check that all its pivots are positive. 2 � � 5 2 Let A = . The pivots of this matrix are 5 and (det A)/5 = 11/5. 2 3 The matrix is symmetric and its pivots (and therefore eigenvalues) are positive, so A is a positive definite matrix. Its eigenvalues are the solutions to: jA − lIj = l2 − 8l + 11 = 0, p i.e. 4 ± 5. The determinant of a positive definite matrix is always positive but the de � � −1 0 terminant of is also positive, and that matrix isn’t positive defi 0 −3 nite. If all of the subdeterminants of A are positive (determinants of the k by k matrices in the upper left corner of A, where 1 ≤ k ≤ n), then A is positive definite. The subject of positive definite matrices brings together what we’ve learned about pivots, determinants and eigenvalues of square matrices. Soon we’ll have a chance to bring together what we’ve learned in this course and apply it to non-square matrices. 3 MIT OpenCourseWare http://ocw.mit.edu 18.06SC Linear Algebra Fall 2011 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Math 2270 - Lecture 33 : Positive Definite Matrices Dylan Zwick Fall 2012 This lecture covers section 6.5 of the textbook. Today we’re going to talk about a special type of symmetric matrix, called a positive definite matrix. A positive definite matrix is a symmetric matrix with all positive eigenvalues. Note that as it’s a symmetric matrix all the eigenvalues are real, so it makes sense to talk about them being positive or negative. Now, it’s not always easy to tell if a matrix is positive definite. Quick, is this matrix? 1 2 2 1 Hard to tell just by looking at it.1 One way to tell if a matrix is positive definite is to calculate all the eigenvalues and just check to see if they’re all positive. The only problem with this is, if you’ve learned nothing else in this class, you’ve probably learned that calculating eigenvalues can be a real pain. Especially for large matrices. So, today, we’re going to learn some easier ways to tell if a matrix is positive definite. The assigned problems for this section are: Section 6.5 - 2, 3, 7, 11, 16 1It’s not. 1 1 PositiveDefiniteMatrices-WhatAreThey, and What Do They Want? I’ve already told you what a positive definite matrix is. A matrix is positive definite if it’s symmetric and all its eigenvalues are positive. The thing is, there are a lot of other equivalent ways to define a positive definite matrix. One equivalent definition can be derived using the fact that for a symmetric matrix the signs of the pivots are the signs of the eigenvalues. So, for example, if a 4 × 4 matrix has three positive pivots and one negative pivot, it will have three positive eigenvalues and one negative eigenvalue. This is proven in section 6.4 of the textbook. We can apply this fact to positive definite matrices to derive the next equivalent definition. A matrix is positive definite if it’s symmetric and all its pivots are positive. Pivots are, in general, way easier to calculate than eigenvalues. Just perform elimination and examine the diagonal terms. No problem. In practice this is usually the way you’d like to do it. For example, in that matrix from the introduction 1 2 2 1 If we perform elimination (subtract 2× row 1 from row 2) we get 1 2 0 −3 The pivots are 1 and −3. In particular, one of the pivots is −3, and so the matrix is not positive definite. Were we to calculate the eigenvalues we’d see they are 3 and −1. 2 Another way we can test for if a matrix is positive definite is we can look at its n upper left determinants. Remember from section 5.2 that the kth pivot of a matrix is — det(Ak) d k — det(Ak_l) where Ak is the upper left k x k submatrix. All the pivots will be pos itive if and only if det(Ak) > 0 for all 1 k n. So, if all upper left k x k determinants of a symmetric matrix are positive, the matrix is positive definite. Example - Is the following matrix positive definite? / 2 —1 0 —1 2 —1 \ 0 —1 2 —\ 3 - L- / L1 70 7 jcsive If x is an eigenvector of A then x 0 and Ax = Ax. In this case xTAx = AxTx. If A > 0, then as xTx> 0 we must have XTAX> 0. 3 The thing about positive definite matrices is xTAx is always positive, for an 2 In fact, this is an for any non-zero vector x, not just eigenvector. equivalent definition of a matrix being positive definite. A matrix is positive definite f xTAx > Ofor all vectors x 0. Frequently in physics the energy of a system in state x is represented as XTAX (or XTAx) and so this is frequently called the energy-based definition of a positive definite matrix. This definition makes some properties of positive definite matrices much easier to prove. Example - Prove if A and B are positive definite then so is A + B. I) dIiC fifl/-, ) Our final definition of positive definite is that a matrix A is positive definite if and only if it can be written as A = RTR, where R is a ma trix, possibly rectangular, with independent columns. Note that, using our energy-based definition, it’s easy to prove that if A = RTR then A is positive definite. 2The reason for this is that the eigenvectors of a symmetric n x n matrix span all of II, and so any vector can be represented as a linear combination of the eigertvectors.