The gradient of f is the vector ∇f = ⟨fₓ, fᵧ⟩. It gathers both partial derivatives into a single object.
Step 1: Let's Learn
Read it, or press Listen and follow the words.
Where it points
The gradient points in the direction of steepest ascent. Standing on a hillside, it is the direction straight uphill.
How long it is
The magnitude of the gradient is how steep that steepest climb is. A flat region has a short gradient.
The opposite direction
Negative gradient points straight downhill. Every optimisation algorithm in machine learning walks that way on purpose.
A zero gradient
Where the gradient is the zero vector there is no uphill direction at all. Those are the critical points.
A gradient field
Computing the gradient at every point fills the plane with arrows. On a bowl they all point outward from the bottom.
Both partials in one vector
The gradient ∇f collects the partial derivatives into a vector. Packaging them together turns two numbers into a single object with a direction and a magnitude.
It points uphill, most steeply
The gradient points in the direction of greatest increase, and its magnitude is that greatest rate. Both facts follow from the directional derivative formula and are the reason the gradient matters.
It is perpendicular to level curves
Moving along a contour changes nothing, so the direction of maximum change must cross it at right angles. That gives a quick way to find normals to curves and surfaces.
Gradient descent
Repeatedly stepping opposite the gradient walks downhill towards a minimum. That algorithm is how essentially all machine learning models are trained, which makes this the most applied idea in the course.
Step 2: Try It Yourself
Tap and try it out.
- Released from(1, 2)
These arrows point straight uphill on a bowl, always away from the lowest point and perpendicular to the contours.
Step 3: Watch an Example
One step at a time.
Watch Rania Find a Gradient
Rania computes ∇f for f(x, y) = x²y at the point (2, 3).
- Step 1
She differentiates by x holding y fixed, giving fₓ = 2xy.
Step 4: Your Turn
Practice makes it stick.
The Hillside
Problem 1 of 2
A hill has ∇h = ⟨3, 4⟩ at your feet. How steep is the steepest climb from there?
The Descent
Problem 2 of 2
∇f = ⟨6, −8⟩. What is the x-component of the steepest descent direction?
Point Uphill
1 of 8
f = 3x + 5y. What is the x-component of ∇f?
2 of 8
f = x² + y². What is the y-component of ∇f at (1, 4)?
3 of 8
∇f = ⟨5, 12⟩. What is the steepest rate of increase?
4 of 8
∇f = ⟨0, 0⟩ at a point. Is it a critical point? 1 yes, 0 no.
5 of 8
f = xy. What is the x-component of ∇f at (2, 7)?
6 of 8
f = 10 for every point. What is the magnitude of ∇f?
7 of 8
Match each gradient fact to its meaning.
Tap a card on the left to start.
8 of 8
f = 4x. What is the y-component of ∇f?
Step 5: Quick Check
Show what you know.
Question 1 of 2
f = x² + 3y. What is the x-component of ∇f at (5, 1)?
Question 2 of 2
Which way does the gradient point?
What You Learned
- The gradient ∇f = ⟨fₓ, fᵧ⟩ packs both partial derivatives into one vector.
- It points in the direction of steepest ascent, and its magnitude is how steep that is.
- A zero gradient marks a critical point, where no direction goes up.