A scalar function can change at different rates in different directions. When it is differentiable, the gradient organises those rates. It identifies a direction of greatest local increase, a normal to a regular level set and the effect of moving through the input space.

The statements need hypotheses and a meaningful scale. A direction must be normalised for a rate per unit distance. Partial derivatives alone do not always support the gradient formula, and a local descending direction does not guarantee success for an arbitrarily large step.

On this page

Define the rate along a unit direction

For a point 𝐚\mathbf a and unit vector 𝐮\mathbf u,

D𝐮f(𝐚)=limh→0f(𝐚+h𝐮)−f(𝐚)h,D_{\mathbf u}f(\mathbf a)=\lim_{h\to0}\frac{f(\mathbf a+h\mathbf u)-f(\mathbf a)}h,

when the limit exists. Because ∥𝐮∥=1\|\mathbf u\|=1, |h||h| measures input-space distance. Domain boundaries can prevent an ordinary two-sided limit in some directions.

If ff is differentiable,

D𝐮f(𝐚)=∇f(𝐚)⋅𝐮.D_{\mathbf u}f(\mathbf a)=\nabla f(\mathbf a)\cdot\mathbf u.

This follows by substituting h𝐮h\mathbf u into the full linear approximation. The directional-derivative reference develops the formula and its geometry.

Normalise before calculating

Let f=x2+2y2f=x^2+2y^2. At (1,2)(1,2), the gradient is (2,8)(2,8). A direction described by (3,4)(3,4) has magnitude five, so its unit vector is (3/5,4/5)(3/5,4/5). Therefore

D𝐮f=235+845=385=7.6.D_{\mathbf u}f=2\frac35+8\frac45=\frac{38}{5}=7.6.

Using (3,4)(3,4) directly would give 3838. That is the rate along (1,2)+t(3,4)(1,2)+t(3,4), a path moving through input space at speed five. It is not the rate per unit distance.

Gradient and tangent directions

A gradient is normal to a regular level curveAn ellipse with tangent and scaled gradient direction at (1,2).A gradient is normal to a regular level curve-3-2-10123-2-10123xy(1,2)Level x²+2y²=9. Normal (2,8); tangent direction (−4,1).The gradient arrow is scaled to fit; equal input-axis units are used.
The arrow represents direction rather than the full gradient magnitude.
Diagram explanation and exact data

At (1,2), the gradient is (2,8). Its dot product with the tangent direction (−4,1) is zero.

Gradient and tangent directions: exact reference data
Quantity Value
gradient (2,8)
maximum unit rate 2√17
unit steepest direction (1/√17,4/√17)
unit rate along (3,4) 38/5

Derive the direction of greatest increase

For a unit vector, ∇f⋅𝐮=∥∇f∥cosϕ\nabla f\cdot\mathbf u=\|\nabla f\|\cos\phi. When the gradient is nonzero, the maximum rate is its norm, attained in its direction. The minimum is the negative norm, attained in the opposite direction.

In the example, the greatest rate is 2172\sqrt{17} and its unit direction is

(2,8)217=(117,417).\frac{(2,8)}{2\sqrt{17}}=\left(\frac1{\sqrt{17}},\frac4{\sqrt{17}}\right).

This is a local first-order statement. A finite move also encounters curvature and changing derivatives, so it need not have the largest finite effect among all moves of the same length.

Relate the gradient to a level curve

The vector (−4,1)(-4,1) is perpendicular to (2,8)(2,8) and gives zero first-order change. It is a tangent direction to the level curve x2+2y2=9x^2+2y^2=9 through (1,2)(1,2).

The tangent line is

2(x−1)+8(y−2)=0.2(x-1)+8(y-2)=0.

Moving along this straight line has zero first-order output change at the point, but the line does not remain on the curved level set. A path staying on the level curve must continually adjust its tangent direction.

Use a gradient as a level-surface normal

For a differentiable F(x,y,z)F(x,y,z), a regular level surface F=cF=c has normal ∇F\nabla F wherever that gradient is nonzero.

For F=x2+y2+z2F=x^2+y^2+z^2, the point (1,2,3)(1,2,3) lies on level fourteen and has gradient (2,4,6)(2,4,6). Its tangent plane is

2(x−1)+4(y−2)+6(z−3)=0,2(x-1)+4(y-2)+6(z-3)=0,

or x+2y+3z=14x+2y+3z=14. For a graph z=f(x,y)z=f(x,y), use F=f(x,y)−zF=f(x,y)-z to obtain normal (fx,fy,−1)(f_x,f_y,-1). The two-component gradient of ff is an input-plane vector, not already a three-component surface normal.

A zero gradient does not classify a point

At a differentiable point with zero gradient, every unit directional derivative is zero. The point is stationary to first order, but it need not be a minimum or maximum.

At the origin, x2+y2x^2+y^2 has a minimum, −x2−y2-x^2-y^2 has a maximum and x2−y2x^2-y^2 has a saddle. All have zero gradient. Higher-order behaviour and the domain determine the classification.

A zero gradient also fails to supply a normal direction for a level set. Regular-level conclusions require a nonzero gradient; special points need their own analysis.

All directional derivatives can exist without differentiability

Define g(0,0)=0g(0,0)=0 and g(x,y)=x3/(x2+y2)g(x,y)=x^3/(x^2+y^2) elsewhere. Its coordinate partials at the origin are (1,0)(1,0). For a unit vector (u1,u2)(u_1,u_2),

g(hu1,hu2)−g(0,0)h=u13.\frac{g(hu_1,hu_2)-g(0,0)}h=u_1^3.

Every directional derivative exists, but its value is u13u_1^3. Differentiability would require the linear gradient rule u1u_1 instead. In direction (1/2,1/2)(1/\sqrt2,1/\sqrt2), the actual derivative is 1/(22)1/(2\sqrt2), not 1/21/\sqrt2.

The function is continuous at the origin because |g(x,y)|≤|x||g(x,y)|\le|x|. Thus even continuity plus all directional derivatives does not guarantee the complete linear approximation. The failure is the nonlinear dependence of the rate on the direction.

Combine gradient with path velocity

For a differentiable field and differentiable path,

ddtf(𝐫(t))=∇f(𝐫(t))⋅𝐫′(t).\frac{d}{dt}f(\mathbf r(t))=\nabla f(\mathbf r(t))\cdot\mathbf r'(t).

Here the velocity is not normalised because the result is change per unit time or parameter. At nonzero speed, divide by that speed to obtain change per unit distance.

An object can travel rapidly along a level set without changing the scalar value. Another can move slowly across sharply changing levels and experience a substantial rate. Both gradient and velocity matter.

Check the distance scale behind “steepest”

The usual steepest-direction result uses Euclidean distance in the stated coordinates. It has a direct spatial interpretation when axes use compatible length units. If one input is time and another is money, their unscaled coordinates do not automatically define a meaningful physical distance.

Changing an input’s numerical units changes its partial derivative and can change an apparent steepest direction. For differently scaled parameters, choose a justified scaling or metric before comparing directions. Partial rates remain meaningful with their own units, but geometric optimisation needs a distance convention.

A descending direction still needs a suitable step

A basic update is

𝐱n+1=𝐱n−η∇f(𝐱n),η>0.\mathbf x_{n+1}=\mathbf x_n-\eta\nabla f(\mathbf x_n),\qquad\eta>0.

For f=x2+y2f=x^2+y^2 at (1,1)(1,1), the gradient is (2,2)(2,2). With η=0.1\eta=0.1, the new point is (0.8,0.8)(0.8,0.8) and the value drops from two to 1.281.28. With η=1.5\eta=1.5, it moves to (−2,−2)(-2,-2) and the value rises to eight.

The negative gradient is locally descending at a differentiable nonstationary point, but an arbitrarily large step is not guaranteed to decrease the function. A usable optimisation method also needs domain handling and a stopping criterion.

Practice questions

  1. For gradient (2,8)(2,8), find the rate in the direction (3,4)(3,4).
  2. For gradient (6,8)(6,8), find the greatest unit-direction rate and its direction.
  3. Does zero gradient establish a local minimum?
Check your answers
  1. Normalise to (3/5,4/5)(3/5,4/5), giving 38/538/5. The unnormalised dot product describes a faster parameterised path instead.
  2. The greatest rate is ten, in direction (3/5,4/5)(3/5,4/5). A perpendicular unit direction, such as (4/5,−3/5)(4/5,-3/5), gives zero first-order change.
  3. No. Minimum, maximum and saddle examples can all have zero gradient. Additional analysis is necessary.

Related topics

Partial Derivatives supplies differentiability and the chain rule. Motion Along a Curve interprets path velocity, and Approximation and Error in Calculus explains the limits of finite-step predictions.

Sources and further reading