23.7. PROOF OF THE SECOND DERIVATIVE TEST∗ 505

Proof: Since ∇ f (x) = 0, formula 23.4 implies

f (x+v) = f (x)+12vT H (x)v+

12(vT (H (x+tv)−H (x))v

)(23.6)

and by continuity of the second derivatives, these mixed second derivatives are equal and soH (x) is a symmetric matrix. Thus, by Theorem 19.8.6, H (x) has all real eigenvalues andcan be diagonalized with an orthogonal matrix U . Suppose first that H (x) has all positiveeigenvalues and that all are larger than δ

2 > 0.

uT H (x)u= uTUDUTu= (Uu)T D(Uu)≥ δ2 |Uu|2 = δ

2 |u|2

By continuity of H, if v is small enough,

f (x+v)≥ f (x)+12

δ2 |v|2 − 1

2 |v|2 = f (x)+δ

2

4|v|2 .

This shows the first claim of the theorem. The second claim follows from similar reasoningor applying the above to − f .

Suppose H (x) has a positive eigenvalue λ2. Then let v be an eigenvector for this

eigenvalue. Then from (23.6), replacing v with sv and letting t depend on s,

f (x+sv) = f (x)+12

s2vT H (x)v+

12

s2 (vT (H (x+tsv)−H (x))v)

which implies

f (x+sv) = f (x)+12

s2λ

2 |v|2 + 12

s2 (vT (H (x+tsv)−H (x))v)

≥ f (x)+14

s2λ

2 |v|2

whenever s is small enough. Thus in the direction v the function has a local minimum atx. The assertion about the local maximum in some direction follows similarly.