1.3 Derivatives for Optimization
Gradients point uphill. We walk the other way.
These notes walk through the lecture slides. The original deck is unchanged; use (slides) on the course hub if you want that PDF.
The figures follow Chollet, Deep Learning with Python, and Géron.
1. A derivative is a slope
Take a smooth map that sends a number to a number. You can draw it as a curve in the plane.

Because is continuous, a small change in can only make a small change in . Increase by a small ; moves by a small .
Because the curve has no kinks, when is small enough around a point you may treat as a line of slope :
The number is the derivative at .
- : a small increase in decreases .
- : a small increase in increases .
- (the magnitude) is how fast that happens.

To minimize , walk against the sign of . That one sentence is gradient descent in one dimension. Being able to differentiate is the main tool this course uses to find those .
2. Continuity is not enough
Continuity says a small input change cannot jump the output. Smoothness says the graph has no corners, so a linear approximation exists. The algorithms in Module 1 assume at least that much. ReLU networks are allowed later; they are smooth almost everywhere. You still write a gradient.
3. Higher dimensions: the gradient
A map from one scalar to one scalar is a curve. A map from a pair of scalars to a scalar is a surface in 3-space.
The analogue of is the gradient : a vector of partial derivatives. It points to the direction of steepest increase. Descent uses .
Week 1 note 1.4 writes the gradient and the Hessian in the notation of the rest of the course. Week 2 uses both.
4. Practice
-
At a point where , what does a small step in do to , to first order? Why is that not enough to call a minimum?
-
Why does a kink (a corner in the graph) break the “local line of slope ” story?
-
If points uphill, what vector do you add to in a descent step, up to a step-size ?