How this calculation works
Differentiate the entered expression symbolically in x and y, evaluate the gradient at the selected point and take its dot product with a unit input-plane direction. Inspect a sampled surface, the section along that direction and its local lifted tangent. Drag or use view sliders to rotate the illustration and export the current SVG.
u=v/|v|; Dᵤf=fₓuₓ+fᵧuᵧ=∇f·uA worked example
For f=x²+y² at (1,1), the gradient is (2,2). The direction (1,1) normalizes to (1/√2,1/√2), giving directional derivative 2√2. Reversing the direction gives −2√2, while a perpendicular direction such as (1,−1) gives zero.
Good to know
Assumes differentiability at the base point; symbolic rule evaluation does not prove that hypothesis over a neighborhood. Bounded expressions can reject nonsmooth or unresolved removable-singularity cases. A zero vector cannot define a unit direction. The derivative is per unit distance in the input plane, not surface arc length or an arbitrary unnormalized path parameter. The rotatable surface is a finite wireframe and does not certify global smoothness.
Reference: OpenStax Calculus: directional derivatives and the gradient (opens in a new tab) ↗
Choose a direction in the input plane
For a surface z=f(x,y), a direction in the x,y plane specifies how the inputs move. The directional derivative asks how quickly the function value changes per unit distance in that chosen input direction. A vector such as (3,4) describes a direction and a length, so it must first be normalized when the intended answer is a unit-distance slope.
The tool accepts vector components or an angle measured in degrees from positive x. Vector mode divides by √(vₓ²+vᵧ²). Angle mode constructs the unit vector (cos θ,sin θ). The displayed unit direction keeps those conventions visible rather than silently treating an arbitrary input vector as already normalized.
The partial derivative and gradient calculator also evaluates a third input coordinate while keeping its surface slice explicit.
Work through the bowl-shaped example
For f(x,y)=x²+y², the partial derivatives are fₓ=2x and fᵧ=2y. At the base point (1,1), the gradient is (2,2), and the function height is two. The direction vector (1,1) has length √2, giving unit direction (1/√2,1/√2).
The dot product is 2/√2+2/√2=2√2. Moving in the opposite unit direction changes the sign to −2√2. Moving perpendicular to the gradient, for example in the normalized direction of (1,−1), gives a zero first-order slope. A zero directional derivative does not mean the function remains constant for a finite journey along that line.
Read the gradient before interpreting the dot product
The gradient contains the two coordinate partial derivatives evaluated at the same base point. Its x component describes the coordinate-x rate and its y component the coordinate-y rate. The dot product combines those rates according to the chosen unit direction, giving a local first-order change rather than a full finite-displacement calculation.
Under differentiability, the largest directional derivative over unit directions equals the gradient magnitude. When the gradient is nonzero, the maximizing direction is the normalized gradient and the opposite direction gives the most negative slope. A zero gradient gives zero directional derivative in every unit direction, while higher-order behavior can still distinguish a minimum, maximum or saddle.
Follow the section and its tangent on the surface
The purple section samples the function along the line P+t·u in the input plane. Lifting that section to the surface produces points (x₀+t·uₓ,y₀+t·uᵧ,f(P+t·u)). The derivative of its height at t=0 is precisely the directional derivative when the assumptions hold.
The green dashed line is the local tangent to that lifted section at the base point, and the red arrow indicates its positive direction. The lifted tangent vector has components (uₓ,uᵧ,Dᵤf). A finite endpoint of that tangent is generally not on the nonlinear surface; the tangent is a local linear model, not a guaranteed path along the surface.
The view rotates through pointer dragging or labeled yaw and pitch sliders. Rotation changes only the orthographic projection. It does not change the function, gradient, input direction or numerical slope. The current view can be exported as an SVG alongside the copied calculation settings.
Keep unit input distance separate from other rate conventions
Without normalization, the chain-rule rate along the parameterized input path P+t·v is ∇f·v. Multiplying v by ten multiplies that parameter-rate result by ten, even though the geometric direction is unchanged. The unit-direction derivative instead remains unchanged when a positive scalar rescales the entered vector.
Surface arc length is another quantity again. The lifted curve travels in three dimensions and its speed involves the height change as well as the input-plane motion. This calculator’s result is per unit input-plane distance. It does not silently convert the answer into a rate per unit surface arc length, time, physical distance in mixed units or an arbitrary path parameter.
Check differentiability and the domain
The gradient-dot-unit-vector formula assumes that the function is differentiable at the point. Symbolically evaluating two partial derivative expressions is not a general proof of that condition. Nonsmooth corners, domain boundaries and functions with direction-dependent behavior need separate mathematical analysis.
For example, absolute value at a corner can make the derivative expression undefined. A removable singularity can also remain unresolved because the symbolic engine is not a complete algebraic simplifier. The function value and the required derivative expressions must be defined at the selected base point; the tool does not replace an undefined value with zero.
The wireframe and section are sampled on a finite grid. Undefined samples are omitted and split into separate pieces, but unseen singularities can still lie between plotted points. The Jacobian determinant and grid transformation calculator studies a different two-output mapping task, and the local maximum and minimum calculator searches a one-variable function for numerical stationary candidates. Neither view proves the smoothness assumptions for this surface.
A few questions, answered
Why normalize the vector?
The standard directional derivative is per unit input-plane distance. Using an unnormalized vector would instead scale the rate by that vector’s length.
Can I enter an angle?
Yes. Angle mode uses degrees from positive x and builds the unit direction (cos θ,sin θ).
What if the direction vector is zero?
It cannot be normalized and does not define a direction. Enter at least one nonzero component.
Does a zero slope mean the section is flat everywhere?
No. It is a local first-order result at the base point. Finite or higher-order behavior can still change.
Does rotating the surface change the derivative?
No. Rotation changes only the view, not the mathematical inputs or result.