# TEST FOR POSITIVE AND NEGATIVE DEFINITENESS We want a computationally simple test for a symmetric matrix to induce a positive

deﬁnite quadratic form. We ﬁrst treat the case of 2 × 2 matrices where the result is simple. Then, we present the conditions for n × n symmetric matrices to be positive deﬁnite. Finally, we state the corresponding condition for the symmetric matrix to be negative deﬁnite or neither. Before starting all these cases, we recall the relationship between the eigenvalues and the determinant and trace of a matrix. For a matrix A, the determinant and trace are the product and sum of the eigenvalues: det(A) = λ1 · · · λn , and tr(A) = λ1 + · · · + λn , where λ j are the n eigenvalues of A. (Here we list an eigenvalue twice if it has multiplicity two, etc.) 1. T WO BY TWO MATRICES a b be a general 2 × 2 symmetric matrix. We will see in general that the quadratic form b c for A is positive deﬁnite if and only if all the eigenvalues are positive. Since, det(A) = λ1 λ2 , it is necessary that the determinant of A be positive. On the other hand if the determinant is positive, then either (i) both eigenvalues are positive, or (ii) both eigenvalues are negative. Since tr(A) = λ1 + λ2 , if det(A) > 0 and tr(A) > 0 then both eigenvalues must be positive. We want to give this in a slightly different form that is more like what we get in the n × n case. If det(A) = ac − b2 > 0, then ac > b2 ≥ 0, and a and c must have the same sign. Thus det(A) > 0 and tr (A) > 0 is equivalent to the condition that det(A) > 0 and a > 0. Therefore, a necessary and sufﬁcient condition for the quadratic form of a symmetric 2 × 2 matrix to be positive deﬁnite is for det(A) > 0 and a > 0. We want to see the connection between the condition on A to be positive deﬁnite and completion of the squares. Let A = Q(x, y) = (x, y)A x y

= a x 2 + 2b x y + c y 2 ac − b2 2 b 2 y . y + a a This expresses the quadratic form as a sum of two squares by means of “completion of the squares”. If a > 0 and det(A) > 0, then both these coefﬁcients are positive and the form is positive deﬁnite. It can also ac − b2 be checked that a and are the pivots when A is row reduced. We can summarize these two results a in the following theorem. =a x+ Theorem 1. Let A be an 2 × 2 symmetric matrix and Q(x) = xT Ax the related quadratic form. The following conditions are equivalent: (i) Q(x) is positive deﬁnite. (ii) Both eigenvalues of A are positive. (iii) Both a x 2 and (x, y)A(x, y)T are positive deﬁnite. (iv) Both det(A) > 0 and a > 0. (v) Both the pivots obtained without row exchanges or scalar multiplications of rows are positive. (vi) By completion of the squares, Q(x) can be represented as a sum of two squares, with both positive coefﬁcients.
1

. . Then for any 1 ≤ k ≤ n. xn ) = (x1 . . the quadratic form turns into a sum of squares: Q(x) = xT Ax = yT PT APy = yT Dy n = j=1 λ j y2. . xn )UT DU(x1 . . λn . . Ak = ai. conditions (i) and (ii) are equivalent. A condition for Q to be positive deﬁnite can be given in terms of several determinants of the “principal” submatrices. We need to consider submatrices of A. This shows that (i) implies (iii). (ii) All the eigenvalues of A are positive. . . . .1≤ j≤k . we will see two conditions similar to these for the 2 × 2 case. .2 TEST FOR POSITIVE AND NEGATIVE DEFINITENESS 2. Theorem 2. The following theorem gives conditions of the quadratic form being positive deﬁnite in terms of determinants of Ak . xk . 0. Let P be the orthogonal matrix formed by putting the v j as the columns. 0)A(x1 . . . We assume A is symmetric so we can ﬁnd an orthonormal basis of eigenvectors v1 . Q(x1 . Second. Q(x) can be represented as a sum of squares. . and this can be understood in terms of completion of the squares. . . Assume Q is positive deﬁnite. . . 0)T = (x1 . . Setting x = y1 v1 + · · · + yn vn = Py. .. .n xn )2 2 + · · · + pn x n . 0. . . it is clear that Q is positive deﬁnite if and only if all the eigenvalues are positive. λn . xn )T = p1 (x1 + u 1. 0) = (x1 . . Let A be an n ×n symmetric matrix.2 x2 + · · · + u 1.n xn )2 + p2 (x2 + u 2. Proof. . The following conditions are equivalent: (i) Q(x) is positive deﬁnite. Then PT AP = D is the diagonal matrix with entries λ1 . . . . . xk . P OSITIVE DEFINITE QUADRATIC FORMS In the general n × n symmetric case. . with all positive coefﬁcients.e. j 1≤i≤k. (iv) The determinants. . . . Q is positive deﬁnite if the pivots are all positive. . . det(Ak ) > 0 for 1 ≤ k ≤ n. . j From this representation. (v) All the pivots obtained without row exchanges or scalar multiplications of rows are positive. . . . xk . xk )Ak (x1 . the quadratic form associated to Ak is positive deﬁnite. vn with eigenvalues λ1 . 0 < Q(x1 . i. (iii) For each 1 ≤ k ≤ n. . . . Let Ak be the k ×k submatrix formed by deleting the last n − k rows and last n − k columns of A. . . . (vi) By completion of the squares. . . . . . . xk ) = 0. xk )T for all (x1 . . Let A be an n × n symmetric matrix and Q(x) = xT Ax the related quadratic form. . . . .3 x3 + · · · + u 2. . 0. .

-1 2 det(A1 ) = 2 > 0. xn )UT DU(x1 . Therefore the pivots of the Ak are pivots of A. the quadratic form induced by A is positive deﬁnite. Notice that the eigenvalues of Ak are not necessarily eigenvalues of A. (Notice that these eigenvalues are not especially easy to calculate. 2 2 2 4 0 -3 1 0 0 3 0 0 1 Since the pivots on the diagonal are all positive. Also. then the quadratic form must be positive. .  A3 = A Since these are all positive. If Q(x) can be written as the sum of squares of the above form with positive coefﬁcients. When A is row reduced. . . Since A is symmetric.3  . Q(x1 . Assume (iv). . .TEST FOR POSITIVE AND NEGATIVE DEFINITENESS 3 Assume (iii). the determinant of Ak is the product of the ﬁrst k pivots. Thus. (vi) implies (i). Therefore pk = ( p1 . This proves (v). det(A2 ) = 3 > 0. expressing Q as the sum of squares with the pivots as the coefﬁcients.n xn )2 2 + · · · + pn x n . xn ) = (x1 . Example 3. and 1 3 2 4 2 xT Ax = 2(x1 − x2 )2 + (x2 − x3 )2 + x3 . Then all all the eigenvalues of Ak must be positive since (i) and (ii) are equivalent for Ak . and upper triangular matrices. xn )T = p1 (x1 + u 1. L is lower triangular with ones on the diagonal. Therefore. det(A) = 2 3/2 4/3 = 4 > 0. . pk )/( p1 . which shows that the quadratic form induced by A is positive deﬁnite. that z = Ux is a non-orthonormal change of basis that makes the quadratic form diagonal. so this shows that (iii) implies (iv). 0 -1 2 √ The eigenvalues are 2 and 2 ± 2 which are all positive. .3 x3 + · · · + u 2. pk−1 ) = det(Ak )/ det(Ak−1 > 0. . Thus. . Therefore the determinant of Ak is positive since it is the product of its eigenvalues. Note.n xn )2 + p2 (x2 + u 2. then all the coefﬁcients pi are positive. Now assume (v). diagonal. . LDU = A = AT = UT DLT . . . This is true for all k. .1 1 0 0 3 0  0 1 .     2 0 0 1 0 0 1 -1 0 2 2 A = . . pk . Thus (v) implies (vi). 2 2 3 3 The principal submatrices and their determinants are A1 = (2). Row reduction can be realized by matrix multiplication on the left by a lower triangular matrix. It can then be shown that UT = L. the quadratic form induced by A is positive deﬁnite. and U is upper diagonal with ones on the diagonal. we can write A = LDU where D is the diagonal matrix made up of the pivots.) We can row reduce to represent A as the product of lower triangular. Let  2 -1 0 A = -1 2 -1 . det(Ak ) = p1 . . . Therefore. .2 x2 + · · · + u 1. If the pivots are all positive. it also row reduces all the Ak since we do not perform any row exchanges. . A2 = 2 -1 . . for all k. we can “complete the squares”.

(v) All the pivots obtained without row exchanges or scalar multiplications of rows are negative. Norton & Company. . 1994 [2] G. W. Simon and L. xn )UT DU(x1 . N EGATIVE DEFINITE QUADRATIC FORMS The conditions for the quadratic form to be negative deﬁnite are similar. . Blume. xn )T = p1 (x1 + u 1. For condition (4). Q(x1 . (ii) All the eigenvalues of A are negative. . Q(x) can be represented as a sum of squares.2 x2 + · · · + u 1.3 x3 + · · · + u 2.. 4. Mathematics for Economists. Strang. San Diego. Let A be an n × n symmetric matrix and Q(x) = xT Ax the related quadratic form. or neither:     2 -1 -1 2 -1 -1 -1 2 -1 -1 2 1  (a) (b) -1 -1 2 -1 1 2     1 2 0 0 1 2 3 2 6 -2 0    2 5 4 (c) (d) 0 -2 5 -2 3 4 9 0 0 -2 3 R EFERENCES [1] C. . . Linear Algebra and its Applications. P ROBLEMS 1. (-1)k det(Ak ) > 0 for 1 ≤ k ≤ n.. . negative deﬁnite. (-1)n det(An ) = (-1)n det(A) > 0.n xn )2 2 + · · · + pn x n . Harcourt Brace Jovanovich. Publ. New York. det(A2 ) > 0. . . (iii) The quadratic forms associated to all the Ak are negative deﬁnite. i. xn ) = (x1 . . (vi) By completion of the squares. with all negative coefﬁcients. Theorem 4. det(A1 ) < 0. 1976. The following conditions are equivalent: (i) Q(x) is negative deﬁnite. Decide whether the following matrices are positive deﬁnite. . W. . the idea is that the product of k negative numbers has the same sign as (-1)k . .4 TEST FOR POSITIVE AND NEGATIVE DEFINITENESS 3.e. . .n xn )2 + p2 (x2 + u 2. all the eigenvalues must be negative. . . (iv) The determinants. .