14.6  Definiteness and Second Derivatives

Chapter 13 studied positive definite matrices at length, and the previous section showed that the signature is what congruence remembers. Putting the two together costs almost nothing and buys two things: a vocabulary that covers the forms Chapter 13 had no name for, the indefinite and the semidefinite ones, and the classical application that made quadratic forms worth studying in the first place. Nothing from Chapter 13 is reproved here. The field is R throughout, since none of the five words below means anything without an order.

Throughout, V is a finite-dimensional real vector space, β is a symmetric bilinear form on V (Definition 14.3.1), q(v)=β(v,v) is its quadratic form (Definition 14.3.2), and A=[β]BB is its matrix in a basis B (Definition 14.1.2), a real symmetric matrix.

14.6.1. Five words for the sign of a form

Chapter 13 named two of the possible behaviors of q: never negative, and always positive away from 0. There are three more, and the missing ones are not exotic. The form q(x1,x2)=x12−x22 is positive at e1, negative at e2, and nothing in Chapter 13’s vocabulary describes it.

A form is definite when q has one strict sign, semidefinite when it has one sign but is allowed to vanish, and indefinite when it has both signs.

Definition 14.6.1 (Definiteness of a Real Symmetric Form)

Let β be a symmetric bilinear form on a real vector space V, with quadratic form q. Then β is:

  • (a) positive definite if q(v)>0 for every non-zero v∈V;
  • (b) positive semidefinite if q(v)≥0 for every v∈V;
  • (c) negative definite if q(v)<0 for every non-zero v∈V;
  • (d) negative semidefinite if q(v)≤0 for every v∈V;
  • (e) indefinite if there exist u,w∈V with q(u)>0 and q(w)<0.

The same five words apply to a real symmetric matrix A, through the form β(x,y)=x⊤Ay on Rn.

The small words carry the weight. In (a) and (c) the inequality is strict and the vector must be non-zero; in (b) and (d) it is weak and v=0 is allowed, where q(0)=0 makes the condition automatic. Definite implies semidefinite of the same sign. Clause (e) is not the negation of (b): q(x1,x2)=−x12 is neither positive semidefinite nor indefinite. For matrices, (a) and (b) are Definition 13.1.1 restricted to F=R, so A≻0 and A⪰0 keep their meanings, and the negative versions are the positive ones for −A.

Four examples on R2, all diagonal so that q can be read off Eq. 14.4.1: x12+x22 is positive definite; x12 is positive semidefinite but not definite, since it vanishes at e2≠0; −x12−x22 is negative definite; x12−x22 is indefinite. The zero form is the degenerate case, satisfying (b) and (d) and nothing else — which is why the five classes overlap rather than partition. Changing one sign in the third gives the non-example −x12+x22: it is no longer negative semidefinite, and the clause that fails is (d) at v=e2, where q=1>0.

Now the reading through the signature, which makes all five conditions into statements about three integers.

Theorem 14.6.1 (Definiteness Is the Signature)

Let β be a symmetric bilinear form on a real vector space V of dimension n, with inertia (n+,n−,n0) (Definition 14.5.1). Then:

  • (a) β is positive definite ⟺ (n+,n−,n0)=(n,0,0);
  • (b) β is positive semidefinite ⟺ n−=0;
  • (c) β is negative definite ⟺ (n+,n−,n0)=(0,n,0);
  • (d) β is negative semidefinite ⟺ n+=0;
  • (e) β is indefinite ⟺ n+>0 and n−>0.

Idea. Fix an orthogonal basis. Then q is ∑idici2 with no cross terms, and each of the five conditions becomes a visible condition on the signs of the di: plugging in a basis vector reads off one di, and a general v mixes the di with non-negative weights. Sylvester’s law is what lets us fix one basis and still be talking about β.

Proof. By Theorem 14.4.2 there is an orthogonal basis B=(v1,…,vn) for β; put di=q(vi). By Theorem 14.5.1 the numbers of positive, negative and zero di are n+, n− and n0, whichever orthogonal basis is used. For v=∑icivi, Eq. 14.4.1 gives q(v)=∑i=1ndici2.

  • (b) (⇒) If some dj<0 then q(vj)=dj<0, so β is not positive semidefinite. (⇐) If no di is negative then every term dici2 is ≥0, so q(v)≥0.

  • (c) (⇒) A positive definite β is positive semidefinite, so n−=0 by (b); and if some dj=0 then q(vj)=0 with vj≠0, a contradiction. Hence n0=0 and n+=n. (⇐) If every di>0 and v≠0, some cj≠0, so q(v)≥djcj2>0, the other terms being ≥0.

  • (d) and (d) follow by applying (a) and (b) to −β, whose diagonal entries are −di and whose inertia is therefore (n−,n+,n0).

  • (e) (⇒) Suppose q(u)>0 and q(w)<0. Then β is neither positive semidefinite nor negative semidefinite, so n−>0 by (b) and n+>0 by (d). (⇐) If n+>0 and n−>0, some di>0 and some dj<0, and the basis vectors vi,vj are the required u,w. This proves the theorem.

So the five words sort the 12(n+1)(n+2) congruence classes of Corollary 14.5.2 into named families, and every one of them is decided by counting signs. Two of these five verdicts were already settled in Chapter 13 by other means, and it is worth putting the tests side by side.

Proposition 14.6.2 (Chapter 13’s Tests, in the Language of Forms)

Let β be a symmetric bilinear form on an n-dimensional real vector space, A=[β]BB its matrix in any basis, and Ak the top-left k×k corner of A. Then:

  • (a) β is positive definite ⟺ every eigenvalue of A is positive ⟺ detAk>0 for k=1,…,n;
  • (b) β is negative definite ⟺ every eigenvalue of A is negative ⟺ (−1)kdetAk>0 for k=1,…,n.

Proof.

  • (a) By Definition 14.1.2 and Theorem 14.1.1, q(v)=x⊤Ax where x=[v]B, and v≠0 exactly when x≠0. So β is positive definite exactly when A≻0, and the two stated tests are Theorem 13.1.5 (b) and (d), the second being Sylvester’s criterion.

  • (b) Apply (a) to −β, whose matrix is −A. The eigenvalues of −A are the negatives of those of A, and (−A)k=−Ak has det(−Ak)=(−1)kdetAk, since scaling each of the k rows by −1 multiplies the determinant by −1 once per row (Theorem 7.5.1 (b)). This proves the proposition.

The eigenvalue test is the one to think with, the minor test the one to compute with; cheapest of all is the symmetric elimination of Section 4, which returns the whole signature rather than a verdict. Nothing is said about the semidefinite cases on purpose: Sylvester’s criterion has no weak version, as Chapter 13 showed with diag(0,−1), whose leading minors are both 0.

Quick check. A real symmetric A∈M3(R) has detA1=−2, detA2=5, detA3=−1. What is its definiteness?

Solution. Negative definite. The signs alternate starting with a negative one, so (−1)kdetAk>0 for k=1,2,3: indeed (−1)(−2)=2>0, (+1)(5)=5>0, (−1)(−1)=1>0. By Proposition 14.6.2 (b) the form is negative definite, and by Theorem 14.6.1 (c) its inertia is (0,3,0). Note that detA3=detA<0 on its own would have been no evidence at all.

14.6.2. The second-derivative test

Here is the use. A differentiable function f:Rn→R is constant to first order at a critical point, so whether the point is a minimum, a maximum or neither is decided — usually — by the second-order behavior. That behavior is a quadratic form, and Theorem 14.6.1 decides it. The linear algebra is the whole content; what has to be imported is one theorem of analysis, and we state it rather than hide it.

Definition 14.6.2 (Hessian)

Let f be a real-valued function on an open set U⊆Rn, twice continuously differentiable on U, and let a∈U. The Hessian of f at a is the matrix Hf(a)∈Mn(R),(Hf(a))ij=∂2f∂xi∂xj(a). A point a∈U with ∇f(a)=0 is a critical point of f.

Two facts about Hf(a) are needed, and neither is linear algebra. They are exactly the analysis this book imports, so we set them out as assumptions rather than let them pass unnoticed. Let f be twice continuously differentiable on an open U⊆Rn and let a∈U.

  • (A1) (Symmetry of the second derivatives.) The mixed partial derivatives satisfy ∂2f/∂xi∂xj=∂2f/∂xj∂xi on U, so Hf(a) is a symmetric matrix.
  • (A2) (Taylor’s theorem with a second-order remainder.) For every h small enough that a+h∈U, f(a+h)=f(a)+∇f(a)⋅h+12h⊤Hf(a)h+r(h), where the remainder satisfies r(h)/‖h‖2→0 as h→0.

These are two standard theorems of multivariable calculus. This book proves neither. They are quoted so that the theorem below has hypotheses to stand on, and Chapter 18 quotes them again for its second-derivative test of convexity, exactly as the theorem of Abel and Ruffini was quoted in Chapter 11. Everything after them is linear algebra.

By (A1) the Hessian is a real symmetric matrix, so it has an inertia, and by Theorem 14.6.1 that inertia decides the definiteness of the quadratic form h↦h⊤Hf(a)h. One small lemma converts definiteness into a quantitative bound, and it is the only place where a real number is needed rather than a sign.

Lemma 14.6.3 (A Positive Definite Form Is Bounded Below by a Multiple of the Norm Squared)

Let A∈Mn(R) be symmetric and positive definite, and let λ be its smallest eigenvalue. Then λ>0 and x⊤Ax ≥ λ‖x‖2for every x∈Rn.

Proof. By Corollary 12.5.2 there are an orthogonal Q∈O(n) and a diagonal D=diag(λ1,…,λn) listing the eigenvalues of A with A=QDQ⊤. By Theorem 13.1.5 (b) every λi>0, so λ=miniλi>0. Put y=Q⊤x. Then x⊤Ax=y⊤Dy=∑i=1nλiyi2 ≥ λ∑i=1nyi2=λ‖y‖2, using λi≥λ and yi2≥0 termwise. Finally QQ⊤=I, so ‖y‖2=x⊤QQ⊤x=‖x‖2. This proves the lemma.

Theorem 14.6.4 (The Second-Derivative Test)

Let f be a real-valued function, twice continuously differentiable on an open set U⊆Rn, let a∈U be a critical point of f, and let (n+,n−,n0) be the inertia of Hf(a). Then:

  • (a) if Hf(a) is positive definite, that is (n+,n−,n0)=(n,0,0), then a is a strict local minimum of f;
  • (b) if Hf(a) is negative definite, that is (n+,n−,n0)=(0,n,0), then a is a strict local maximum of f;
  • (c) if Hf(a) is indefinite, that is n+>0 and n−>0, then a is neither a local minimum nor a local maximum: every neighborhood of a contains points where f>f(a) and points where f<f(a). Such an a is a saddle point.

If n0>0 and a is not covered by (a)–(c), the test gives no information.

Idea. Taylor says f(a+h)−f(a) is 12q(h) plus a remainder that is smaller than ‖h‖2 near 0, where q(h)=h⊤Hf(a)h. For (a) the quadratic term is at least 12λ‖h‖2 by Lemma 14.6.3, which beats a remainder eventually smaller than 14λ‖h‖2; so the difference is positive. For (c) there is no bound in every direction, and none is needed: walk along a single line h=tu where q(u)>0, and the whole thing is t2 times something tending to 12q(u)>0. One direction up, one direction down, and no extremum.

Proof. Write H=Hf(a) and q(h)=h⊤Hh. Since a is critical, ∇f(a)=0, so (A2) reads (∗)f(a+h)−f(a)=12q(h)+r(h),r(h)‖h‖2→0.

  • (a) Let λ>0 be the smallest eigenvalue of H, so that q(h)≥λ‖h‖2 by Lemma 14.6.3. Since r(h)/‖h‖2→0, there is δ>0 with a+h∈U and |r(h)|≤14λ‖h‖2 whenever 0<‖h‖<δ. For such h, by (∗), f(a+h)−f(a) ≥ 12λ‖h‖2−14λ‖h‖2=14λ‖h‖2>0. So f(a+h)>f(a) for every h≠0 with ‖h‖<δ, which is what “strict local minimum” says.

  • (b) The Hessian of −f at a is −H, whose inertia is (n,0,0) because that of H is (0,n,0); so −H is positive definite by Theorem 14.6.1 (a). Part (a) applied to −f makes a a strict local minimum of −f, that is a strict local maximum of f.

  • (c) By Theorem 14.6.1 (e) there are u,w∈Rn with q(u)>0 and q(w)<0; both are non-zero, since q(0)=0. Fix t≠0 small and put h=tu. Then q(tu)=t2q(u), so (∗) gives f(a+tu)−f(a)t2=12q(u)+r(tu)t2. Now r(tu)/t2=‖u‖2⋅r(tu)/‖tu‖2→0 as t→0, because ‖tu‖→0 and ‖u‖2 is a constant. So for all small enough t≠0 the right-hand side is at least 14q(u)>0, and hence f(a+tu)>f(a). The same computation with w in place of u gives f(a+tw)<f(a) for all small enough t≠0. Every neighborhood of a contains points of both kinds, so a is neither a local minimum nor a local maximum. This proves the theorem.

Cases (a)–(c) exhaust the non-degenerate ones: if n0=0 then n++n−=n, so either n+=n, or n−=n, or both are positive. What is left undecided is exactly n0>0, and there the test is silent because it has to be.

Example (Two critical points of a cubic surface)

Find the critical points of f(x,y)=x3−3xy+y3 on R2 and classify each one.

Solution. The partial derivatives are fx=3x2−3y and fy=−3x+3y2. Setting both to zero gives y=x2 and x=y2, hence x=x4, so x(x3−1)=0 and x∈{0,1}. The real critical points are (0,0) and (1,1).

Differentiating again, Hf(x,y)=(6x−3−36y).

At (0,0) the Hessian is (0−3−30), with det=−9<0. A 2×2 symmetric matrix with negative determinant has eigenvalue product −9, hence one eigenvalue of each sign, so its inertia is (1,1,0) by Theorem 14.5.3 and the form is indefinite. By Theorem 14.6.4 (c), (0,0) is a saddle point. Concretely f(t,t)=2t3−3t2<0 and f(t,−t)=3t2>0 for small t>0.

At (1,1) the Hessian is (6−3−36), whose leading principal minors are 6>0 and 36−9=27>0. By Proposition 14.6.2 (a) it is positive definite, so (1,1) is a strict local minimum, with value f(1,1)=−1.

Example (One Hessian, three answers)

The three functions g1=x2+y4,g2=x2−y4,g3=x2 all have ∇gi(0,0)=0 and the same Hessian at the origin. What is that Hessian, and what happens at the origin in each case?

Solution. Every second derivative of y4 vanishes at y=0, so all three have Hgi(0,0)=(2000), with inertia (1,0,1): positive semidefinite, not definite, not indefinite. The test is silent, and it must be, because the three answers differ. For g1 the origin is a strict local minimum, since x2+y4>0 away from 0. For g2 it is a saddle: g2(t,0)=t2>0 and g2(0,t)=−t4<0 for t≠0. For g3 it is a minimum but not a strict one, since g3 vanishes along the whole y-axis. The quadratic term decided nothing here; the quartic term decided everything.

Warning. The test reads the signature, not the determinant. In two variables the familiar rule is “detH>0 and fxx>0 means a minimum”, and the second half is not decoration: diag(−1,−1) has det=1>0, and −x2−y2 has a strict local maximum at the origin. All detH>0 says in two variables is that n0=0 and n− is even — definite, of a sign the determinant cannot see. In three variables it says even less: diag(1,−1,−1) has det=1>0 and is indefinite.

14.6.3. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Define what it means for a symmetric bilinear form on a real vector space to be indefinite.
  • (b) State the signature condition equivalent to negative semidefiniteness, and the one equivalent to positive definiteness.
  • (c) Determine whether the following statement is correct, and justify your answer: a symmetric form that is not positive semidefinite is indefinite.
  • (d) Name the two results of analysis that Theorem 14.6.4 assumes, and say which part of its proof uses each.
  • (e) A critical point has n0=2 and n−=0. What does Theorem 14.6.4 conclude?

Solution.

  • (a) β is indefinite if there exist u and w in V with q(u)>0 and q(w)<0, where q(v)=β(v,v).

  • (b) Negative semidefinite ⟺n+=0; positive definite ⟺(n+,n−,n0)=(n,0,0), equivalently n+=n. Both are Theorem 14.6.1.

  • (c) Incorrect. The form q(x1,x2)=−x12 has inertia (0,1,1); it is not positive semidefinite, since q(e1)=−1, and not indefinite, since q is never positive. Failing (b) of Definition 14.6.1 means only n−>0; being indefinite needs n+>0 as well.

  • (d) Symmetry of the mixed second partial derivatives, which makes the Hessian symmetric so that it has an inertia at all; and Taylor’s theorem with a second-order remainder, which is the identity (∗) that every part of the proof manipulates.

  • (e) Nothing. Here n+=n−2 and n−=0, so the Hessian is positive semidefinite but not definite and not indefinite, and none of (a), (b), (c) applies. Example (One Hessian, three answers) shows that all of “strict minimum”, “non-strict minimum” and “saddle” really do occur in this situation.

B. Practice

Exercise (B1: Classify by the signature)

Determine the definiteness of each of the following real symmetric matrices, and give the inertia of each. Justify your answers. A1=(2112),A2=(−122−5),A3=(1221).

Solution. For A1: det(A1)1=2>0 and detA1=4−1=3>0, so A1 is positive definite by Proposition 14.6.2 (a), with inertia (2,0,0).

For A2: (−1)1det(A2)1=1>0 and (−1)2detA2=5−4=1>0, so A2 is negative definite by Proposition 14.6.2 (b), with inertia (0,2,0).

For A3: detA3=1−4=−3<0, so the two eigenvalues have product −3 and hence opposite signs. The inertia is (1,1,0) by Theorem 14.5.3, and A3 is indefinite by Theorem 14.6.1 (e). Explicitly q(1,1)=6>0 and q(1,−1)=−2<0.

Exercise (B2: Critical points of a quartic)

Find all critical points of f(x,y)=x4+y4−4xy and classify each with Theorem 14.6.4.

Solution. fx=4x3−4y and fy=4y3−4x, so y=x3 and x=y3=x9. Then x(x8−1)=0, so x∈{0,1,−1} and the critical points are (0,0), (1,1), (−1,−1). The Hessian is Hf(x,y)=(12x2−4−412y2). At (0,0) it is (0−4−40), with determinant −16<0, hence inertia (1,1,0) and a saddle point. At (±1,±1) it is (12−4−412), with leading minors 12>0 and 144−16=128>0, hence positive definite: both are strict local minima, each of value f=1+1−4=−2.

C. Going deeper

Exercise (C1: The signature measures positive subspaces)

Let β be a symmetric bilinear form on a real vector space V of dimension n, with inertia (n+,n−,n0). Call a subspace U⊆V positive if q(v)>0 for every non-zero v∈U.

  • (a) Prove that V has a positive subspace of dimension n+.
  • (b) Prove that every positive subspace has dimension at most n+. Hint: consider a subspace on which q≤0 of the largest available dimension.
  • (c) Hence deduce that n+ equals the largest dimension of a positive subspace, and that this gives a second proof that n+ does not depend on the orthogonal basis.

Solution. Fix an orthogonal basis B=(v1,…,vn) for β, ordered so that di=q(vi)>0 for i≤n+, then negative, then zero.

  • (a) Put U=span(v1,…,vn+). For a non-zero v=∑i≤n+civi, Eq. 14.4.1 gives q(v)=∑i≤n+dici2>0, since every di>0 and some ci≠0. So U is positive of dimension n+.

  • (b) Put U′=span(vn++1,…,vn), of dimension n−n+. For v∈U′, Eq. 14.4.1 gives q(v)=∑i>n+dici2≤0, every di there being ≤0. Let W be any positive subspace. Then W∩U′={0}, since a non-zero vector in the intersection would have q>0 and q≤0. By the dimension formula (Theorem 1.7.3), dim⁡W+(n−n+)=dim⁡(W+U′)≤n, so dim⁡W≤n+.

  • (c) By (a) and (b) the largest dimension of a positive subspace is exactly n+. That description mentions only β and V, no basis, so n+ is an invariant of β. Together with the invariance of rankβ=n++n− under congruence (Theorem 14.2.3) this recovers Theorem 14.5.1.

Exercise (C2: A saddle the determinant hides)

Let f(x,y,z)=x2−y2−z2+xyz.

  • (a) Verify that the origin is a critical point and compute Hf(0) and its determinant.
  • (b) Classify the origin, and explain why the sign of detHf(0) alone would have been useless.
  • (c) Prove that no twice continuously differentiable g:R3→R has a strict local maximum at a critical point 0 with detHg(0)>0, and give a g:R2→R that does. Which feature of the dimension is responsible?

Solution.

  • (a) fx=2x+yz, fy=−2y+xz, fz=−2z+xy, all zero at 0. The second derivatives at 0 are fxx=2, fyy=fzz=−2, and fxy=z, fxz=y, fyz=x, all zero at 0. So Hf(0)=diag(2,−2,−2), with det=8>0.

  • (b) The inertia is (1,2,0), so the Hessian is indefinite and 0 is a saddle point by Theorem 14.6.4 (c). The determinant is the product of the eigenvalues (Corollary 12.1.5) and therefore records only the parity of n−; here det>0 says n− is even, which is equally true of the negative definite diag(−2,−2,−2) and of the positive definite I3. It cannot distinguish them.

  • (c) Suppose 0 is a local maximum of g and write q(h)=h⊤Hg(0)h. If q(u)>0 for some u, the computation in the proof of Theorem 14.6.4 (c) gives g(tu)>g(0) for all small t≠0, contradicting the maximum. So q(u)≤0 for every u, that is Hg(0) is negative semidefinite and n+=0 by Theorem 14.6.1 (d). If moreover detHg(0)>0 then 0 is not an eigenvalue, so n0=0 and the inertia is (0,3,0). But then detHg(0)=λ1λ2λ3 is a product of three negative numbers, hence negative — a contradiction. On R2 there is no obstruction: g(x,y)=−x2−y2 has Hg(0)=−2I2, determinant 4>0, and a strict local maximum at 0. The responsible feature is the parity of the dimension: the determinant is the product of n eigenvalues, so a negative definite Hessian has det of sign (−1)n.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.