Gradient vector

From Calculus

This article describes an analogue for functions of multiple variables of the following term/fact/notion for functions of one variable: derivative

Definition at a point

Generic definition

Suppose f is a function of many variables. We can view f as a function of a vector variable. The gradient vector at a particular point in the domain is a vector whose direction captures the direction (in the domain) along which changes to f are concentrated, and whose magnitude is the directional derivative in that direction.

If the gradient vector of f exists at a point, then we say that f is differentiable at that point.

Formal epsilon-delta definition

Suppose f is a function of a vector variable x¯. Suppose c¯ is a point in the interior of the domain of f, i.e., f is defined in an open ball centered at c¯. The gradient vector of f at c¯, denoted (∇f)(c¯), is a vector v¯ satisfying the following:

  • For every ϵ>0
  • there exists δ>0 such that
  • for every x¯ satisfying 0<|x¯−c¯|<δ (in other words, x¯ is in an open ball of radius δ centered at c¯, but not qual to c¯)
  • we have |f(x¯)−f(c¯)−v¯⋅(x¯−c¯)|<ϵ|x¯−c¯|

Note on why the epsilon-delta definition is necessary

Intuitively, we want to define the gradient vector analogously to the derivative of a function of one variable, i.e., as the limit of the difference quotient:

limx¯→c¯f(x¯)−f(c¯)x¯−c¯

Unfortunately, the above notation does not make direct sense because it is not permissible to divide a scalar by a vector. To rectify this, we revisit what the ϵ−δ definition of the derivative says. It turns out that that ϵ−δ definition can more readily be generalized to functions of vector variables. The key insight is to use the dot product of vectors.

{{#widget:YouTube|id=0a9NEdMHSpI}}

Definition as a function

Generic definition

Suppose f is a function of many variables. We can view f as a function of a vector variable. The gradient vector of f is a vector-valued function (with vector outputs in the same dimension as vector inputs) defined as follows: it sends every point to the gradient vector of the function at the point. Note that the domain of the function is precisely the subset of the domain of f where the gradient vector is defined.

If the gradient vector of f exists at all points of the domain of f, we say that f is differentiable everywhere on its domain.

{{#widget:YouTube|id=cg7z5auWG30}}

Relation with directional derivatives

Statement of relation

For further information, refer: Relation between gradient vector and directional derivatives

Version type Statement
at a point, in vector notation (multiple variables) Suppose f is a function of a vector variable x¯=⟨x1,x2,…,xn⟩. Suppose u¯ is a unit vector and a¯ is a point in the domain of f. Suppose that the gradient vector of f at a¯ exists. We denote this gradient vector by ∇f(a¯). Then, we have the following relationship:
Du¯(f)(a¯)=u¯⋅(∇f(a¯))
The right side here is the dot product of vectors.
generic point, in vector notation (multiple variables) Suppose f is a function of a vector variable x¯=⟨x1,x2,…,xn⟩. Suppose u¯ is a unit vector. We then have:
Du¯(f)(x¯)=u¯⋅(∇f(x¯))
The right side here is a dot product of vectors. The equality holds whenever the right side makes sense.
generic point, point-free notation (multiple variables) Suppose f is a function of a vector variable x¯=⟨x1,x2,…,xn⟩. Suppose u¯ is a unit vector. We then have:
Du¯(f)=u¯⋅(∇f)
The right side here is a dot product of vector-valued functions (the constant function u¯ and the gradient vector of f). The equality holds whenever the right side makes sense.
{{#widget:YouTube|id=TvvSB2q5L1E}}
{{#widget:YouTube|id=RvponqyVtFU}}

Relation with partial derivatives

For further information, refer: Relation between gradient vector and partial derivatives

Version type Statement
at a point, in multivariable notation Suppose f is a real-valued function of n variables x1,x2,…,xn. Suppose (a1,a2,…,an) is a point in the domain of f such that the gradient vector of f at (a1,a2,…,an), denoted (∇f)(a1,a2,…,an), exists. Then, the partial derivatives of f with respect to all variables exist, and the coordinates of the gradient vector are the partial derivatives. In other words:
(∇f)(a1,a2,…,an)=⟨fx1(a1,a2,…,an),fx2(a1,a2,…,an),…fxn(a1,a2,…,an)⟩
generic point, in multivariable notation Suppose f is a real-valued function of n variables x1,x2,…,xn. Then, we have
(∇f)(x1,x2,…,xn)=⟨fx1(x1,x2,…,xn),fx2(x1,x2,…,xn),…fxn(x1,x2,…,xn)⟩.
Equality holds wherever the left side makes sense.
generic point, point-free notation Suppose f is a function of n variables x1,x2,…,xn. Then, we have
∇f=⟨fx1,fx2,…fxn⟩. Equality holds wherever the left side makes sense.
{{#widget:YouTube|id=yINihD_bYzA}}

Graphical interpretation

For a function of two variables

Suppose f is a function of two variables x,y and suppose (x0,y0) is a point in the domain. We say that f is differentiable at a point (x0,y0) if the gradient vector exists at the point. This is equivalent to the graph of the function having a well defined tangent plane at (x0,y0,f(x0,y0)). Further, the equation of this tangent plane is given by:

z−f(x0,y0)=fx(x0,y0)(x−x0)+fy(x0,y0)(y−y0)

Another way of putting this is:

z−f(x0,y0)=(∇f)(x0,y0)⋅(⟨x,y⟩−⟨x0,y0⟩)

Note that it is possible that the partial derivatives both exist but the function is not differentiable. In this case, the surface does not have a well defined tangent plane at the point. Even though we can define a plane by the equation above, this is not the tangent plane, because the tangent plane does not exist.

For a function of multiple variables

Suppose f is a function of multiple variables x1,x2,…,xn and suppose (a1,a2,…,an) is a point in the domain of f. We say that f is differentiable at (a1,a2,…,an) if the gradient vector (∇f)(a1,a2,…,an) exists. This is equivalent to the graph of the function having a well defined tangent hyperplane at the point (a1,a2,…,an,f(a1,a2,,˙an)). The equation of the tangent hyperplane is given by:

xn+1−f(a1,a2,…,an)=(∇f)(a1,a2,…,an)⋅(⟨x1,x2,…,xn⟩−⟨a1,a2,…,an⟩)