Partial Derivatives and the Gradient
Derivatives of a function of several variables, taken one variable at a time, and the gradient vector that collects them.
Needs a step first: 9
For , the partial derivative is the ordinary derivative in with held fixed. The gradient points in the direction of steepest increase, its length is that steepest rate, and it is perpendicular to the level curves. The rate of change in any direction is . This is the basis of Optimisation in Many Variables, Gradient Descent and the wave and heat equations.
Where it shows up: Gradient descent trains a model by stepping against the gradient of the loss with respect to all its weights at once.
How to hold it: By hand, until automatic
Take partial derivatives and assemble the gradient as easily as ordinary derivatives, and read as the uphill direction, perpendicular to the contours.
What knowing it looks like
- Compute first and second partial derivatives, and check that for a smooth example.
- Find the gradient at a point and explain what its direction and length mean on a contour map.
- Find a directional derivative and the equation of a tangent plane.
Test yourself
Let . Find at , the rate of change of there in the direction of , and the greatest possible rate of change there.
Show the worked answer
Needs a step first: 9
Learn it with an AI
Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.
Be my maths tutor. I'm learning "Partial Derivatives and the Gradient" (Undergraduate I tier): Derivatives of a function of several variables, taken one variable at a time, and the gradient vector that collects them. I already know: Rules of Differentiation, Vectors. Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away. Finish by testing me with this: Let $f(x, y) = x^2 y + 3y^2$. Find $\nabla f$ at $(1, 2)$, the rate of change of $f$ there in the direction of $(3, 4)$, and the greatest possible rate of change there. Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.
Needs first
- Rules of DifferentiationThe rules that differentiate any formula built from powers, exponentials, logarithms and trig functions: product, quotient and chain rules.Core · Functions & Calculus
- VectorsQuantities with both size and direction, written as columns of numbers, added head to tail and scaled by numbers.Bridge · Multivariable & Vector Calculus
Leads to
- The Multivariable Chain Rule and JacobiansHow rates of change pass through functions of several variables, organised as a product of Jacobian matrices.Undergraduate I · Multivariable & Vector Calculus
- Multiple IntegralsIntegrals over areas and volumes, computed as repeated single integrals, with a Jacobian factor when changing coordinates.Undergraduate I · Multivariable & Vector Calculus
- Divergence and CurlFor a field of arrows, such as a flow or a force, divergence measures spreading out from a point and curl measures swirling.Undergraduate II · Multivariable & Vector Calculus
- The Wave and Heat EquationsEquations for quantities that vary in both space and time: heat spreading out, and waves travelling along a string.Undergraduate II · Differential Equations & Fourier
- Optimisation in Many VariablesFinding the highest and lowest points of a function of several variables: where the gradient is zero, sorted by the Hessian.Undergraduate I · Optimisation & Information
On the way to
Recommended
- OpenStax CalculusOpenStax, Rice University · BookA free, peer-reviewed calculus textbook in three volumes, from limits through series to vectors and multiple integrals, with worked examples and answers.
- Khan Academy: Multivariable CalculusKhan Academy · CourseFree, ad-free videos and exercises on partial derivatives, gradients, multiple integrals, divergence, curl and Stokes' theorem, taught largely by Grant Sanderson of 3Blue1Brown.
- Mathematics for Machine LearningDeisenroth, Faisal and Ong (Cambridge University Press) · BookA free book that gathers exactly the linear algebra, vector calculus, probability and optimisation machine learning uses, then applies them to regression, PCA and classification.
- 宋浩老师官方宋浩(山东财经大学) · Videos · 中文Full university courses in calculus, linear algebra and probability by a Shandong University of Finance and Economics lecturer, clear and good-humoured; a new calculus series came out in October 2026.