Second Derivative Test

Single-variable calculus from first principles

Once you've found a critical point (where f′ = 0), there's a fast way to tell whether it's a peak or a valley, faster than checking signs on both sides. Just look at the concavity there, using the second derivative.

The logic is simple. At a flat spot, if the curve cups upward (concave up), you must be at the bottom of a bowl, a minimum. If it caps downward (concave down), you're at the top of a dome, a maximum.

Imagine setting a marble down on a flat spot of a curved surface, then pouring a little water. A bowl holds the water and cradles the marble at the bottom, that's a minimum, cupping upward. A dome sheds the water and lets the marble roll off the top, that's a maximum, capping downward. The second derivative simply tells you which shape you're standing on.

Where this lives in MLThis generalises directly to the Hessian test in multivariable optimisation: at a point where the gradient is zero, a positive-definite Hessian (all eigenvalues > 0, the matrix version of f″ > 0) signals a minimum; a negative-definite one signals a maximum; mixed signs signal a saddle. Checking the Hessian's eigenvalues is exactly this 1-D test scaled up to the loss surfaces of real models.
▶ Second Derivative Test
← Critical PointsConvexity →