Back to the on-screen lesson ·

Vector fields, divergence and curl

A vector at every point of space, and the two derivatives of it: $\nabla \cdot \mathbf{F}$, which measures outflow per unit volume, and $\nabla \times \mathbf{F}$, which measures local spin.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to read a vector field as an arrow at every point, compute its divergence and its curl from the component formulas, say what each of those measures physically, find where a field vanishes, and use the two identities — a gradient has no curl, a curl has no divergence — to rule out a field that cannot exist.

2. What you already have

The gradient, which turns a scalar function into a vector at every point, and the cross product, which turns two vectors into a third. This lesson keeps both and changes what they are applied to: the object is now a field, a vector attached to every point of space, and the operator $\nabla$ is applied to it in the two ways the algebra allows.

3. The words the rest of the course will use

A vector field assigns a vector to each point: $\mathbf{F}(x,y,z) = \langle P, Q, R \rangle$ with $P$, $Q$, $R$ functions of position. A gradient field is one of the form $\nabla f$ for a scalar $f$. The divergence $\nabla \cdot \mathbf{F}$ is a scalar at each point; the curl $\nabla \times \mathbf{F}$ is a vector at each point. A field with zero divergence is incompressible or solenoidal; one with zero curl is irrotational. A flow line is a curve whose tangent is the field's arrow everywhere along it.

4. One arrow at every point, and two ways to differentiate it

A vector field is a vector-valued function of position. Wind velocity, the force of gravity near a planet, the current in a river and the electric field round a charge are all fields, and the whole of the rest of this course is about integrating them.

Write $\nabla = \left\langle \dfrac{\partial}{\partial x}, \dfrac{\partial}{\partial y}, \dfrac{\partial}{\partial z} \right\rangle$ and treat it, carefully, as a vector of operators. Three products are then available, and all three matter.

Gradient, applied to a scalar: $\nabla f = \langle f_x, f_y, f_z \rangle$, a field pointing the steepest way uphill.

Divergence, the dot product with a field:

$$\nabla \cdot \mathbf{F} = P_x + Q_y + R_z.$$

It is a scalar at each point, and it measures net outflow per unit volume: positive where the field is spreading apart, negative where it is being squeezed together, zero where as much arrives as leaves.

Curl, the cross product with a field:

$$\nabla \times \mathbf{F} = \langle R_y - Q_z,\; P_z - R_x,\; Q_x - P_y \rangle.$$

It is a vector at each point. Its direction is the axis a tiny paddle wheel dropped at that point would spin about, by the right-hand rule; its length is twice the rate of that spin.

Two identities, and they are the reason for the rest of the course.

$$\nabla \times (\nabla f) = \mathbf{0}, \qquad \nabla \cdot (\nabla \times \mathbf{F}) = 0.$$

Both hold whenever the second derivatives are continuous, and both are Clairaut's theorem in disguise: every term cancels against its mixed-partial twin. A gradient field cannot spin, and a curl cannot spread.

Another way: picture

Drop two instruments into the flow at a point. A tiny sphere that is free to swell or shrink reports the divergence: it grows where the field carries fluid away faster than it brings it in. A tiny paddle wheel on a free axle reports the curl: it turns where one side of it is pushed harder than the other, and the axle settles along the curl vector. Neither instrument cares how fast the flow is overall, only how it differs across the point.

Another way: steps

To read a field you have been handed:

  1. Find where it vanishes; those points organise the picture.
  2. Compute $\nabla \cdot \mathbf{F}$ and ask where it is positive, negative or zero.
  3. Compute $\nabla \times \mathbf{F}$ and ask about which axis it points.
  4. If the curl is zero everywhere on a sensible region, look for a potential function — the next two lessons live on that possibility.
  5. Say which coordinates each answer depends on; a constant answer and a varying one describe very different flows.

5. Why the divergence is an outflow and the curl is a spin

Take a small box of side $h$ at a point, with faces perpendicular to the axes. Across the two faces perpendicular to $x$, the net outflow is roughly $\big(P(x + h) - P(x)\big)h^2 \approx P_x h^3$. Adding the other two pairs gives a net outflow of about $(P_x + Q_y + R_z)h^3$: the divergence times the volume. Divide by the volume and shrink the box, and the divergence is exactly outflow per unit volume. The divergence theorem, six lessons from here, is that sentence integrated.

For the curl, take a small square in the $xy$ plane and walk round it counterclockwise. The two horizontal sides contribute about $-P_y h^2$ between them and the two vertical sides about $Q_x h^2$, so the circulation is about $(Q_x - P_y)h^2$: the third component of the curl times the area. That is Green's theorem, and then Stokes'.

Both operators are therefore local statements that later become global theorems. Reading them as bookkeeping formulas rather than as measurements is what makes the theorems at the end of this unit look arbitrary.

6. Where this goes wrong

Confusing what each returns. The divergence of a field is a scalar; the curl of a field is a vector. An answer of the wrong kind is not a slip of notation, it is a different quantity, and writing $\nabla \cdot \mathbf{F}$ with arrows on it means the derivative was taken wrongly.

Substituting the point before differentiating. Evaluating $\mathbf{F}$ at a point and then differentiating gives zero, always. Differentiate the functions first; evaluate last.

Losing the cyclic order in the curl. Each component uses the two coordinates that are not its own, in the order $x \to y \to z \to x$. Written in that order the signs need no memorising.

Reading a zero curl as a still field. A fast uniform wind has zero curl everywhere; a slow shearing flow has a large one. Curl measures difference across a point, not speed at it. An orientation, an order of integration and an order of factors are part of the answer, not part of the handwriting. Reversing a curve flips the sign of the work along it, swapping the factors of a cross product flips the vector, and exchanging the two limits of an inner integral changes what region was integrated over. Say which one you chose, every time.

7. Seeing it in three dimensions

Arrows of the field F = ⟨−y, x, 0⟩ on two circles round the z-axis. Every arrow points round the z-axis, anticlockwise seen from above, and none points towards or away from it. The divergence is 0: as much flows into any small box as out of it. The curl ⟨0, 0, 2⟩ is drawn along the z-axis: the axis a small paddle wheel would turn about, pointing the way the right-hand rule gives.
Arrows of the field F = ⟨−y, x, 0⟩ on two circles round the z-axis. Every arrow points round the z-axis, anticlockwise seen from above, and none points towards or away from it. The divergence is 0: as much flows into any small box as out of it. The curl ⟨0, 0, 2⟩ is drawn along the z-axis: the axis a small paddle wheel would turn about, pointing the way the right-hand rule gives.

The field $\mathbf{F} = \langle -y, x, 0 \rangle$ is drawn on two circles round the $z$-axis. Every arrow points round the axis and none points towards or away from it. Its divergence is $\partial_x(-y) + \partial_y(x) + \partial_z(0) = 0$: nothing piles up or drains away anywhere. Its curl is $\langle 0 - 0,\; 0 - 0,\; 1 - (-1) \rangle = \langle 0, 0, 2 \rangle$, drawn up the axis. Curl the fingers of your right hand the way the arrows go and your thumb points along it: the curl is the axis a paddle wheel dropped into the flow would turn about, and its length $2$ is twice the rate at which it turns.

8. Curl is not about whether the flow goes round in circles

The carousel field has curl $\langle 0,0,2 \rangle$ and its particles travel in circles, which makes the word curl feel like a description of the paths. It is not. The shear $\langle y, 0, 0 \rangle$ has every particle travelling in a perfectly straight line and its curl is $\langle 0,0,-1 \rangle$; a bathtub vortex of the form $\langle -y, x, 0\rangle/(x^2+y^2)$ has every particle travelling in a circle and curl zero away from the axis.

What the curl measures is whether the field pushes one side of a small wheel harder than the other. Straight flow with a gradient across it turns the wheel; circular flow that slows down at exactly the right rate does not. Judging by the shape of the streamlines gets both of those backwards, and both cases turn up in the problems at the end of this unit.

9. A field that spreads but does not spin

  1. Let $\mathbf{F} = \langle x, y, z \rangle$, the field whose arrow at each point is the position vector there.

    Arrows point straight out, growing with distance.

  2. Its divergence is $1 + 1 + 1 = 3$, the same everywhere, so fluid is being created at a steady rate per unit volume.

    Positive divergence is spreading.

  3. Its curl is $\langle 0 - 0,\; 0 - 0,\; 0 - 0 \rangle = \mathbf{0}$, and indeed $\mathbf{F} = \nabla\big(\tfrac12(x^2+y^2+z^2)\big)$, so it is a gradient field and the first identity guaranteed the answer.

    A gradient field cannot spin.

10. A field that spins but does not spread

  1. Let $\mathbf{F} = \langle -y, x, 0 \rangle$: at each point the arrow is at right angles to the position vector, so the picture is a carousel.

    Arrows circle the origin.

  2. Its divergence is $0 + 0 + 0 = 0$: the carousel carries fluid round without piling it up anywhere.

    Zero divergence is incompressible.

  3. Its curl is $\langle 0, 0, 1 - (-1) \rangle = \langle 0,0,2 \rangle$: a paddle wheel turns counterclockwise about the vertical axis, at the same rate anywhere in the field. The two examples together show the operators are genuinely independent measurements.

    Constant curl is a rigid rotation.

11. Your turn: the divergence and curl of a shearing flow

  1. Let $\mathbf{F} = \langle y, 0, 0 \rangle$: everything moves east, faster the further north it is.

    A shear, like wind over a runway.

  2. Divergence: $\partial_x(y) + \partial_y(0) + \partial_z(0) = 0$, so nothing accumulates anywhere.

  3. Your turn: work this step out. Its working is at the end of the packet.

    Curl: the third component is $Q_x - P_y = 0 - 1 = -1$, so $\nabla \times \mathbf{F} = \langle 0,0,-1 \rangle$ and a paddle wheel turns clockwise everywhere — even though no fluid travels in a circle. Circulation is about the difference between the two sides of the wheel, not about the shape of the path any particle takes.

12. Guided practice

Write $\nabla \times \mathbf{F}$ as a row, for $\mathbf{F} = \langle 0y - 4z,\; 4z + 5x,\; 2x - 5y \rangle$.

This task has no paper form; do it on a device.

13. Guided practice

Plot the one point where $\mathbf{F} = \langle x - 3,\; y + 4 \rangle$ is the zero vector.

Plot your answer on the grid:

-6-5-4-3-2-1123456-6-5-4-3-2-1123456xy

14. Practice

For $\mathbf{F} = \langle 3x^{2},\; 6y^{3},\; z \rangle$, what is $\nabla \cdot \mathbf{F}$ at the point $(1, 2, 5)$?

Answer:

15. Practice

For $\mathbf{F} = \langle 3y,\; x,\; 0 \rangle$, what is the third component of $\nabla \times \mathbf{F}$?

Answer:

16. Practice

Write $\nabla \times \mathbf{F}$ as a row, for $\mathbf{F} = \langle -2y + z,\; -4z - 3x,\; 0x + 4y \rangle$.

This task has no paper form; do it on a device.

17. Somewhere new

A colleague reports a smooth field $\mathbf{G}$ with $\nabla \cdot \mathbf{G} = 8$ everywhere, and claims $\mathbf{G} = \nabla \times \mathbf{F}$ for some smooth $\mathbf{F}$. What follows?

18. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

19. Test question

Plot the one point where $\mathbf{F} = \langle x - 5,\; y - 2 \rangle$ is the zero vector.

Plot your answer on the grid:

-6-5-4-3-2-1123456-6-5-4-3-2-1123456xy

20. What you can do now

You can compute both derivatives of a field, say which returns a scalar and which a vector, and read each as a measurement rather than a formula. Next: integrating a field along a curve, which is where the divergence and the curl start turning into theorems.

Working for the steps left to you

11. Your turn: the divergence and curl of a shearing flow, step 3