Multivariable Calculus · Undergraduate

Vector Fields

Quick answer

A vector field F assigns a vector to each point of the plane or of space, such as the velocity of a fluid or the force of gravity. In the plane it has two component functions, F = (P, Q). Drawing arrows at a grid of points shows the pattern: rotation, flow outward, flow along a slope. The gradient of any function f is a vector field, perpendicular to the level curves of f. A flow line is a curve whose velocity at each moment equals the field there.

What you'll learn

  • Evaluate and sketch a vector field in the plane
  • Recognize rotational, radial and gradient fields
  • Compute the gradient field of a function
  • Verify that a curve is a flow line of a field

An arrow at every point

A weather map shows wind as arrows scattered across a country, each one giving the wind’s direction and speed at its location. That is a vector field: a function that takes a point and returns a vector. In the plane,

F(x,y)=P(x,y) i+Q(x,y) j=(P(x,y), Q(x,y))\mathbf{F}(x, y) = P(x, y)\,\mathbf{i} + Q(x, y)\,\mathbf{j} = \big(P(x, y),\ Q(x, y)\big)

with two ordinary functions PP and QQ as its components. In space a field has three components, F=(P,Q,R)\mathbf{F} = (P, Q, R), each a function of xx, yy and zz. Velocity fields describe fluids, force fields describe gravity and electricity, and gradient fields describe how a function changes.

To draw a field, evaluate it at a grid of points and draw each vector as an arrow there. The arrows below are all scaled by one factor, so their lengths compare correctly even though they are shorter than the true vectors.

The rotation field (−y, x) Arrows at a grid of points, each perpendicular to the line from the origin and pointing counterclockwise. The arrows grow longer with distance from the origin, like the velocities of points on a spinning wheel. -3-2-1123-3-2-1123xy
The rotation field (−y, x)

Why fields are the right language

A single vector describes one velocity or one force. Most of physics needs a vector at every point at once: the velocity of every drop of a river, the pull of the Sun at every position a planet might occupy. Calculus with fields answers questions that single vectors cannot. How much work does the wind do on a kite flying along a path? How much water crosses a net each second? Does a fluid swirl, and does it spread out? A vector field packages the whole situation into one object, so these questions become integrals and derivatives of the field. The next lessons build exactly those tools: line integrals, then Green’s theorem.

Worked examples

The radial field (x, y) Arrows at a grid of points, each pointing straight away from the origin, growing longer with distance from the origin. -3-2-1123-3-2-1123xy
The radial field (x, y)
The gradient field of xy with its level curves Arrows of the field (y, x) at a grid of points, together with the hyperbolas xy = 1 and xy = −1. Each arrow crosses the hyperbola near it at a right angle, pointing toward larger values of xy. -3-2-1123-3-2-1123xy
  • xy = 1
  • xy = −1
The gradient field of xy with its level curves

Flow lines

Drop a cork into a fluid with velocity field F\mathbf{F}. Its path r(t)\mathbf{r}(t) has velocity equal to the field wherever it is:

r′(t)=F(r(t))\mathbf{r}'(t) = \mathbf{F}\big(\mathbf{r}(t)\big)

Such a curve is a flow line, or streamline. In a picture of the field, flow lines are the curves that the arrows are tangent to.

Common mistakes

Practice problems

  1. Evaluate F(x,y)=(x−y, x)\mathbf{F}(x, y) = (x - y,\ x) at (2,−1)(2, -1) and find the length of the vector.

    Answer

    (3,2)(3, 2), length 13\sqrt{13}

    Full solution

    P=2−(−1)=3P = 2 - (-1) = 3 and Q=2Q = 2. The length is 9+4=13\sqrt{9 + 4} = \sqrt{13}.

  2. Find the gradient field of f(x,y)=x2+y2f(x, y) = x^2 + y^2 and describe it.

    Answer

    ∇f=(2x, 2y)\nabla f = (2x,\ 2y), the radial field doubled

    Full solution

    The arrows point straight away from the origin, twice as long as the position vector. They cross the circular level curves x2+y2=kx^2 + y^2 = k at right angles.

  3. Find the gradient field of f(x,y)=exyf(x, y) = e^{xy}.

    Answer

    ∇f=(yexy, xexy)\nabla f = \big(y e^{xy},\ x e^{xy}\big)

    Full solution

    By the chain rule, fx=exy⋅yf_x = e^{xy} \cdot y and fy=exy⋅xf_y = e^{xy} \cdot x.

  4. Find the gradient field of f(x,y,z)=xyzf(x, y, z) = xyz.

    Answer

    ∇f=(yz, xz, xy)\nabla f = (yz,\ xz,\ xy)

    Full solution

    Each partial derivative treats the other two variables as constants.

  5. Which field has every arrow pointing straight toward the origin: (y,x)(y, x), (−x,−y)(-x, -y) or (−y,x)(-y, x)?

    Answer

    (−x,−y)(-x, -y)

    Full solution

    (−x,−y)(-x, -y) is the negative of the position vector, so it points from each point back to the origin. (y,x)(y, x) is the gradient of xyxy and (−y,x)(-y, x) circles the origin.

  6. Show that r(t)=(et, et)\mathbf{r}(t) = (e^t,\ e^t) is a flow line of F(x,y)=(x, y)\mathbf{F}(x, y) = (x,\ y) and say which point it passes through at t=0t = 0.

    Answer

    r′(t)=(et,et)=F(r(t))\mathbf{r}'(t) = (e^t, e^t) = \mathbf{F}(\mathbf{r}(t)); it passes through (1,1)(1, 1).

    Full solution

    The field at (et,et)(e^t, e^t) is (et,et)(e^t, e^t), which equals the velocity. The cork moves out along the line y=xy = x, faster and faster.

  7. Decide whether F=(y, x)\mathbf{F} = (y,\ x) and G=(y, −x)\mathbf{G} = (y,\ -x) can be gradient fields, using the test ∂P∂y=∂Q∂x\tfrac{\partial P}{\partial y} = \tfrac{\partial Q}{\partial x}.

    Answer

    F\mathbf{F} passes, and it is ∇(xy)\nabla(xy); G\mathbf{G} fails.

    Full solution

    For F\mathbf{F}, both partials equal 11. For G\mathbf{G}, ∂P∂y=1\tfrac{\partial P}{\partial y} = 1 but ∂Q∂x=−1\tfrac{\partial Q}{\partial x} = -1, so no function has gradient G\mathbf{G}.

  8. A student draws F(0,2)=(−2,0)\mathbf{F}(0, 2) = (-2, 0) for the rotation field as an arrow from the origin to (−2,0)(-2, 0). What should the picture show?

    Answer

    An arrow placed at (0,2)(0, 2), pointing left.

    Full solution

    A vector field attaches each vector to its own point. At (0,2)(0, 2), on top of the circle of radius 22, the counterclockwise flow heads left.

Frequently asked questions

What is a vector field?

A function that assigns a vector to each point of a region. In the plane, F(x, y) = P(x, y) i + Q(x, y) j, with two component functions P and Q.

How do you sketch a vector field?

Evaluate F at a grid of points and draw each vector as an arrow starting at, or centered on, its point. Scaling all arrows by the same factor keeps the picture readable while preserving relative lengths.

What is a gradient field?

The vector field ∇f of a function f. Its arrows point in the direction f increases fastest and cross the level curves of f at right angles.

What is a flow line?

A curve r(t) whose velocity is the field at every point: r′(t) = F(r(t)). A particle carried by a fluid with velocity field F travels along a flow line.

Is every vector field a gradient field?

No. A gradient field in the plane must satisfy ∂P/∂y = ∂Q/∂x, and the rotation field (−y, x) fails that test. Fields that are gradients are called conservative.

What to learn next