Search the complete library

What do you want to learn or calculate?

Quick linksAll calculatorsMath subjectsPractice questionsFormula library
← Calculus formulas

Gradient

Collect partial derivatives into the direction of steepest increase.

Calculus · Multivariable
$$\nabla f=\left\langle f_x,f_y,f_z\right\rangle$$

Gradient is one of 3 multivariable formulas in the calculus section of this library, and it is used at university level.

Why gradient works

Each partial derivative reports how fast the function climbs along one axis. For a differentiable function the change in any direction is just a weighted blend of those axis rates, so packaging them into one vector lets a dot product do the blending, and the vector itself ends up pointing straight uphill.

What each symbol means

$f_x,f_y,f_z$ are first partial derivatives.

Gradient: when it holds

The partial derivatives should exist; differentiability is needed for the full geometric interpretation.

When it stops applying

Partial derivatives can all exist while the surface still has no tangent plane. For the function xy divided by x² + y², set to 0 at the origin, both partials there are 0, yet the surface is not even continuous, so the vector predicts flatness that is not real.

Gradient: a worked example

For $f=x^2+y^2$, $\nabla f=\langle2x,2y\rangle$.

The mistake to avoid

What people do: Adding the partial derivatives together into a single number.

Why it goes wrong: All the direction information vanishes. The gradient has to stay a vector because it answers which way as well as how fast.

Do this instead: Keep the partials as separate components inside one set of brackets, one slot per variable.

Gradient: step by step

  1. Name the unknown, and the unit the answer has to come out in.
  2. Match the symbols to your values. $f_x,f_y,f_z$ are first partial derivatives.
  3. Check the conditions before substituting. The partial derivatives should exist; differentiability is needed for the full geometric interpretation.
  4. Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate — the check that catches most calculus slips.

Where this formula fits

Subject
Calculus formulas — 42 entries in this library
Topic
Multivariable
Level
University

Formulas are easiest to keep when they sit inside a method rather than on a list. Use the links below to see where gradient comes from, to check a calculation against a tool, and to practise it until you can recall it without looking.

Questions about gradient

Is the gradient a vector or a number?

A vector. Its components are the partial derivatives, its direction points toward the steepest climb, and its length measures how steep that climb is.

What does the length of the gradient tell me?

It is the largest rate of change available at that point, which is what you would experience walking directly uphill instead of at an angle.

Why does it point at right angles to a level curve?

Travelling along a level curve keeps the function value fixed, so the rate in that direction is 0, and a dot product of 0 means the two directions are perpendicular.

What does a gradient of zero mean?

The point is critical, so it might be a peak, a valley floor, or a saddle. A second-derivative test is needed to decide which of the three it is.

Stuck on a problem?

Work a gradient problem step by step

Type your own problem, or upload a photo of it. You get the method, the answer, and a check you can repeat yourself.