Hessian and second-derivative Test Explained with Worked Examples

At a stationary point, let . If and it is a minimum, if and a maximum, and if a saddle point.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Hessian and second-derivative test means

For a function of two variables, find the points where both first partial derivatives are zero. Then use the second derivatives to classify them.

The quantity is the determinant of the Hessian matrix of second partial derivatives. If the test is inconclusive.

It generalises the single-variable second derivative test. In one variable the test is stationary points with the second derivative, in several variables it uses the gradient and commuting partial derivatives, and with a constraint see Lagrange multipliers.

This page is part of Multivariable calculus in Calculus. Topics that work alongside it: Stationary points, Lagrange multipliers, Partial derivatives commute (Clairaut), Tangent plane, Cylindrical coordinates, Vector identities and Total differential.

What is it used for?

The second-derivative test for two variables uses the Hessian determinant to decide whether a stationary point is a minimum, a maximum or a saddle.

How to use hessian and second-derivative test

  1. Solve and .
  2. Find , , .
  3. Calculate at each point.
  4. Classify using the rules.

Graph

Bowl x² (minimum) and saddle direction −x² (maximum along x)stationary point-2-1.5-1-0.500.511.52-4-2024Bowl x² (minimum) and saddle direction −x² (maximum along x)xff = x² + y², along xf = −x² + y², along xGraph with x from -2 to 2 and y from -4.5 to 4.5. Shows the curve f = x² + y², along x; the curve f = −x² + y², along x; point stationary point at (0, 0).

The signs of the Hessian eigenvalues decide the type of stationary point.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: a minimum

Classify the stationary point of at the origin.

Worked example
Answer
Minimum\text{Minimum}
  1. Second derivatives
  2. Calculate D
  3. Classify
    and , so it is a minimum.

Example 2: a saddle point

Classify the stationary point of at the origin.

Worked example
Answer
Saddle point\text{Saddle point}
  1. Second derivatives
  2. Calculate D
  3. Classify
    It is a saddle point.

Example 3: a minimum away from the origin

Classify the stationary point of .

Worked example
Answer
minimum at (1, −2), f=−5\text{minimum at } (1,\ -2),\ f = -5
  1. Set the partial derivatives to zero
  2. Second derivatives
  3. Decide
    D > 0 and f_xx > 0, so this is a minimum with f = −5.

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

f = x³ − 3xy + y³ at (1, 1)

f_xx = 6, f_yy = 6, f_xy = −3

D = 36 − 9 = 27.

Classify (1, 1)

D > 0, f_xx > 0

Minimum.

At (0, 0)

D = 0·0 − 9

−9: saddle.

f = x² − y²

f_xx = 2, f_yy = −2

D = −4: saddle.

Word problems

At a stationary point D = f_xx f_yy − f_xy². D > 0 with f_xx > 0 is a minimum, D > 0 with f_xx < 0 a maximum, D < 0 a saddle, D = 0 inconclusive.

Value of D at (1, 1)

f = x³ − 3xy + y³: f_xx = 6x, f_yy = 6y, f_xy = −3. Find D.

  1. 36 − 9
  2. Check: ✓27

f_xx

Find f_xx at (1, 1).

  1. 6x
  2. Check: positive, minimum ✓6

At the origin Higher

Find D at (0, 0).

  1. 0 − 9
  2. Check: negative, saddle ✓-9

Saddle surface Higher

f = x² − y²: D.

  1. 2·(−2) − 0
  2. Check: ✓-4

Common mistakes

D > 0 means minimum always

ignoring f_xx ✗

check the sign of f_xx ✓

Max or min.

Forgetting f_xy²

f_xx f_yy ✗

subtract f_xy² ✓

Determinant.

D = 0

decided ✗

inconclusive ✓

Another test.

Testing a non-stationary point

any point ✗

first f_x = f_y = 0 ✓

Stationary only.

Exam tips

  1. Find f_x = f_y = 0.
  2. D = f_xx f_yy − f_xy².
  3. D > 0, f_xx > 0: min.
  4. D < 0: saddle.
  5. D = 0: inconclusive.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. D for f_xx = 2, f_yy = 8, f_xy = 3 Foundation

7

2. D for f_xx = −4, f_yy = −4, f_xy = 1 Foundation

15

3. D for f_xx = 1, f_yy = 1, f_xy = 2 Foundation

-3

4. f_xx of x³ at x = 2 Higher

12

5. D for x² + 4y² (f_xx = 2, f_yy = 8, f_xy = 0) Higher

16

6. D for f_xx = 3, f_yy = 3, f_xy = 3 Higher

0

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Hessian matrix
Second partials.
Discriminant (D)
f_xx f_yy − f_xy².
Saddle point
Min in one direction, max in another.
Stationary point
∇f = 0.
Second derivative test
Classification.
Local minimum
Lowest nearby.

Frequently asked questions

What is the second derivative test?

Use D = f_xx f_yy − f_xy² at a stationary point.

When is it a minimum?

D > 0 and f_xx > 0.

When is it a saddle?

D < 0.

What if D = 0?

The test is inconclusive.

Which page covers Lagrange multipliers?

Lagrange multipliers.

Which page covers stationary points?

stationary points.

More in Calculus and the formula sheets.