Divergence and curl: The language of Maxwell’s equations, fluid flow, and more
Source: Divergence and curl: The language of Maxwell’s equations, fluid flow, and more, 3Blue1Brown, 15:42, uploaded 2018-06-21, category Mathematics, playlist index 1493.
Grant Sanderson introduces divergence and curl by giving the same mathematical object several physical interpretations. A vector field can describe gravity, magnetism, or the velocity of a fluid. Once it is read as a flow, divergence measures the local tendency to produce or absorb fluid and curl measures the local tendency to rotate it. Those pictures then carry over to Maxwell’s equations and to systems whose coordinates describe populations rather than positions in physical space.
Vector fields as a change of viewpoint
A vector field assigns a vector, with a direction and a magnitude, to every point in space. The vectors might represent the velocity of fluid particles, the force of gravity, or the strength of a magnetic field. Physics usually deals with fields that change over time, since wind comes in gusts and electric fields change as charged particles move. The video holds time still and works in two dimensions so that the local geometry remains visible.
The drawings also compress the data. A vector field drawn to scale would let a few long vectors cover the page, so the animation shortens them and uses colour to suggest their relative length. That visual lie makes the field legible without changing the idea being illustrated.
Sanderson’s more useful move is to change the physical story attached to a field. A gravitational field can be imagined as a fluid flow, which lets the flow’s behaviour reveal something about the original force. A flow can also be read as the downhill direction of a surface, raising the question of whether a hill exists whose slope produces that field. Divergence and curl become easier to feel when an arbitrary field is treated as fluid, even when the field really represents an electric or magnetic quantity.
Divergence as local source and sink behaviour
Imagine a small piece of fluid moving through the field. Some points behave like sources, where fluid seems to spring into existence. Others behave like sinks, where it disappears. The divergence at a point measures the balance of flow through a small region around that point. More fluid leaving than entering gives a positive value. More entering than leaving gives a negative one. The flow can produce positive divergence even when every direction is not outward: fluid leaving quickly in one direction can outweigh slower inflow from another.
The original field takes a two-dimensional point as input and returns a two-dimensional vector. Its divergence takes the same point as input and returns one number whose value depends on the field in a small neighbourhood. In that sense it resembles a derivative. The output describes how strongly the point acts as a source or sink, while the field itself still describes direction and speed.
The fluid picture also gives a physical constraint. Water treated as incompressible cannot appear or vanish inside the flow, so its velocity field has zero divergence everywhere. This rules out many possible fields as models of real fluid motion. The same local test remains useful when the vectors represent something else.
Curl and the rotation around a point
Curl asks a different question about the fluid around a point. Fix the centre of a small twig at that point and let the surrounding flow act on it. Would the twig spin? A net rotation can arise even when the vectors do not all point around the centre. In one example, slow flow at the bottom and fast flow at the top create a clockwise influence because the difference in speed matters as much as the directions.
The video’s description corrects an error in the narration at 4:55: counterclockwise rotation has positive curl and clockwise rotation has negative curl. The diagram already uses that convention. This sign correction matters because the intuition depends on an oriented rotation, rather than on rotation as an unsigned amount.
Proper curl is a three-dimensional operation. It assigns a new vector to each point, with its direction determined by the right-hand rule. The video uses the two-dimensional version for its main examples, where each point receives a single number. The simplification gives a useful picture while leaving the full three-dimensional construction outside the lesson.
Maxwell’s equations in the same language
Divergence and curl also describe electricity and magnetism. Maxwell’s four equations use these operations to relate electric and magnetic fields to charge and to changes over time.
Gauss’s law says that the divergence of the electric field at a point is proportional to the charge density there. In the fluid analogy, positive charge acts like a source and negative charge like a sink. Empty space behaves like an incompressible part of the imagined flow. The video stresses that this is an interpretation of the equation, not a claim that electricity consists of a literal fluid.
The divergence of the magnetic field is zero everywhere. Read as a flow, the magnetic field has no sources or sinks, which matches the absence of isolated magnetic monopoles. A magnet has north and south ends together, unlike electric charge, which can appear with either sign in isolation.
The final two Maxwell equations connect changes in one field to the curl of the other. Their three-dimensional structure goes beyond the two-dimensional fluid picture, yet the relationship explains why electric and magnetic fields can sustain one another as light waves. Divergence and curl therefore belong to a language used outside fluid mechanics, even though fluid flow provides the most immediate intuition.
Phase space for changing populations
The same viewpoint works when the coordinates do not describe physical position. Consider a predator–prey system with the populations of foxes and rabbits as its two variables. A point in this phase space gives the current size of both populations. The differential equations assign a rate of change to each variable, so every point receives a vector showing how that pair of populations tends to change.
With many foxes and few rabbits, the fox population may fall because food is scarce while the rabbit population falls because the remaining rabbits are being eaten faster than they reproduce. The vector at that point records both changes and their speeds. The field describes the evolution of a system through time, even though its plane has nothing to do with physical space.
Following these vectors gives the phase flow of the differential equation. It shows how many possible starting states develop over time. Divergence can indicate regions where states converge towards a population balance or move away from one. Curl can suggest cyclic behaviour, including cycles whose stability needs further analysis. Sanderson qualifies the picture here: divergence and curl alone do not give the full story for a dynamic system, though they provide a useful way to begin reading its geometry. More variables would place the same system in a higher-dimensional phase space.
Why dot and cross products appear
The notation can look like a trick. Divergence is commonly written as a dot product between the upside-down triangle, the nabla operator, and the vector field. Curl uses a related cross product. Treating nabla as a vector of derivative operators helps organise the calculation, yet the notation also records a real geometric relation.
Take a small step from one point of the field to another and subtract the original vector from the new one. The result measures how the field changes over that step. The dot product of the step with its induced change is positive when the change points along the step. Across many directions, that pattern corresponds to vectors spreading outward and therefore to positive divergence. Changes that point against their steps correspond to inward flow and negative divergence. The video describes divergence as an average of these dot products over all step directions, with the appropriate rescaling.
The cross product measures a different relation between the step and the change it produces. When the change is perpendicular to the step, the field has the local tendency to turn the flow, which is the geometry behind curl. The video presents this as an average of step–change cross products, again as an intuition rather than a worked calculation.
Limits of the picture
The lesson stays with static, two-dimensional fields for most of its visual arguments, while real fields can change over time and the full curl lives in three dimensions. It gives the meaning of divergence and curl before showing how to compute them. The predator–prey example also needs related tools to establish the complete behaviour of its cycles and equilibria.
The source recommends learning the calculations through further examples rather than treating the fluid analogy as a substitute for practice. Its main result is a change in how to read the notation: dot products and cross products express the local geometry of how a field changes, and the same geometry remains useful when the field describes forces, electromagnetic quantities, or the state of a dynamical system.
Further reading / references
- Multivariable calculus on Khan Academy, which the video description links as Sanderson’s work on this topic.
- Fieldplay, a collection of fluid-flow illustrations that the video description names as an influence on its animation.