<<

MATH 355 Supplemental Notes Positive Definite Matrices

Positive Definite Matrices

A q x (in the n real variables x x ,...,x Rn) is said to be p q “p 1 nqP

positive definite if q x 0 for each x , 0 in Rn. • p q° positive semidefinite if q x 0 for each x , 0 in Rn. • p q• negative definite if q x 0 for each x , 0 in Rn. • p q† negative semidefinite if q x 0 for each x , 0 in Rn. • p q§ indefinite if there exist u, v Rn such that q u 0 and q v 0. • P p q° p q†

To any (real) quadratic form q there is an associated real symmetric A for which q x p q“ x, Ax Ax, x xTAx. We apply the same words to characterize this , calling x y “ x y “ it positive/negative (semi)definite or indefinite depending on which of the above conditions hold for the quadratic form q x x, Ax . p q“x y Note that, while it would seem, in classifying a quadratic form q, one must investigate the behavior of q x over all x Rn, it is enough to focus on those x Rn with unit length x 1. This is p q P P } }“ because, for x , 0, x T x q x xTAx x 2 A x 2q u , p q“ “}} x x “}} p q ˆ} }˙ ˆ} }˙ where u x x is a unit vector. This means q is positive definite, if and only if q u 0 for every “ {} } p q° unit vector u Rn, positive semidefinite, if and only if q u 0 for every unit vector u Rn, and P p q• P so on.

Now, because the matrix A associated to q is symmetric, the says there exists an q ,...,q of Rn consisting of eigenvectors of A. Without loss of generality, we t 1 nu may assume the vectors of this basis have been indexed so that the corresponding (real) eigenvalues are ordered from smallest to largest

. 1 § 2 §¨¨¨§ n th The S whose j column is qj diagonalizes A:

0 0 1 ¨¨¨ » 0 2 0 fi A S⇤ST, with ⇤ ¨¨¨ . “ “ . . .. . — . . . . — — 00 — ¨¨¨ n – fl Thus, for any vector x Rn with x 1, P } }“ n q x x, Ax x, S⇤STx STx, ⇤STx ⇤STx, STx ⇤y, y y2, p q“x y “ “ “ “ x y “ j j j 1 @ D @ D @ D ÿ“ 2 MATH 355 Supplemental Notes Positive Definite Matrices where y STx, and y 1, as well (since ST is orthogonal). From this, we deduce several facts: “ } }“

Fact 1: For a real symmetric matrix A with eigenvalues , 1 § 2 §¨¨¨§ n

(i) x, Ax , for each unit vector x (i.e., x 1). 1 § x y § n } }“

(ii) Corresponding to each eigenvalue j of A, there is a unit eigenvector xj (that is, x 1 with Ax x ), and for this x , } j}“ j “ j j j q x x , Ax x , x x , x . p jq“ j j “ j j j “ j j j “ j @ D @ D @ D (iii) A is positive semidefinite if and only if each eigenvalue 0, and positive definite i↵ j • every eigenvalue is positive. Similarly, A is negative semidefinite i↵ every eigenvalue 0, and negative definite i↵ they are all negative. j § (iv) A is indefinite if and only if 0 . 1 † † n

The role of definiteness in optimization

Earlier, we said a real-valued function f of multiple real variables x x ,...,x which is smooth “p 1 nq about the point a a ,...,a is, for small enough h , well approximated by the second-degree “p 1 nq } } Taylor polynomial 1 f a h f a f a h h, H a h . (1) p ` q« p q`r p q ` 2 f p q ¨ B F As with the functions of a single variable studied in Calculus I, a necessary condition for di↵eren- tiable f to have an extremum at a is that a be a critical point, a site where the 1st derivative is zero. A di↵erentiable function f x has many first partial derivatives, and for f to have an extremum, p q they must all be zero simultaneously. This means that a is a critical point when f a 0. Thus, r p q“ in the neighborhood of a critical point a,(1) reduces to

1 f a h f a h, H a h (2) p ` q« p q` 2 f p q B F for small h . We have that h, 1 H a h is a quadratic form. If it is the case that h, H a h } } 2 f p q f p q is positive definite, then the thing added to f a on the right-hand side of (2) is positive for any @ D p q @ D nonzero vector h representing the magnitude and direction we have ”strayed” from a; this, in turn, means that f a is a local minimum of f . By similar reasoning, f a is a local maximum if H a is p q p q f p q a negative definite matrix. If H a is indefinite, then f a is neither a local max nor a local min; in f p q p q that case, x a is called a saddle point. We summarize these findings: “

3 MATH 355 Supplemental Notes Positive Definite Matrices

Theorem 1 (2nd Derivative Test for Functions of Multiple Variables): Suppose f : Rn Ñ R is a smooth function in an open neighborhood of a Rn. If a is a critical point, then P

(i) f a is a local minimum if H a is positive definite. p q f p q (ii) f a is a local maximum if H a is negative definite. p q f p q (iii) f a is a saddle point if H a is indefinite. p q f p q

Note that we have not stated a conclusion if H a is only positive or negative semidefinite. f p q We must be careful not to make too much of the approximation (2) to f around a critical point a. With any h , 0, you have strayed from the point a, and the two sides of (2) are (generally) unequal. But for a function f whose 2nd partial derivatives are continuous throughout an open neighborhood containing a, they are enough equal for small h that an upswing in the term } } 1 2 h, H a h (i.e., the e↵ects of H a being positive definite) overrides any other e↵ects in a p { q f p q f p q small@ neighborhoodD around a, and makes a the site of a local minimum.

Other tests of definiteness

The eigenvalues tell us about the definiteness, or lack thereof, of a symmetric matrix A. It can be time-consuming, however, to compute the eigenvalues of a matrix. We seek another method by which we may determine if a symmetric matrix is (semi)definite. This new method involves the calculation of upper left —i.e., determinants of submatrices emanating from the upper left corner of a matrix. Given an n-by-n (symmetric) matrix A a , we define the relevant n “pijq determinants 1, 2,...,n to be

a11 a12 a13 a11 a12 a , a a a ,..., det A . 1 “ 11 2 “ 3 “ 21 22 23 n “ p q a21 a22 a31 a32 a33 In the text, Strang notes that a symmetric matrix A is positive definite i↵ each j 0. This is ° known as Sylvester’s Criterion. In fact, the same upper left determinants can be used to tell that a matrix is negative definite. We state and prove the theorem below. But first we state and prove a fact relating the of any to its eigenvalues.

Lemma 1: Suppose ,..., are the eigenvalues of the n-by-n matrix A. The A 1 n | |“ . 1 2 ¨¨¨ n

4 MATH 355 Supplemental Notes Positive Definite Matrices

Proof: Consider the nth degree characteristic polynomial p det A I 1 n , Ap q“ p ´ q“p´q p ´ 1q¨¨¨p ´ nq where 1,...,n are the (perhaps nonreal) eigenvalues of A. Then n n A p 0 1 n 0 0 1 2n . | |“ Ap q“p´ q p ´ 1q¨¨¨p ´ nq“p´q j “ j j 1 j 1 π“ π“ ⇤

Theorem 2 (Generalized(?) Sylvester’s Criterion): Let q x xTAx be a quadratic form p q“ defined on Rn with symmetric nonsingular matrix A. We may conclude that q is

(i) positive definite if and only if 0 for each k 1,...,n. Here, is the determinant k ° “ k of the k-by-k submatrix of A comprising entries a with 1 i, j k, ij § § (ii) negative definite if and only if 1 k 0 for each k 1,...,n. p´ q k ° “ (iii) indefinite if neither of the previous two conditions is satisfied.

The proof, which you may read at your own behest (it continues on through the end of the next page), follows. No doubt it is the most technical proof that has been given in the course. Proof: Each “if and only if” statement requires a proof of two statements. We begin with the ”i↵” statement in (i), focusing first on the assertion that 0 for each k k ° implies A is positive definite. The proof is by induction on n, the size of the matrix. When n 1 (so the matrix has just one entry, a), then trivially a 0 implies “ 1 “ ° xax ax2 0, for all real x , 0. “ ° For our induction hypothesis, assume A is n-by-n for some n 1, and that the claim ° holds for each quadratic form defined on Rn 1. Now, since 0 , the ´ † n “ 1 2 ¨¨¨ n eigenvalues of A are all nonzero. If they are all positive, then we know q x Ax, x is p q“x y positive definite. So, let us assume that some eigenvalue 0. But for their product to i † be positive, there must be an even number of negative eigenvalues, so let j be another

negative eigenvalue, and take vi, vj to be eigenvectors of unit length corresponding

to i, j, respectively. We may assume vi and vj are orthogonal to each other, either

because i , j, or because Gram-Schmidt may be used to select orthogonal basis vectors in an eigenspace. Let W span v , v , a plane in Rn. Given any y W, with “ pt i juq P y y v y v , we have “ i i ` j j q y Ay, y y v y v , y v y v p q“x y “ i i i ` j j j i i ` j j y2 v , v @ y y v , v y y v ,Dv y2 v , v “ i i x i iy ` j i j j i ` i i j i j ` j j j j y2 y2 0. @ D @ D @ D “ i i ` j j †

5 MATH 355 Supplemental Notes Positive Definite Matrices

n 1 Thus, q is negative for all nonzero y W. Let q : R ´ R be the restriction of P ˚ Ñ n 1 q to R ´ , so that q x1,...,xn 1 : q x1,...,xn 1, 0 . Along with that, let A ˚p ´ q “ p ´ q ˚ “ aij 1 i,j n 1. Then p q § § ´

x1 . q x1,...,xn 1 q x1,...,xn 1, 0 x1 xn 1 A » . fi . ˚p ´ q“ p ´ q“ ¨¨¨ ´ ˚ ” ı —xn 1 — ´ – fl By assumption, 1,...,n 1 are all positive, so using the induction hypothesis, we ´ n 1 get that q is positive definite on R ´ . But the n 1 -dimensional hyperplane in ˚ p ´ q n R consisting of vectors x x1,...,xn 1, 0 and the plane W have at least a line in “p ´ q common, and we have shown that q v for a nonzero vector v from that line is both p q strictly positive and strictly negative. Ñ– To prove the converse statement of (i), suppose q is positive definite, and let m 0 ° be the minimum value of q over the set x Rn : x 1 . Similar to above, we take t P } }“ u k k Ak aij 1 i,j k and define a function qk : R R as the ”restriction of q to R ”, in the “p q § § Ñ sense that

x1 . qk x1,...,xk q x1,...,xk, 0,...,0 x1 xk Ak » . fi . p q“ p q“ ¨¨¨ ” ı —xk — – fl Let µ ,...,µ be the eigenvalues of A . We know there is an x Rk with x 1 such 1 k k P } }“ that q x µ . It follow from q x q x, 0 that each µ m. Thus, by Lemma 1, kp q“ i kp q“ p q i • A µ µ mk 0. k “| k|“ 1 ¨¨¨ k • ° To prove (ii), define q x q x , so that negative definiteness of q is equivalent ˚p q“´p q to positive definiteness of q˚. By part (i), q˚ is positive definite if and only if each 0 A 1 k A 1 k . † k˚ “|´ k|“p´ q | k|“p´ q k To prove (iii), note first that 0 , means every eigenvalue is nonzero. If n “ 1 ¨¨¨ n all were positive, then part (a) shows each 0; if all were negative, then part (b) k ° implies each 1 k 0. since neither of these conditions holds by supposition, it p´ q k ° must be that A has both positive and negative eigenvalues, and is nondefinite. ⇤

Example 1:

Classify each of the nonsingular symmetric matrices A and B given below according to its type of definiteness.

31 5 3 1121 ´ { »15 2 0fi A 1 2 112 , B . “ » { ´ { fi “ —5 2 10 3 1121 — — { —3 0 3 14 – fl — – fl 6 MATH 355 Supplemental Notes Positive Definite Matrices

For A, we have

112 3 5 1 1, 2 ´ { , 3 A . “´ “ 1 2 1 “ 4 “| |“2 { ´ Thus, while A is nonsingular, neither of the conditions (i) nor (ii) of Theorem 2 hold, making A indefinite.

For B, we have

31 5 31 1 3, 2 14, 3 15 2 23, 4 B 196. “ “ 15“ “ “ “||“ 5 2 10 Since each of these subdeterminants is positive, B is positive definite.

One more result, equivalent to positive definiteness, seems pertinent.

Theorem 3: A symmetric matrix A is positive definite if and only if A BTB for some “ matrix B whose columns are all linearly independent.

Proof: Suppose, first, that A BTB, where the columns of B are linearly independent. “ Due to the of its columns, Null BTB Null B 0 , showing p q“ p q“t u that A is nonsingular. For x , 0, we have

Ax, x BTBx, x Bx, Bx Bx 2 0, x y “ “ x y “} } ° @ D since x, being nonzero, is not in Null B . p q The converse is harder to prove. Here, I rely on another factorization, called the Cholesky factorization, which exists for any real symmetric matrix. This factorization is A RTR, which gives the result with B R. We note, in particular, that were the “ “ columns of B not linearly independent, then those in A RTR would not be either. ⇤ “

7