Vector Fields & Scalar Fields
Kaplan §3.2 - Assigning vectors and numbers to every point in space
Prereq: §3.1 Introduction
One assigns an arrow to every point. The other assigns a number. These two worlds are deeply connected - and that connection is what vector calculus is all about.
A Vector at Every Point
Think of a room with a fan running. At every point in the room, the air has some velocity - a speed and a direction. That assignment of a vector to every point is a vector field.
Outside, the wind does it too: at each location on a weather map, there's an arrow showing which way the air is moving and how fast. The field doesn't live at just one point. It lives everywhere.
Formally, a vector field in the plane assigns to each point $(x,y)$ a vector:
It turns out that a vector field is just a pair of ordinary scalar functions dressed up as a vector. But treating them as a unit reveals structure you'd never see looking at the components separately. As Kaplan puts it: "Each vector field is equivalent to a triple of scalar functions" (in 3D). Let's see this in action.
Below are four classic fields. Switch between them and watch how the arrows change - their length and color both encode the magnitude. Or type your own formulas.
Expansion ($\mathbf{v} = x\mathbf{i} + y\mathbf{j}$): every arrow points away from the origin, and the farther out you go, the longer the arrow. This is an expanding field - like an explosion in slow motion. At the origin itself, $\mathbf{v} = \mathbf{0}$.
Rotation ($\mathbf{v} = -y\mathbf{i} + x\mathbf{j}$): every arrow is perpendicular to the line from the origin. This is pure rotation - like water circling a drain, but without moving inward. These are the velocity vectors of a rigid body rotating about the $z$-axis.
Dipole: the electric field from two infinite charged wires at $(\pm 1, 0)$. Notice the saddle point between them and how the field lines splay outward from each wire.
The Gravitational Field
Newton figured out something remarkable: every mass in the universe pulls on every other mass, and the force weakens as the square of the distance.
Place a big mass $M$ at the origin. A small mass $m$ at position $\mathbf{r}$ feels a force:
The minus sign points the force inward - toward the attracting mass. The $1/r^2$ means: double the distance, quarter the force. This is an inverse-square law, and it shows up everywhere in physics - gravity, electrostatics, radiation intensity.
We'd expect the arrows to get shorter as we move away from the origin. Let's check. Hover over the plot to read the magnitude at any point.
What happens at the origin itself? The force blows up - $|\mathbf{F}| \to \infty$ as $r \to 0$. This is a singularity. The field is undefined there. In physics, this signals that we need a more refined model: a real mass isn't a point, and once you're inside the object, the field changes character.
Scalar Fields and Level Curves
Now let's flip the script. Instead of assigning a vector to each point, we assign a plain number.
Temperature in a room - at every point there's a single number (degrees). Altitude on a map - every location has an elevation. Air pressure on a weather map. Voltage in a circuit. These are all scalar fields: a function $f(x,y)$ (or $f(x,y,z)$ in 3D) that returns a single value.
The interesting question is: how do we visualize a scalar field? We can't draw arrows, but we can draw level curves - the contours where $f = c$ for various constants $c$. Think topographic maps, where each contour line is a fixed elevation.
Here's the key geometric insight: the closer the level curves are packed, the faster the function is changing. This idea leads directly to the gradient - which we'll meet in §3.3.
For $f = xy$, the level curves $xy = c$ are hyperbolas. For $c > 0$ they live in quadrants I and III; for $c < 0$ in quadrants II and IV. For $c = 0$, the level "curve" is the coordinate axes themselves.
For $f = x^2 + y^2$, the level curves are circles centered at the origin. The function is the squared distance from the origin - a perfect bowl shape.
The Bridge: Scalar Fields and Vector Fields
Here's the beautiful connection. Starting from a scalar field $f$, we can build a vector field - its gradient, $\nabla f$. And starting from a vector field $\mathbf{v}$, we can extract a scalar field - its magnitude $|\mathbf{v}|$, or (later) its divergence or curl.
Below, the left panel shows the contour plot of $f(x,y) = x^2 - y^2$. The right panel shows the gradient arrows of the same function. Watch how the gradient arrows are perpendicular to the level curves and point "uphill."
We'll explore gradients fully in §3.3. But notice the pattern already - the two worlds really are connected.
Now here's a deeper question: not every vector field comes from a scalar field this way. Figuring out which ones do - and what that means physically - is one of the big questions of this chapter.
Look at the rotation field $\mathbf{v} = \langle -y, x \rangle$. Could this be the gradient of some function? Think about it: if it were, then following the gradient would always increase $f$. But following this field takes you in circles - you'd return to where you started with the same value of $f$. So this field is not a gradient. We'll make this precise with the concept of "curl" later in the chapter.
Practice
From Kaplan, problems after §3.3
Compute $\mathbf{v}$ at several points and describe the overall flow pattern. (Kaplan §3.2, Problem 1a)
Step 1: Sample a few points.
At $(1,0)$: $\mathbf{v} = (1)\mathbf{i} + (0)\mathbf{j}$ - pointing right.
At $(0,1)$: $\mathbf{v} = (-1)\mathbf{i} + (0)\mathbf{j}$ - pointing left.
At $(1,1)$: $\mathbf{v} = (0)\mathbf{i} + (2)\mathbf{j}$ - pointing straight up.
Step 2: More points reveal the pattern.
At $(2,0)$: $\mathbf{v} = 4\mathbf{i}$ - still rightward, but 4 times as strong.
At $(0,2)$: $\mathbf{v} = -4\mathbf{i}$ - leftward, also 4 times as strong.
Along the $x$-axis, arrows flow outward. Along the $y$-axis, arrows flow inward (toward the $y$-axis).
Step 3: The elegant interpretation.
This is actually the real and imaginary parts of $(x + iy)^2 = (x^2 - y^2) + i(2xy)$. The field has a saddle-like structure: arrows flow outward along the $x$-axis and inward along the $y$-axis, with rotation in between. It's the flow pattern of an ideal fluid around a corner.
Decompose this field and identify the geometric transformation it represents. (Kaplan §3.2, Problem 1b)
Step 1: Sample points.
At $(1,0)$: $\mathbf{u} = \mathbf{i} + \mathbf{j}$ - diagonal up-right.
At $(0,1)$: $\mathbf{u} = -\mathbf{i} + \mathbf{j}$ - diagonal up-left.
At $(1,1)$: $\mathbf{u} = 2\mathbf{j}$ - straight up.
Step 2: Decompose algebraically.
We can write $(x-y)\mathbf{i} + (x+y)\mathbf{j} = x(\mathbf{i}+\mathbf{j}) + y(-\mathbf{i}+\mathbf{j})$. This is an expansion along the $(1,1)$ direction combined with rotation.
Step 3: The matrix viewpoint.
The field is $\begin{pmatrix}1 & -1 \\ 1 & 1\end{pmatrix}\begin{pmatrix}x \\ y\end{pmatrix}$. This matrix is $\sqrt{2}$ times a rotation by $45°$. So every position vector gets rotated $45°$ counterclockwise and scaled by $\sqrt{2}$. It's a spiral-outward field.
Find the equations of the level curves and describe their shape and position. (Kaplan §3.2, Problem 2a)
Step 1: Set $xy = c$ and solve.
The level curves satisfy $y = c/x$ - these are rectangular hyperbolas with the coordinate axes as asymptotes.
Step 2: Sort by sign of $c$.
For $c > 0$: hyperbolas in quadrants I and III (both $x,y$ positive or both negative).
For $c \lt 0$: hyperbolas in quadrants II and IV (opposite signs).
For $c = 0$: the level "curve" degenerates to the coordinate axes, $x = 0$ or $y = 0$.
Step 3: The saddle point.
Near the origin, the level curves cross - this is a saddle point of $f$. The function increases along $y = x$ and decreases along $y = -x$. This is a classic example of an indefinite quadratic form, which we'll revisit when studying critical points of multivariable functions.
Determine the direction, magnitude, and physical interpretation of this field. (Kaplan §3.2, Problem 1d)
Step 1: Direction.
$\mathbf{v} = -(x\mathbf{i} + y\mathbf{j} + z\mathbf{k}) = -\mathbf{r}$. This is the negative of the position vector - every arrow points straight toward the origin.
Step 2: Magnitude.
$|\mathbf{v}| = \sqrt{x^2 + y^2 + z^2} = r$. The magnitude equals the distance from the origin - farther points get pulled harder. This grows linearly, unlike the gravitational field which has $1/r^2$ decay.
Step 3: Physical interpretation.
This describes an imploding or collapsing field - a uniform contraction toward the origin. Physically, it models a restoring force proportional to displacement (like a 3D spring: Hooke's law in every direction). Unlike gravity's $1/r^2$ decay, this force gets stronger with distance.