Differentiation in several variables · Definition

Gradient

multivariable calculusderivatives

Before you start you need to know

It turns the information of several partial derivatives into a single arrow that tells where to climb and how steep the terrain is.

Definition

The gradient \(\nabla f\) of a differentiable function \(f\) is the vector that collects its partial derivatives at a point; it points where \(f\) increases fastest.

\[\nabla f=\langle f_x,\,f_y\rangle=f_x\,\mathbf{i}+f_y\,\mathbf{j}\]

The gradient appears when the differential is written as a dot product: \(df=\nabla f\cdot\langle dx,dy\rangle\). Hence, for a unit direction \(\mathbf{u}\), the rate of change is \(\nabla f\cdot\mathbf{u}=|\nabla f|\cos\theta\), with \(\theta\) the angle between them. It is maximal, equal to \(|\nabla f|\), when \(\mathbf{u}\) points along the gradient; minimal, \(-|\nabla f|\), in the opposite sense; and zero in the perpendicular directions.

This explains the relation with level curves: along one of them \(f\) does not change, so the gradient is perpendicular to its tangent. For \(f=x^2+y^2\) at \((1,1)\), \(\nabla f=\langle2,2\rangle\) is normal to the circle \(x^2+y^2=2\) there. With that normal one writes the tangent line to a curve \(f(x,y)=c\): \(f_x(x-a)+f_y(y-b)=0\). In three variables the same argument gives the tangent plane to a level surface.

The gradient is defined the same way with three or more variables, as the vector of all partials: for \(f=xyz\), \(\nabla f=\langle yz,xz,xy\rangle\). Where it is the zero vector, the tangent plane is horizontal and the point is a candidate for a maximum, minimum or saddle.

A common mistake is to treat \(\nabla f\) as a number: it is a vector, and the direction of fastest increase requires normalizing it. Its immediate application is the directional derivative, which comes next.

Think about it

A hiker stands where \(|\nabla h|=0.2\) (height \(h\)). What is the maximum slope and in which direction does it occur?

The maximum slope is \(0.2\) (it rises 20 cm per horizontal meter), in the direction of the gradient of \(h\); in the perpendicular directions the hiker walks at constant height.

Exercises 10

References

  • James Stewart, Daniel K. Clegg, Saleem Watson, Calculus: Early Transcendentals, 9th edition, Cengage, 2021. §14.6
  • Joel Hass, Christopher Heil, Przemyslaw Bogacki, Maurice D. Weir, George B. Thomas Jr., Thomas' Calculus, 15th edition, Pearson, 2023. §14.5
  • Jerrold E. Marsden, Anthony Tromba, Vector Calculus, 6th edition, W. H. Freeman, 2012. §2.6