The derivative of the derivative
is a function. It has its own slope. The slope of is called the second derivative of , written or .
The physical picture is the cleanest. If is the position of a moving object at time , then is its velocity (how fast position is changing), and is its acceleration (how fast velocity is changing). Position-velocity-acceleration is exactly position-first derivative-second derivative.
You compute by differentiating twice. For :
One more, twice
With , what is ?
What f'' tells you that f' doesn't
tells you which way the curve is going at : positive slope means up, negative means down. tells you which way that direction is bending:
- : the slope is increasing. The curve bends upward. Concave up — shaped like a cup.
- : the slope is decreasing. The curve bends downward. Concave down — shaped like a cap.
- and changes sign: the bend itself flips. That point is called an inflection point.
For , everywhere — always concave up, always a cup. For , everywhere — always a cap. For , flips sign at : concave down for , concave up for , with as the inflection point.
Critical points: where the slope is zero
A critical point of is a value where (or where does not exist). Geometrically these are the points where the tangent is horizontal — the candidates for peaks and valleys.
Drag the marker below. The widget shows in red, in faint teal, and the marker turns green when you land on a critical point. Hunt for all of them on each function.
For : two critical points at . For : three, at . For : just one, at — and the verdict will tell you something interesting.
That last one is the warning. A critical point is not the same as an extremum. has , but is neither a max nor a min — the curve is just briefly flat as it passes through. You need more than to classify what the point actually is.
Two tests, one job
Given a critical point (so ), how do you tell whether it is a max, a min, or neither?
The first-derivative test. Look at on either side of .
- goes from to as crosses → local maximum (climbing, then descending).
- goes from to → local minimum (descending, then climbing).
- keeps the same sign on both sides → neither (the curve flattens briefly and continues).
The second-derivative test. Compute .
- → concave up at → local minimum.
- → concave down at → local maximum.
- → inconclusive. Fall back to the first-derivative test.
The two agree when they both apply, and the second is usually faster. The widget runs the second-derivative test for you each time you land.
Classify a critical point
For , you already know that is a critical point ().
Compute . The sign of this number tells you whether is a local max, min, or inflection.
Read the verdict
You just computed for . What kind of critical point is ?
f''(1) = 6 > 0 means the curve is concave up at x = 1. Concave up at a critical point = local minimum.
Why any of this matters: minimization is training
Take a single sentence and read it slowly:
Training a neural network is finding the values of its weights that minimize a loss function.
That sentence is a calculus problem. The “loss function” is a function from millions of inputs (the weights) to a single output (a number measuring how badly the network is performing). “Minimize” means: find the critical point where the gradient — the multi-dimensional cousin of — is zero, and use the multi-dimensional cousin of to confirm it is a minimum and not a saddle.
Module 10 will make this picture quantitative. Module 12 will give you the algorithm for computing the gradient through any function you can write down — that is backpropagation. Both of them are this lesson, generalized to many variables.
One module, end to end
You started with secant slopes and ended with the test that classifies critical points of any function. Six lessons. Seven differentiation rules. Two more for products and quotients. One chain rule. And one job — minimizing a function — that this entire module was secretly setting up.
The chain rule, applied across a computational graph, is backpropagation. That is what makes module 12 the keystone of this course. You are now exactly one module away from running it backwards.
Lesson complete
Nice tinkering.
Before you go