Skip to main content

Section 16.2 Vector Fields

We have studied functions of two and three variables, where the input of such functions is a point (either a point in the plane or in space) and the output is a number.

We could also create functions where the input is a point (again, either in the plane or in space), but the output is a vector. For instance, we could create the following function: \(\vec F(x,y) = \langle x+y, x-y\rangle\text{,}\) where \(\vec F(2,3) = \langle 5,-1\rangle\text{.}\) We are to think of \(\vec F\) assigning the vector \(\langle 5,-1\rangle\) to the point \((2,3)\text{;}\) in some sense, the vector \(\langle 5,-1\rangle\) lies at the point \((2,3)\text{.}\)

Figure 16.2.1. Introducing vector fields

Such functions are extremely useful in any context where magnitude and direction are important. For instance, we could create a function \(\vec F\) that represents the electromagnetic force exerted at a point by a electromagnetic field, or the velocity of air as it moves across an airfoil.

Because these functions are so important, we need to formally define them.

Definition 16.2.2. Vector Field.
  1. A vector field in the plane is a function \(\vec F(x,y)\) whose domain is a subset of \(\mathbb{R}^2\) and whose output is a two-dimensional vector:

    \begin{equation*} \vec F(x,y) = \langle M(x,y), N(x,y)\rangle\text{.} \end{equation*}
  2. A vector field in space is a function \(\vec F(x,y,z)\) whose domain is a subset of \(\mathbb{R}^3\) and whose output is a three-dimensional vector:

    \begin{equation*} \vec F(x,y,z) = \langle M(x,y,z), N(x,y,z), P(x,y,z)\rangle\text{.} \end{equation*}

This definition may seem odd at first, as a special type of function is called a “field.” However, as the function determines a “field of vectors”, we can say the field is defined by the function, and thus the field is a function.

(a)
(b)
Figure 16.2.3. Demonstrating methods of graphing vector fields

Visualizing vector fields helps cement this connection. When graphing a vector field in the plane, the general idea is to draw the vector \(\vec F(x,y)\) at the point \((x,y)\text{.}\) For instance, using \(\vec F(x,y) = \langle x+y,x-y\rangle\) as before, at \((1,1)\) we would draw \(\langle 2,0\rangle\text{.}\)

In Figure 16.2.3.(a), one can see that the vector \(\langle 2,0\rangle\) is drawn starting from the point \((1,1)\text{.}\) A total of 8 vectors are drawn, with the \(x\)- and \(y\)-values of \(-1,0,1\text{.}\) In many ways, the resulting graph is a mess; it is hard to tell what this field “looks like.”

In Figure 16.2.3.(b), the same field is redrawn with each vector \(\vec F(x,y)\) drawn centered on the point \((x,y)\text{.}\) This makes for a better looking image, though the long vectors can cause confusion: when one vector intersects another, the image looks cluttered.

A common way to address this problem is limit the length of each arrow, and represent long vectors with thick arrows, as done in Figure 16.2.4.(a). Usually we do not use a graph of a vector field to determine exactly the magnitude of a particular vector. Rather, we are more concerned with the relative magnitudes of vectors: which are bigger than others? Thus limiting the length of the vectors is not problematic.

(a)
(b)
Figure 16.2.4. Demonstrating methods of graphing vector fields

Drawing arrows with variable thickness is best done with technology; search the documentation of your favorite graphing program for terms like “vector fields” or “slope fields” to learn how. Technology obviously allows us to plot many vectors in a vector field nicely; in Figure 16.2.4.(b), we see the same vector field drawn with many vectors, and finally get a clear picture of how this vector field behaves. (If this vector field represented the velocity of air moving across a flat surface, we could see that the air tends to move either to the upper-right or lower-left, and moves very slowly near the origin.)

We can similarly plot vector fields in space, as shown in Figure 16.2.5, though it is not often done. The plots get very busy very quickly, as there are lots of arrows drawn in a small amount of space. In Figure 16.2.5 the field \(\vec F = \langle -y,x,z\rangle\) is graphed. If one could view the graph from above, one could see the arrows point in a circle about the \(z\)-axis. One should also note how the arrows far from the origin are larger than those close to the origin.

It is good practice to try to visualize certain vector fields in one's head. For instance, consider a point mass at the origin and the vector field that represents the gravitational force exerted by the mass at any point in the room. The field would consist of arrows pointing toward the origin, increasing in size as they near the origin (as the gravitational pull is strongest near the point mass).

Figure 16.2.5. Graphing a vector field in space

Subsection 16.2.1 Vector Field Notation and Del Operator

Definition 16.2.2 defines a vector field \(\vec F\) using the notation

\begin{equation*} \vec F(x,y) = \langle M(x,y), N(x,y)\rangle \text{ and } \vec F(x,y,z) = \langle M(x,y,z), N(x,y,z),P(x,y,z)\rangle\text{.} \end{equation*}

That is, the components of \(\vec F\) are each functions of \(x\) and \(y\) (and also \(z\) in space). As done in other contexts, we will drop the “of \(x\text{,}\) \(y\) and \(z\)” portions of the notation and refer to vector fields in the plane and in space as

\begin{equation*} \vec F = \langle M, N\rangle \text{ and } \vec F = \langle M,N,P\rangle\text{,} \end{equation*}

respectively, as this shorthand is quite convenient.

Another item of notation will become useful: the “del operator.” Recall in Section 14.3 how we used the symbol \(\nabla\) (pronounced “del”) to represent the gradient of a function of two variables. That is, if \(z = f(x,y)\text{,}\) then “del \(f\)” \(= \nabla f = \langle f_x, f_y\rangle\text{.}\)

Figure 16.2.6. Introducing the del operator

We now define \(\nabla\) to be the “del operator.” It is a vector whose components are partial derivative operations.

In the plane, \(\ds\nabla = \left\langle \frac{\partial}{\partial x}, \frac{\partial}{\partial y}\right\rangle\text{;}\) in space, \(\ds\nabla = \left\langle \frac{\partial}{\partial x}, \frac{\partial}{\partial y},\frac{\partial}{\partial z}\right\rangle\text{.}\)

With this definition of \(\nabla\text{,}\) we can better understand the gradient \(\nabla f\text{.}\) As \(f\) returns a scalar, the properties of scalar and vector multiplication gives

\begin{equation*} \nabla f = \left\langle \frac{\partial}{\partial x}, \frac{\partial}{\partial y}\right\rangle f = \left\langle \frac{\partial}{\partial x}\,f, \frac{\partial}{\partial y}\,f\right\rangle = \langle f_x, f_y\rangle\text{.} \end{equation*}
Figure 16.2.7. Del and the gradient

Now apply the del operator \(\nabla\) to vector fields. Let \(\vec F = \langle x+\sin y,y^2+z,x^2\rangle\text{.}\) We can use vector operations and find the dot product of \(\nabla\) and \(\vec F\text{:}\)

\begin{align*} \nabla \cdot \vec F \amp = \left\langle \frac{\partial}{\partial x}, \frac{\partial}{\partial y},\frac{\partial}{\partial z}\right\rangle\cdot \langle x+\sin y,y^2+z,x^2\rangle\\ \amp = \frac{\partial}{\partial x}(x+\sin y)+ \frac{\partial}{\partial y}(y^2+z) + \frac{\partial}{\partial z}(x^2)\\ \amp =1+2y\text{.} \end{align*}

We can also compute their cross products:

\begin{align*} {\nabla\times \vec F }\amp = {\left\langle \frac{\partial}{\partial y}\big(x^2\big)-\frac{\partial}{\partial z}\big(y^2+z\big),\frac{\partial}{\partial z}\big(x+\sin y\big)-\frac{\partial}{\partial x}\big(x^2\big),\frac{\partial}{\partial x}\big(y^2+z\big)-\frac{\partial}{\partial y}\big(x+\sin y\big)\right\rangle }\\ \amp =\langle -1,-2x,-\cos y\rangle\text{.} \end{align*}

We do not yet know why we would want to compute the above. However, as we next learn about properties of vector fields, we will see how these dot and cross products with the del operator are quite useful.

Subsection 16.2.2 Divergence and Curl

Two properties of vector fields will prove themselves to be very important: divergence and curl. Each is a special “derivative” of a vector field; that is, each measures an instantaneous rate of change of a vector field.

Figure 16.2.8. Introducing the divergence

If the vector field represents the velocity of a fluid or gas, then the divergence of the field is a measure of the “compressibility” of the fluid. If the divergence is negative at a point, it means that the fluid is compressing: more fluid is going into the point than is going out. If the divergence is positive, it means the fluid is expanding: more fluid is going out at that point than going in. A divergence of zero means the same amount of fluid is going in as is going out. If the divergence is zero at all points, we say the field is incompressible.

It turns out that the proper measure of divergence is simply \(\nabla \cdot \vec F\text{,}\) as stated in the following definition.

Definition 16.2.9. Divergence of a Vector Field.

The divergence of a vector field \(\vec F\) is

\begin{equation*} \divv \vec F = \nabla \cdot \vec F\text{.} \end{equation*}
  • In the plane, with \(\vec F = \langle M,N\rangle\text{,}\) \(\divv \vec F = M_x+N_y\text{.}\)

  • In space, with \(\vec F = \langle M,N,P\rangle\text{,}\) \(\divv \vec F = M_x+N_y+P_z\text{.}\)

Figure 16.2.10. Introducing the curl

Curl is a measure of the spinning action of the field. Let \(\vec F\) represent the flow of water over a flat surface. If a small round cork were held in place at a point in the water, would the water cause the cork to spin? No spin corresponds to zero curl; counterclockwise spin corresponds to positive curl and clockwise spin corresponds to negative curl.

In space, things are a bit more complicated. Again let \(\vec F\) represent the flow of water, and imagine suspending a tennis ball in one location in this flow. The water may cause the ball to spin along an axis. If so, the curl of the vector field is a vector (not a scalar, as before), parallel to the axis of rotation, following a right hand rule: when the thumb of one's right hand points in the direction of the curl, the ball will spin in the direction of the curling fingers of the hand.

In space, it turns out the proper measure of curl is \(\nabla \times \vec F\text{,}\) as stated in the following definition. To find the curl of a planar vector field \(\vec F = \langle M,N\rangle\text{,}\) embed it into space as \(\vec F = \langle M, N, 0\rangle\) and apply the cross product definition. Since \(M\) and \(N\) are functions of just \(x\) and \(y\) (and not \(z\)), all partial derivatives with respect to \(z\) become 0 and the result is simply \(\langle 0,0,N_x-M_y\rangle\text{.}\) The third component is the measure of curl of a planar vector field.

Definition 16.2.11. Curl of a Vector Field.
  • Let \(\vec F = \langle M,N\rangle\) be a vector field in the plane. The curl of \(\vec F\) is \(\curl \vec F = N_x - M_y\text{.}\)

  • Let \(\vec F = \langle M,N,P\rangle\) be a vector field in space. The curl of \(\vec F\) is \(\curl \vec F = \nabla \times \vec F = \langle P_y-N_z,M_z-P_x,N_x - M_y\rangle\text{.}\)

We adopt the convention of referring to curl as \(\nabla \times \vec F\text{,}\) regardless of whether \(\vec F\) is a vector field in two or three dimensions.

Figure 16.2.12. Interpreting the curl of a vector field

We now practice computing these quantities.

Example 16.2.13. Computing divergence and curl of planar vector fields.

For each of the planar vector fields given below, view its graph and try to visually determine if its divergence and curl are 0. Then compute the divergence and curl.

  1. \(\vec F = \langle y,0\rangle\) (see Figure 16.2.14.(a))

  2. \(\vec F = \langle -y,x\rangle\) (see Figure 16.2.14.(b))

  3. \(\vec F = \langle x,y\rangle\) (see Figure 16.2.15.(a))

  4. \(\vec F = \langle \cos y, \sin x\rangle\) (see Figure 16.2.15.(b))

Solution
  1. The arrow sizes are constant along any horizontal line, so if one were to draw a small box anywhere on the graph, it would seem that the same amount of fluid would enter the box as exit. Therefore it seems the divergence is zero; it is, as

    \begin{equation*} \divv\vec F = \nabla \cdot \vec F = M_x + N_y = \frac{\partial}{\partial x}(y) + \frac{\partial}{\partial y}(0) = 0\text{.} \end{equation*}
    (a)
    (b)
    Figure 16.2.14. The vector fields in parts 1 and 2 in Example 16.2.13

    At any point on the \(x\)-axis, arrows above it move to the right and arrows below it move to the left, indicating that a cork placed on the axis would spin clockwise. A cork placed anywhere above the \(x\)-axis would have water above it moving to the right faster than the water below it, also creating a clockwise spin. A clockwise spin also appears to be created at points below the \(x\)-axis. Thus it seems the curl should be negative (and not zero). Indeed, it is:

    \begin{equation*} \curl \vec F = \nabla\times\vec F = N_x-M_y = \frac{\partial}{\partial x}(0) - \frac{\partial}{\partial y}(y) = -1\text{.} \end{equation*}
  2. It appears that all vectors that lie on a circle of radius \(r\text{,}\) centered at the origin, have the same length (and indeed this is true). That implies that the divergence should be zero: draw any box on the graph, and any fluid coming in will lie along a circle that takes the same amount of fluid out. Indeed, the divergence is zero, as

    \begin{equation*} \divv\vec F = \nabla \cdot \vec F = M_x + N_y = \frac{\partial}{\partial x}(-y) + \frac{\partial}{\partial y}(x) = 0\text{.} \end{equation*}

    Clearly this field moves objects in a circle, but would it induce a cork to spin? It appears that yes, it would: place a cork anywhere in the flow, and the point of the cork closest to the origin would feel less flow than the point on the cork farthest from the origin, which would induce a counterclockwise flow. Indeed, the curl is positive:

    \begin{equation*} \curl \vec F = \nabla\times\vec F = N_x-M_y = \frac{\partial}{\partial x}(x) - \frac{\partial}{\partial y}(-y) = 1-(-1) = 2\text{.} \end{equation*}

    Since the curl is constant, we conclude the induced spin is the same no matter where one is in this field.

  3. At the origin, there are many arrows pointing out but no arrows pointing in. We conclude that at the origin, the divergence must be positive (and not zero). If one were to draw a box anywhere in the field, the edges farther from the origin would have larger arrows passing through them than the edges close to the origin, indicating that more is going from a point than going in. This indicates a positive (and not zero) divergence. This is correct:

    \begin{equation*} \divv\vec F = \nabla \cdot \vec F = M_x + N_y = \frac{\partial}{\partial x}(x) + \frac{\partial}{\partial y}(y) = 1+1=2\text{.} \end{equation*}

    One may find this curl to be harder to determine visually than previous examples. One might note that any arrow that induces a clockwise spin on a cork will have an equally sized arrow inducing a counterclockwise spin on the other side, indicating no spin and no curl. This is correct, as

    \begin{equation*} \curl \vec F = \nabla\times\vec F = N_x-M_y = \frac{\partial}{\partial x}(y) - \frac{\partial}{\partial y}(x) = 0\text{.} \end{equation*}
    (a)
    (b)
    Figure 16.2.15. The vector fields in parts 3 and 4 in Example 16.2.13
  4. One might find this divergence hard to determine visually as large arrows appear in close proximity to small arrows, each pointing in different directions. Instead of trying to rationalize a guess, we compute the divergence:

    \begin{equation*} \divv\vec F = \nabla \cdot \vec F = M_x + N_y = \frac{\partial}{\partial x}(\cos y) + \frac{\partial}{\partial y}(\sin x) = 0\text{.} \end{equation*}

    Perhaps surprisingly, the divergence is 0. Will all the loops of different directions in the field, one is apt to reason the curl is variable. Indeed, it is:

    \begin{equation*} \curl \vec F = \nabla\times\vec F = N_x-M_y = \frac{\partial}{\partial x}(\sin x) - \frac{\partial}{\partial y}(\cos y) = \cos x + \sin y\text{.} \end{equation*}

    Depending on the values of \(x\) and \(y\text{,}\) the curl may be positive, negative, or zero.

Example 16.2.16. Computing divergence and curl of vector fields in space.

Compute the divergence and curl of each of the following vector fields.

  1. \(\displaystyle \vec F = \langle x^2+y+z, -x-z, x+y\rangle\)

  2. \(\displaystyle \vec F = \langle e^{xy}, \sin(x+z),x^2+y\rangle\)

Solution

We compute the divergence and curl of each field following the definitions.

  1. \begin{align*} \divv \vec F \amp = \nabla \cdot \vec F = M_x+N_y+P_z = 2x+0+0= 2x\\ \curl\vec F \amp = \nabla \times \vec F = \langle P_y-N_z,M_z-P_x,N_x - M_y\rangle\\ \amp = \langle 1 - (-1), 1-1,-1-(1)\rangle = \langle 2,0,-2\rangle\text{.} \end{align*}

    For this particular field, no matter the location in space, a spin is induced with axis parallel to \(\langle 2,0,-2\rangle\text{.}\)

  2. \begin{align*} \divv \vec F \amp = \nabla \cdot \vec F = M_x+N_y+P_z = ye^{xy}+0+0= ye^{xy}\\ \curl\vec F \amp = \nabla \times \vec F = \langle P_y-N_z,M_z-P_x,N_x - M_y\rangle\\ \amp = \langle 1-\cos(x+z), -2x, \cos(x+z) - xe^{xy}\rangle \end{align*}
Figure 16.2.17. Further examples with divergence
Example 16.2.18. Creating a field representing gravitational force.

The force of gravity between two objects is inversely proportional to the square of the distance between the objects. Locate a point mass at the origin. Create a vector field \(\vec F\) that represents the gravitational pull of the point mass at any point \((x,y,z)\text{.}\) Find the divergence and curl of this field.

Solution

The point mass pulls toward the origin, so at \((x,y,z)\text{,}\) the force will pull in the direction of \(\langle -x, -y, -z\rangle\text{.}\) To get the proper magnitude, it will be useful to find the unit vector in this direction. Dividing by its magnitude, we have

\begin{equation*} \vec u = \left\langle \frac{-x}{\sqrt{x^2+y^2+z^2}}, \frac{-y}{\sqrt{x^2+y^2+z^2}},\frac{-z}{\sqrt{x^2+y^2+z^2}}\right\rangle\text{.} \end{equation*}

The magnitude of the force is inversely proportional to the square of the distance between the two points. Letting \(k\) be the constant of proportionality, we have the magnitude as \(\ds\frac{k}{x^2+y^2+z^2}\text{.}\) Multiplying this magnitude by the unit vector above, we have the desired vector field:

\begin{equation*} \vec F = \left\langle \frac{-kx}{(x^2+y^2+z^2)^{3/2}}, \frac{-ky}{(x^2+y^2+z^2)^{3/2}},\frac{-kz}{(x^2+y^2+z^2)^{3/2}}\right\rangle\text{.} \end{equation*}

We leave it to the reader to confirm that \(\divv \vec F = 0\) and \(\curl \vec F = \vec 0\text{.}\)

The analogous planar vector field is given in Figure 16.2.19. Note how all arrows point to the origin, and the magnitude gets very small when “far” from the origin.

Figure 16.2.19. A vector field representing a planar gravitational force

A function \(f(x,y)\) naturally induces a vector field, \(\vec F = \nabla f = \langle f_x,f_y\rangle\text{.}\) Given what we learned of the gradient in Section 14.3, we know that the vectors of \(\vec F\) point in the direction of greatest increase of \(f\text{.}\) Because of this, \(f\) is said to be the potential function of \(\vec F\text{.}\) Vector fields that are the gradient of potential functions will play an important role in the next section.

Example 16.2.20. A vector field that is the gradient of a potential function.

Let \(f(x,y) = 3-x^2-2y^2\) and let \(\vec F = \nabla f\text{.}\) Graph \(\vec F\text{,}\) and find the divergence and curl of \(\vec F\text{.}\)

Solution

Given \(f\text{,}\) we find \(\vec F = \nabla f = \langle -2x,-4y\rangle\text{.}\) A graph of \(\vec F\) is given in Figure 16.2.21.(a). In Figure 16.2.21.(b), the vector field is given along with a graph of the surface itself; one can see how each vector is pointing in the direction of “steepest uphill”, which, in this case, is not simply just “toward the origin.”

(a)
(b)
Figure 16.2.21. A graph of a function \(f(x,y)\) and the vector field \(\vec F = \nabla f\) in Example 16.2.20

We leave it to the reader to confirm that \(\divv \vec F = -6\) and \(\curl \vec F = 0\text{.}\)

There are some important concepts visited in this section that will be revisited in subsequent sections and again at the very end of this chapter. One is: given a vector field \(\vec F\text{,}\) both \(\divv\vec F\) and \(\curl\vec F\) are measures of rates of change of \(\vec F\text{.}\) The divergence measures how much the field spreads (diverges) at a point, and the curl measures how much the field twists (curls) at a point. Another important concept is this: given \(z=f(x,y)\text{,}\) the gradient \(\nabla f\) is also a measure of a rate of change of \(f\text{.}\) We will see how the integrals of these rates of change produce meaningful results.

This section introduces the concept of a vector field. The next section “applies calculus” to vector fields. A common application is this: let \(\vec F\) be a vector field representing a force (hence it is called a “force field,” though this name has a decidedly comic-book feel) and let a particle move along a curve \(C\) under the influence of this force. What work is performed by the field on this particle? The solution lies in correctly applying the concepts of line integrals in the context of vector fields.

Exercises 16.2.3 Exercises

Terms and Concepts
1.

Give two quantities that can be represented by a vector field in the plane or in space.

2.

In your own words, describe what it means for a vector field to have a negative divergence at a point.

3.

In your own words, describe what it means for a vector field to have a negative curl at a point.

4.

The divergence of a vector field \(\vec F\) at a particular point is 0. Does this mean that \(\vec F\) is incompressible? Why/why not?

Problems

In the following exercises, sketch the given vector field over the rectangle with opposite corners \((-2,-2)\) and \((2,2)\text{,}\) sketching one vector for every point with integer coordinates (i.e., at \((0,0)\text{,}\) \((1,2)\text{,}\) etc.).

5.

\(\vec F = \langle x,0\rangle\)

6.

\(\vec F = \langle 0,x\rangle\)

7.

\(\vec F = \langle 1,-1\rangle\)

8.

\(\vec F = \langle y^2,1\rangle\)

In the following exercises, find the divergence and curl of the given vector field.

9.

\(\vec F = \langle x,y^2\rangle\)

10.

\(\vec F = \langle -y^2,x\rangle\)

11.

\(\vec F = \langle \cos (xy), \sin (xy)\rangle\)

12.

\(\ds\vec F = \la \frac{-2x}{(x^2+y^2)^2},\frac{-2y}{(x^2+y^2)^2}\ra\)

13.

\(\ds\vec F = \la x+y,y+z,x+z\ra\)

14.

\(\ds\vec F = \la x^2+z^2,x^2+y^2,y^2+z^2\ra\)

15.

\(\vec F = \nabla f\text{,}\) where \(f(x,y) = \frac12x^2+\frac13y^3\text{.}\)

16.

\(\vec F = \nabla f\text{,}\) where \(f(x,y) = x^2y\text{.}\)

17.

\(\vec F = \nabla f\text{,}\) where \(f(x,y,z) = x^2y+\sin z\text{.}\)

18.

\(\vec F = \nabla f\text{,}\) where \(\ds f(x,y,z) = \frac1{x^2+y^2+z^2}\text{.}\)