Directional Derivative Calculator

Published on: July 21, 2026
Final Answer: Free | Full Steps: Pro

This Directional Derivative Calculator finds how fast a function changes as you move in a chosen direction, and shows the working line by line. The gradient is built first, and the direction is rescaled to length one, because otherwise a longer arrow would fake a faster change. The dot product of the two is the rate. Following the same pattern every time keeps the direction normalised before it is used.

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Find the gradient.
  4. Evaluate the gradient at the point.
  5. Turn the direction into a unit vector.
  6. Dot the gradient with the unit vector.

Formula: Directional Derivative Formula

This formula gives the rate of change of f in the direction of v. Dot the gradient with the unit vector in that direction.

\(D_{\vec{u}}f = \nabla f \cdot \vec{u},\quad \vec{u} = \frac{\vec{v}}{|\vec{v}|}\)

Useful Tips to Remember

Always turn the direction into a unit vector first, or the answer will be scaled by the length of v. The directional derivative is largest in the direction of the gradient and equals the length of the gradient there. It is 0 in any direction at right angles to the gradient. Evaluate the gradient at the point before taking the dot product.

Required knowledge

Where Is the Directional Derivative Used?

The directional derivative tells you how fast a quantity changes if you move in a particular direction, not just along the axes. Hikers and engineers use it for the slope of a hill along a chosen path. In meteorology it gives how quickly temperature or pressure changes in the direction the wind blows. Robots and drones use it to judge how a sensor reading will change as they move, and optimisation methods use it to test search directions.

  • Slope of a hill along a chosen path
  • Temperature and pressure change along the wind
  • Predicting sensor readings as a robot moves
  • Testing search directions in optimisation
  • Rates of change on surfaces in physics

Directional Derivative Practice Problems

Example 1 finds the rate of change of \(x^{2} y\) at \((1, 2)\) in the direction \(\langle 3, 4 \rangle\), and Example 2 uses \(x^{2} + y^{2}\) in the direction \(\langle 1, 1 \rangle\). Find the gradient, make the direction a unit vector and compare. For two more free worked examples, check out the Directional Derivative Notes.

The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. For more practice, the notes page goes further with extra worked examples and fuller explanations of the ideas behind each step. Use them together to check your answers and to understand why each step works.

See Example 1 Hide Example 1

Problem

\(f(x, y) = x^{2} y,\; \vec{v} = \left\langle 3,\; 4 \right\rangle,\; P = \left(1,\; 2\right)\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Find the gradient.
  4. Evaluate the gradient at the point.
  5. Turn the direction into a unit vector.
  6. Dot the gradient with the unit vector.

Formula

Formula: Directional Derivative Formula

This formula gives the rate of change of f in the direction of v. Dot the gradient with the unit vector in that direction.

\(D_{\vec{u}}f = \nabla f \cdot \vec{u},\quad \vec{u} = \frac{\vec{v}}{|\vec{v}|}\)

Step 1

Step 1 - Set up the problem.

In this problem: We are finding the rate of change of \(f(x, y) = x^{2} y\) at \(P = \left(1,\; 2\right)\) in the direction \(\vec{v} = \left\langle 3,\; 4 \right\rangle\).

\(f(x, y) = x^{2} y,\; \vec{v} = \left\langle 3,\; 4 \right\rangle,\; P = \left(1,\; 2\right)\)

Step 2

Step 2 - Write the formula.

In this problem: The directional derivative is the gradient dotted with a unit vector in the chosen direction. The direction must have length 1, so v is divided by its length first.

\(D_{\vec{u}}f = \nabla f \cdot \vec{u},\quad \vec{u} = \frac{\vec{v}}{|\vec{v}|}\)

Step 3

Step 3 - Find the gradient.

In this problem: The gradient collects the partial derivatives, covered in the Gradient Calculator, which gives \(\nabla f = \left\langle 2 x y,\; x^{2} \right\rangle\).

\(\nabla f = \left\langle 2 x y,\; x^{2} \right\rangle\)

Step 4

Step 4 - Evaluate the gradient at the point.

In this problem: Putting \(x = 1\) and \(y = 2\) into each component gives \(\nabla f\left(1,\; 2\right) = \left\langle 4,\; 1 \right\rangle\).

\(\nabla f\left(1,\; 2\right) = \left\langle 2 \times 1 \times {2},\; 1^{2} \right\rangle = \left\langle 4,\; 1 \right\rangle\)

Step 5

Step 5 - Turn the direction into a unit vector.

In this problem: The length of v is \(|\vec{v}| = \sqrt{3^{2} + 4^{2}} = 5\), and dividing each component by it gives the unit vector, covered in the Unit Vector Calculator, \(\vec{u} = \left\langle \frac{3}{5},\; \frac{4}{5} \right\rangle\).

\(\vec{u} = \frac{\left\langle 3,\; 4 \right\rangle}{5} = \left\langle \frac{3}{5},\; \frac{4}{5} \right\rangle\)

Step 6

Step 6 - Dot the gradient with the unit vector.

In this problem: Taking the dot product, covered in the Dot Product Calculator, multiplies matching components and adds them, which gives \(4 \times \frac{3}{5} + 1 \times \frac{4}{5} = \frac{16}{5}\).

\(D_{\vec{u}}f\left(1,\; 2\right) = 4 \times \frac{3}{5} + 1 \times \frac{4}{5} = \frac{16}{5}\)

Final Answer

\(D_{\vec{u}}f\left(1,\; 2\right) = \frac{16}{5}\)
See Example 2 Hide Example 2

Problem

\(f(x, y) = x^{2} + y^{2},\; \vec{v} = \left\langle 1,\; 1 \right\rangle,\; P = \left(1,\; 2\right)\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Find the gradient.
  4. Evaluate the gradient at the point.
  5. Turn the direction into a unit vector.
  6. Dot the gradient with the unit vector.

Formula

Formula: Directional Derivative Formula

This formula gives the rate of change of f in the direction of v. Dot the gradient with the unit vector in that direction.

\(D_{\vec{u}}f = \nabla f \cdot \vec{u},\quad \vec{u} = \frac{\vec{v}}{|\vec{v}|}\)

Step 1

Step 1 - Set up the problem.

In this problem: We are finding the rate of change of \(f(x, y) = x^{2} + y^{2}\) at \(P = \left(1,\; 2\right)\) in the direction \(\vec{v} = \left\langle 1,\; 1 \right\rangle\).

\(f(x, y) = x^{2} + y^{2},\; \vec{v} = \left\langle 1,\; 1 \right\rangle,\; P = \left(1,\; 2\right)\)

Step 2

Step 2 - Write the formula.

In this problem: The directional derivative is the gradient dotted with a unit vector in the chosen direction. The direction must have length 1, so v is divided by its length first.

\(D_{\vec{u}}f = \nabla f \cdot \vec{u},\quad \vec{u} = \frac{\vec{v}}{|\vec{v}|}\)

Step 3

Step 3 - Find the gradient.

In this problem: The gradient collects the partial derivatives, covered in the Gradient Calculator, which gives \(\nabla f = \left\langle 2 x,\; 2 y \right\rangle\).

\(\nabla f = \left\langle 2 x,\; 2 y \right\rangle\)

Step 4

Step 4 - Evaluate the gradient at the point.

In this problem: Putting \(x = 1\) and \(y = 2\) into each component gives \(\nabla f\left(1,\; 2\right) = \left\langle 2,\; 4 \right\rangle\).

\(\nabla f\left(1,\; 2\right) = \left\langle 2 \times 1,\; 2 \times {2} \right\rangle = \left\langle 2,\; 4 \right\rangle\)

Step 5

Step 5 - Turn the direction into a unit vector.

In this problem: The length of v is \(|\vec{v}| = \sqrt{1^{2} + 1^{2}} = \sqrt{2}\), and dividing each component by it gives the unit vector, covered in the Unit Vector Calculator, \(\vec{u} = \left\langle \frac{\sqrt{2}}{2},\; \frac{\sqrt{2}}{2} \right\rangle\).

\(\vec{u} = \frac{\left\langle 1,\; 1 \right\rangle}{\sqrt{2}} = \left\langle \frac{\sqrt{2}}{2},\; \frac{\sqrt{2}}{2} \right\rangle\)

Step 6

Step 6 - Dot the gradient with the unit vector.

In this problem: Taking the dot product multiplies matching components and adds them, which gives \(2 \times \frac{\sqrt{2}}{2} + 4 \times \frac{\sqrt{2}}{2} = 3 \sqrt{2} \approx 4.24\).

\(D_{\vec{u}}f\left(1,\; 2\right) = 2 \times \frac{\sqrt{2}}{2} + 4 \times \frac{\sqrt{2}}{2} = 3 \sqrt{2} \approx 4.24\)

Final Answer

\(D_{\vec{u}}f\left(1,\; 2\right) = 3 \sqrt{2} \approx 4.24\)

Notes and Practice Mode

Example Problems

Click one to load it into the box and solve it.