The test
A stationary point of f(x, y) is a point where both first partial derivatives are 0, that is where the
gradient is the zero vector: fx = 0 and fy = 0. The
test then looks at
with all three second partial derivatives taken at that point. D is the determinant of the Hessian matrix, the
matrix of second partials. The card takes the three numbers, returns D, and states what it means for a stationary point.
| D |
fxx |
The stationary point is |
| D > 0 |
fxx > 0 |
a local minimum |
| D > 0 |
fxx < 0 |
a local maximum |
| D < 0 |
any sign |
a saddle point |
| D = 0 |
any sign |
not decided by the test |
Holds when f has continuous second partial derivatives near the point, so that fxy = fyx
(mixed partial derivatives), and the point is
stationary. At a point where the gradient is not 0, D is still a number, and it says nothing about extrema.
Why it works: about a stationary point the first-order terms of the
Taylor polynomial in two variables are 0, so
f(x, y) − f(a, b) is about ½(fxxh² + 2fxyhk + fyyk²). That is a
quadratic form with a = fxx, b = fxy and
c = fyy. It is positive definite, so f rises in every direction, exactly when fxx > 0 and
D > 0, and it takes both signs exactly when D < 0. With D > 0 the product fxx fyy is
positive, so fyy has the same sign as fxx and can be used in its place.
Worked example: x³ + y³ − 3xy
The first partials are fx = 3x² − 3y and fy = 3y² − 3x. The first gives y = x², and
substituting in the second gives 3x⁴ − 3x = 3x(x³ − 1) = 0, so x = 0 or x = 1: the stationary points are (0, 0) and (1, 1).
The second partials are fxx = 6x, fyy = 6y and fxy = −3.
- At (1, 1): fxx = 6, fyy = 6 and fxy = −3, so D = 6 · 6 − (−3)² = 36 − 9 = 27. D > 0 and
fxx > 0: a local minimum, with f(1, 1) = −1.
- At (0, 0): fxx = fyy = 0, so D = 0 − 9 = −9. D < 0: a saddle point. Along y = x the function is
2x³ − 3x², which is negative near 0 (for 0 < |x| < 1.5); along y = −x it is 3x², which is positive.
A second example: a maximum
For f(x, y) = −x² − xy − y² the first partials −2x − y and −x − 2y vanish together only at (0, 0). There
fxx = −2, fxy = −1 and fyy = −2, so D = 4 − 1 = 3. D > 0 and fxx < 0: a local maximum.
When D = 0
The test does not decide. At the origin f = x⁴ + y⁴ has all second partials 0, so D = 0, and it has a minimum there.
f = −x⁴ − y⁴ also has D = 0 and has a maximum, and f = x⁴ − y⁴ has D = 0 and a saddle point. Another method is
needed: the sign of f along curves through the point, or higher derivatives.
Common mistakes
- Concluding from D > 0 alone. D > 0 holds for both a minimum and a maximum. The sign of fxx separates them.
- Not squaring the mixed partial. D uses fxy². With fxx = 2, fxy = −3 and fyy = 5, D = 10 − 9 = 1, not 10 + 3.
- Applying the test where the gradient is not 0. Solve fx = 0 and fy = 0 first.
- Reading D = 0 as “no extremum”. It means the test does not decide.
- Finding only the interior. On a closed and bounded region the largest and smallest values can also sit on the
boundary, which this test does not look at; see Lagrange multipliers for a boundary curve.
Frequently asked questions
How does it relate to the one-variable test?
For f(x) the test is the sign of f″ at a stationary point; see the
second derivative test. In two variables the single
number f″ becomes the Hessian matrix, and the sign question becomes whether that matrix is positive definite,
negative definite or indefinite.
What is a saddle point?
A stationary point that is neither a minimum nor a maximum: f rises in some directions and falls in others,
like the surface of a saddle or a mountain pass.
Is D called something else in other books?
Yes. Books write it D, Δ, or det H, with H for the Hessian matrix. It is the same number.