Directional Derivatives and the Gradient
The question
Partial derivatives measure how a function changes when you move along the coordinate axes --- holds fixed and varies , while holds fixed and varies . But the coordinate axes are arbitrary. There is nothing physically special about the - or -direction; they are an artifact of the coordinate system we happened to choose.
The natural question: what is the rate of change of in an arbitrary direction? If you stand at a point and walk in a direction that is neither pure nor pure , how fast does change per unit distance traveled?
The answer is the directional derivative, and the tool that makes it computable is the gradient vector . Both emerge from a single application of the chain rule.
Setup: walking in direction
Choose a unit vector with . A unit vector is a vector of length 1 --- it specifies a direction without any scale ambiguity.
Starting at the point , walk in the direction . Your position after traveling a distance along this direction is
This is a straight line through in the direction , parametrized by arc length --- the parameter measures actual distance traveled, not some arbitrary quantity. See Arc-Length Parametrization for why this matters: because is a unit vector, , so the parametrization has unit speed and is genuinely distance.
From this parametrization, the components of position are functions of :
Their derivatives with respect to are simply the components of :
The chain rule derivation
Now consider the scalar function evaluated along this line. As varies, both and change, so is a composite function: .
The multivariable chain rule tells us how to differentiate a composite function. If where and are both differentiable functions of a single parameter , then
This is the sum of two contributions: the rate of change of due to changing (weighted by how fast changes with ) plus the rate of change of due to changing (weighted by how fast changes with ). It generalizes the single-variable chain rule to the case where depends on multiple intermediate variables.
Substituting and :
where and are the partial derivatives of , evaluated at .
This quantity is the directional derivative of at in the direction , written .
Concrete example
Take . Compute the directional derivative at the point in the direction (which is a unit vector since ).
Step 1: Compute the partial derivatives.
Step 2: Evaluate at .
Step 3: Apply the formula.
The function increases at a rate of 12.8 units per unit distance when you walk from in the direction .
Repackaging as a dot product: the gradient
Look at the formula again:
The right side is a dot product --- the sum of component-wise products of two vectors. The dot product of vectors and is . Recognizing this pattern, define the gradient of :
The symbol is called “nabla” or “del.” The gradient is a vector whose components are the partial derivatives of . It is not new mathematics --- it is a repackaging of information we already had (the partial derivatives) into a single vector object that makes the directional derivative formula clean:
The directional derivative in any direction is the dot product of the gradient with .
The gradient in higher dimensions
Everything generalizes immediately. For , the gradient is , and for any unit vector .
For the example above: , and . Same answer, but now the computation has a geometric shape.
Three geometric consequences
The power of the dot product formula comes from a fundamental identity. For any two vectors and , the dot product satisfies
where is the angle between the two vectors. Since is a unit vector (), this simplifies to
where is the angle between and . The directional derivative depends only on the magnitude of the gradient and the angle . This gives three immediate results:
Maximum rate of increase
When (you walk in the same direction as ), and
This is the largest possible directional derivative. The gradient points in the direction of steepest ascent, and its magnitude is the rate of that steepest ascent.
Maximum rate of decrease
When (you walk directly opposite to ), and
This is the most negative directional derivative. Walking opposite the gradient gives the steepest descent.
Zero change
When (you walk perpendicular to ), and
Walking perpendicular to the gradient, does not change at all (to first order). This is not a coincidence --- it is the key to the next section.
The punchline: the gradient is normal to level curves
A level curve (also called a contour) of is a curve in the -plane along which takes a constant value: for some constant . For example, the level curves of are circles centered at the origin.
The gradient is perpendicular to level curves
At any point on a level curve , the gradient is perpendicular (normal) to the level curve.
Proof. Let be a unit tangent vector to the level curve at some point . “Tangent to the level curve” means points along the curve --- in a direction where stays constant. Since does not change along the level curve, the rate of change of in the direction is zero:
But . So
A dot product of zero means the two vectors are orthogonal (perpendicular), provided neither is the zero vector. Therefore . Since this holds for every tangent direction to the level curve, is normal to the level curve at .
This is one of the most important results in multivariable calculus. It connects two seemingly different ideas --- the algebraic object (a vector of partial derivatives) and the geometric object “level curve” (a contour of constant ) --- through the directional derivative.
The gradient does double duty: it tells you the direction of steepest increase and it tells you which way is “outward” from a level curve. These are the same thing --- the steepest way to increase is to walk directly away from the current contour toward higher-valued contours.
Worked example: gradient perpendicular to a circle
Take .
Step 1: Compute the gradient.
Step 2: Evaluate at the point .
Step 3: Identify the level curve through .
so the level curve is , a circle of radius centered at the origin.
Step 4: Find a tangent vector to the circle at .
The circle can be parametrized as . The point corresponds to . The tangent vector is
At :
Step 5: Verify perpendicularity.
The dot product is zero, confirming that the gradient is perpendicular to the tangent direction at the point .
Geometric picture
At every point on the circle , the gradient points radially outward from the origin, while the tangent to the circle points along the circumference. Radii and tangent lines of a circle are always perpendicular --- the gradient-level-curve relationship is the general version of this familiar geometric fact.
The diagram below shows concentric level curves of with gradient arrows (red) pointing radially outward. At the upper-left point, a green tangent segment and a right-angle marker confirm the perpendicularity.

See also
- Arc-Length Parametrization --- the arc-length parametrization of straight lines is the foundation of the directional derivative definition
- Tangent Vectors and the Unit Normal on Graph Surfaces --- tangent planes and normals for surfaces , where the gradient appears in the normal vector formula
- Critical Points and the Hessian --- what happens when (the gradient vanishes): critical points, and the second-derivative test for classifying them
- Lagrange Multipliers --- uses the gradient-perpendicular-to-level-curves result to optimize subject to constraints