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{.}\)
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.
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.
This image illustrates the fact that this conception does not work well in practice. Eight different vectors are plotted, each with its tail at the point used to compute the vector. The vectors end up in a couple of configurations resembling tridents, and the overall effect is not very informative.
This plot shows the same vectors that were plotted in Figure 15.2.3.(a). The difference is that this time, the vectors have been shifted so that their midpoint, not their tail, is at the point used to compute each vector.
This image gives a better idea of the directions represented by the vector field; however, it is still somewhat confusing due to the length of the vectors. To help with visualization, the vectors in a vector field are often drawn much shorter than their true length.
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 15.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 15.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 15.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.
This is another representation of the vector field in Figure 15.2.3. In this version, the vectors plotted are shorter than their “true” length. Instead, relative length is used to indicate varying magnitude.
This change reduces clutter and makes it easier to understand the vector field. Eight vectors are plotted at the points \((1,1)\text{,}\)\((1,0)\text{,}\)\((1,-1)\text{,}\)\((0,-1)\text{,}\)\((-1,-1)\text{,}\)\((-1,0)\text{,}\)\((-1,1)\text{,}\) and \((0,1)\text{.}\)
As we move counter-clockwise about the square, the vectors rotate clockwise. The vector at \((1,1)\) points to the right, and the vector at each adjacent point is rotated by 45 degrees as we move around the square.
We get one more plot of the same vector field use in Figure 15.2.4.(a) and the previous images in this section. This time, instead of eight vectors being plotted, there are about eighty.
Using more vectors, we can see that magnitude increases with distance from the origin, and the directions of the vectors appear to follow hyperbolic curves in the plane.
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 15.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 15.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 15.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).
This plot shows a vector field in three dimensions, relative to the usual coordinate axes. It is a very cluttered plot. With the default perspective, it appears to be a large jumble of arrows, pointing every which way in space.
Rotating the image reveals a bit more structure: from above, the arrows appear to follow a circular trajectory. In fact, the vectors in this vector field are all tangent to helical curves, with those above the \(xy\) plane pointing upward, and those below pointing downward.
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 13.6 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{.}\)
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
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{:}\)
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.
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.
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.
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.
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. (Some people prefer to write \((\nabla\times \vec F)\cdot \vec k\) in two dimensions.)
Example15.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.
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
Near the \(x\) axis, the magnitude of the vectors is very small, and the vector field vanishes completely along the \(x\) axis. The vectors get larger as they get further from the \(x\) axis.
A two-dimensional vector field is plotted against \(x\) and \(y\) coordinate axes. The vectors in this vector field appear to describe circular motion. Each vector could be tangent to a circle centered at the origin, although no circles are depicted in the image. The directions of the vectors correspond to counter-clockwise motion.
The magnitudes of the vectors depend on their distance from the origin. Vectors near the centre of the image are small, while those near the edges are larger.
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*}
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
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.
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:
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 two-dimensional vector field is plotted against \(x\) and \(y\) coordinate axes. The vectors in this vector field could be tangent to lines through the origin: each one points directly away from the origin, in the same direction as the line from the origin to the point where the vector is plotted.
A two-dimensional vector field is plotted against \(x\) and \(y\) coordinate axes. This vector field is quite chaotic, as one might expect given the oscillatory nature of the sine and cosine functions.
There appear to be several “vortices”, where the vectors circulate around certain points. Between each vortex is an area where the vectors could be tangent to a hyperbola, like contour lines from a hyperbolic paraboloid.
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:
Perhaps surprisingly, the divergence is 0. With 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.
Example15.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.
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*}
A two-dimensional vector field is plotted relative to the \(x\) and \(y\) axes, with the origin at the center of the image. This is a radial vector field, like the one in Figure 15.2.15.(a), but there are some important differences.
The analogous planar vector field is given in Figure 15.2.19. Note how all arrows point to the origin, and the magnitude gets very small when “far” from the origin.
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 13.6, 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.
Given \(f\text{,}\) we find \(\vec F = \nabla f = \langle -2x,-4y\rangle\text{.}\) A graph of \(\vec F\) is given in Figure 15.2.21.(a). In Figure 15.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.”
The vectors appear to lie tangent to curved paths. In particular, vectors above the \(x\) axis lie tangent to paths that could be a family of parabolas of the form \(y=kx^2\text{,}\) where \(k\gt 0\text{.}\) Vectors near the \(x\) axis are nearly horizontal, and could be tangent to a very wide parabola (with \(k\) very small). Vectors near the \(y\) axis are nearly vertical, and could be tangent to a very steep parabola (with \(k\) very large).
The image is three-dimensional, with \(x\text{,}\)\(y\text{,}\) and \(z\) coordinate axes, and the origin at the center of the image. The vector field from Figure 15.2.21.(a) is plotted in the \(xy\) plane. Above the plane is the graph of the function \(f(x,y)=3-x^2-2y^2\text{;}\) the graph is a downward-opening elliptic paraboloid.
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.
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.).