Directional Derivative Calculator screenshot

Directional Derivative Calculator

Compute the derivative of f in a chosen direction by normalising the direction vector and taking its dot product with the symbolic gradient.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No sign-up, no upload
Unit vector shown

Directional Derivative Calculator

Compute the derivative of f in a chosen direction by normalising the direction vector and taking its dot product with the symbolic gradient.

How this page computes

The directional derivative is the gradient dotted with a unit vector. The page computes the gradient symbolically, normalises the direction you give, prints both, and then prints the dot product.

On x^2 + y^2 at (1, 1) with direction (1, 1), the gradient is (2, 2), the unit direction is (0.707106781187, 0.707106781187), and the derivative is 2.82842712475 — not 4, because the direction is normalised first.

A zero direction vector is refused: it names no direction, and dividing by its length would be undefined.

The calculation runs entirely in this browser tab; nothing is uploaded.

The page answers "how fast does f change if I walk in this direction?" by taking the gradient at your point and dotting it with the unit vector you named. For x^2 + y^2 at (1, 1) toward (1, 1), the answer is 2.82842712475.

The normalisation is the step most hand calculations skip. A direction of (1, 1) has length √2, so the rate per unit distance is the dot product with (1, 1)/√2, not with (1, 1). The page prints the unit vector so the difference is visible.

How to use Directional Derivative Calculator

Type the function and the point, then the direction vector components dx, dy and dz.

Press Run. The page prints the gradient formula, the gradient at the point, the length of your direction, the unit vector, and the directional derivative.

To compare two directions, change dx, dy and dz and run again; the gradient at the point does not change, so only the dot product moves.

How the method works

The gradient points uphill, and its dot product with a unit vector projects that uphill rate onto the direction you chose. A direction perpendicular to the gradient gives zero: you are walking along a level curve.

The page normalises because a direction is a line, not a length. Without that step, (2, 2) would report twice the rate of (1, 1) although both name the same direction.

What to Expect

Best for

  • The rate of change of f along a named direction
  • Seeing why a direction must be normalised
  • Checking that a level direction gives zero

Not ideal for

  • A direction given as an angle, which must be converted to components first
  • A one-variable function
  • A function outside the supported grammar

What this tool keeps

  • Every component and point coordinate exactly as typed

What may need cleanup

  • Nothing: the derivative is the final answer

Common errors

  • A zero direction vector is refused with the reason
  • An expression with fewer than two variables is refused with the count
  • A non-finite component at the point is refused

Example use cases

  • Rate of x^2 + y^2 at (1, 1) toward (1, 1)
  • Show that a direction along a level curve gives zero
  • Compare two directions at the same point

Sample input

f(x, y) = x^2 + y^2 at (1, 1), direction (1, 1)

Sample output

∇f = (2, 2), unit direction (0.707106781187, 0.707106781187), D_u f = 2.82842712475

Who this is for

  • Students learning the gradient
  • Readers checking a directional derivative by hand

Frequently asked questions

Why is the answer not 4?

Because (2, 2) · (1, 1) = 4 is the rate per unit of the vector (1, 1), not per unit of distance. The vector has length √2, so the per-unit-distance rate is 4/√2 = 2.82842712475.

What if the direction is perpendicular to the gradient?

The dot product is zero and the page prints 0. That is correct: moving perpendicular to the gradient keeps the function's value constant to first order, which is what a level curve is.

Can I give a direction as an angle?

Not directly. Convert the angle to components first: (cos θ, sin θ) for a two-dimensional function. The page then normalises that vector, which is already unit length.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.