Up to this point, we have studied scalar functions (or scalar fields), which assign a single number to every point. A great example is a temperature map, $T(x,y)$, which gives the temperature (a scalar) at each point $(x,y)$.
Now, we will study functions that assign a full vector (with magnitude and direction) to every point in a domain. This is the mathematical language used to describe almost every major physical force and flow.
Our Goal: Before we can do calculus with these fields (like we will in Section 16.2), we first need to understand what they are, what they look like, and where they come from.
We formally define a vector field as a function that maps points to vectors.
A vector field on $\mathbb{R}^2$ is a function $\vec{F}$ that assigns to each point $(x,y)$ in a 2D domain $D$ a two-dimensional vector $\vec{F}(x,y)$.
We write this using scalar component functions, $P(x,y)$ and $Q(x,y)$: $$\vec{F}(x,y) = \langle P(x,y), Q(x,y) \rangle \quad \text{or} \quad \vec{F}(x,y) = P(x,y)\hat{i} + Q(x,y)\hat{j}$$
A vector field on $\mathbb{R}^3$ is a function $\vec{F}$ that assigns to each point $(x,y,z)$ in a 3D domain $E$ a three-dimensional vector $\vec{F}(x,y,z)$.
We write this using component functions $P, Q,$ and $R$: $$\vec{F}(x,y,z) = \langle P(x,y,z), Q(x,y,z), R(x,y,z) \rangle$$
How can we draw a function that has an infinite number of vectors (one for every point)?
We can't! Instead, we draw a representative sample. We pick a grid of sample points (e.g., all integer coordinates) and draw the vector $\vec{F}$ starting at that point.
Important Note: We often must scale the vectors (draw them shorter than their true magnitude) to prevent them from overlapping into a messy blob. The relative lengths and directions are what matter most in a sketch.
Let's explore the most common "families" of 2D vector fields.
Let's find the vector at a few sample points:
Intuition: At any point $(x,y)$, the vector $\vec{F}(x,y) = \langle x,y \rangle$ is just the position vector of that point. This means all vectors point directly away from the origin.
The magnitude is $|\vec{F}| = \sqrt{x^2+y^2}$, which is the distance from the origin. So, vectors get longer as they get farther out. This looks like an "explosion" field.
In the graph below, "waggle" the slider $s$ to move the point around and get a sense of how the vector (in red) changes dynamically.
Let's plot some vectors on the axes:
Intuition: This field creates a counter-clockwise rotation or "vortex" around the origin. The magnitude $|\vec{F}| = \sqrt{(-y)^2 + x^2} = \sqrt{x^2+y^2}$ is the same as the radial field, so vectors get longer as they get farther from the center.
Check: Notice that the vector $\vec{F}=\langle -y,x \rangle$ is always perpendicular to the position vector $\vec{r}=\langle x,y \rangle$. Their dot product is: $$\vec{r} \cdot \vec{F} = \langle x,y \rangle \cdot \langle -y,x \rangle = (x)(-y) + (y)(x) = -xy+xy=0.$$
In the graph below, "waggle" the slider $s$ to see how the rotational vector (in red) is always tangent to the circle.
Visualizing 3D vector fields is much harder, as we have 3D vectors at every point in 3D space. We usually rely on computers or by analyzing the field's behavior on specific planes or axes.
Let's test a few points on the axes:
This field has a complex "twisting" or "cycling" behavior. The $x$-component is determined by $y$, the $y$-component by $z$, and the $z$-component by $x$.
In the graph below, waggle the slider $s$ and also rotate the 3D view to see the field action from different perspectives.
This field is not defined on the $xy$-plane (where $z=0$). Let's analyze it on the plane $z=1$:
Intuition: The $\langle y/z, -x/z \rangle$ components create a clockwise rotation around the $z$-axis. The $z/4$ component means the field also points "up" (for $z>0$) with a strength proportional to $z$. This looks like a whirlpool spinning clockwise and moving faster and faster up the $z$-axis.
In the graph below, waggle the slider $s$ and also view the 3D vector field from different perspectives.
Where do vector fields come from? A very important source is from scalar functions (like temperature, altitude, or electric potential).
Recall from Chapter 14: The gradient of a scalar function $f$ is itself a vector field.
A vector field $\vec{F}$ is called a conservative vector field if it is the gradient of some scalar function $f$. That is, $\vec{F} = \nabla f$.
If $\vec{F} = \nabla f$, the scalar function $f$ is called a potential function for $\vec{F}$.
(Analogy: Think of $f$ as the "potential energy" and $\vec{F} = \nabla f$ as the "force" field.)
$f_x = \frac{\partial}{\partial x}(x^2y - y^3) = 2xy$
$f_y = \frac{\partial}{\partial y}(x^2y - y^3) = x^2 - 3y^2$
$\vec{F} = \nabla f = \langle f_x, f_y \rangle = \langle 2xy, x^2 - 3y^2 \rangle$
$f_x = \frac{\partial}{\partial x}(x \sin(yz)) = \sin(yz)$
$f_y = \frac{\partial}{\partial y}(x \sin(yz)) = x \cos(yz) \cdot z = xz\cos(yz)$
$f_z = \frac{\partial}{\partial z}(x \sin(yz)) = x \cos(yz) \cdot y = xy\cos(yz)$
$\nabla f = \langle f_x, f_y, f_z \rangle = \langle \sin(yz), xz\cos(yz), xy\cos(yz) \rangle$
Problem: Is the rotational field $\vec{F} = \langle -y, x \rangle$ conservative? (In other words, could it come from a gradient?)
This is a subtle question that we will answer fully in Section 16.3. For now, we can use a test for conservative fields (Clairaut's Theorem):
If $\vec{F} = \langle P, Q \rangle = \nabla f = \langle f_x, f_y \rangle$, then we must have $P_y = f_{xy}$ and $Q_x = f_{yx}$. By Clairaut's Theorem, $f_{xy}$ must equal $f_{yx}$, so we must have $P_y = Q_x$.
$P_y = \frac{\partial}{\partial y}(-y) = -1$
$Q_x = \frac{\partial}{\partial x}(x) = 1$
A key property of gradient fields, which we learned in Chapter 14, is their geometric relationship to the level curves (in 2D) or level surfaces (in 3D) of their potential function $f$.
This relationship is the visual signature of a conservative field. If a vector field's arrows are not perpendicular to its (implied) level curves, it cannot be a conservative field.
The gradient vector $\nabla f$ at a point $p$ is always orthogonal (perpendicular) to the level curve (or level surface) $f=k$ that passes through that point $p$.
Intuition (The Mountain Map):
Problem: Show this property for the potential function $f(x,y) = x^2 + y^2$.
Problem: Show this property for the potential function $f(x,y,z) = x^2 + y^2 + z^2$.
In the graph below, waggle $s$ to see the direction of the vector field, and waggle $b$ to see the level surfaces.
We can describe gravity perfectly using vector fields. By Newton's Law of Gravitation, a mass $M$ at the origin pulls a mass $m$ at position $\vec{r} = \langle x, y, z \rangle$ with a force $\vec{F}$.
The Vector Field: Combining these gives the gravitational field: $$\vec{F}(\vec{r}) = \left( \frac{GmM}{|\vec{r}|^2} \right) \left( -\frac{\vec{r}}{|\vec{r}|} \right) = - \frac{GmM}{|\vec{r}|^3} \vec{r}$$
Since $\vec{r} = \langle x,y,z \rangle$ and $|\vec{r}|^3 = (x^2+y^2+z^2)^{3/2}$, we can write the components (letting $C = -GmM$):
$$P(x,y,z) = \frac{C \cdot x}{(x^2+y^2+z^2)^{3/2}}$$ $$Q(x,y,z) = \frac{C \cdot y}{(x^2+y^2+z^2)^{3/2}}$$ $$R(x,y,z) = \frac{C \cdot z}{(x^2+y^2+z^2)^{3/2}}$$
This is a 3D conservative vector field. The force of gravity is a gradient field! The potential function $f$ is what we call gravitational potential energy: $$f(x,y,z) = \frac{GmM}{\sqrt{x^2+y^2+z^2}} = \frac{GmM}{|\vec{r}|}$$ (You can check by taking the gradient of $f$ that $\nabla f = \vec{F}$!)
Now that we know what vector fields are, we are ready to do calculus with* them. In Lecture 16.2 Part B, we will learn how to compute the work done by a vector field on a particle moving along a curve. This will finally give meaning to the second type of line integral, $\int_C \vec{F} \cdot d\vec{r}$.
Problem: Describe and/or sketch the vector field $\vec{F}(x,y) = \langle 0, x \rangle$.
Let's test some points:
This is a shear field. The vectors are all vertical. They are zero on the y-axis, point up for $x>0$, and point down for $x<0$. The magnitude increases as you move away from the y-axis.
Problem: Find the gradient vector field of the 3D scalar function $f(x,y,z) = x \sin(yz)$.
Answer: $\nabla f = \langle \sin(yz), xz\cos(yz), xy\cos(yz) \rangle$.
Problem: Analyze the 3D field $\vec{F}(x,y,z) = \langle x, y, 1 \rangle$. What does it look like?