Synapse

An interconnected graph of micro-tutorials

Divergence: Sources and Sinks

This is an early draft. Content may change as it gets reviewed.

Look at a vector field — arrows everywhere. Now imagine placing a tiny box at some point. Divergence measures: is more stuff flowing out of the box than into it?

The intuition

Divergence at a point is the “net outflow per unit volume” from an infinitesimally small region around that point.

Think of dropping a small cork into a river: - Near a spring (source): water pushes the cork away — positive divergence. - Near a drain (sink): water pulls the cork in — negative divergence. - In a steady, uniform current: water carries the cork along but doesn’t spread or compress — zero divergence.

Try It: Measuring Divergence

Hover over the vector field. The coloured region shows the local divergence — red for sources (positive), blue for sinks (negative), grey for zero.

The formula

In two dimensions, the divergence of $\mathbf{F} = (F_x, F_y)$ is:

$$\nabla \cdot \mathbf{F} = \frac{\partial F_x}{\partial x} + \frac{\partial F_y}{\partial y}$$

Each term asks: “how much does the $x$-component change as you move in $x$?” and likewise for $y$. If both components are spreading out, divergence is positive.

For the source field $\mathbf{F} = (x, y)$: $\nabla \cdot \mathbf{F} = 1 + 1 = 2$. Positive everywhere — it’s a source at every point.

For the vortex $\mathbf{F} = (-y, x)$: $\nabla \cdot \mathbf{F} = 0 + 0 = 0$. The field swirls, but nothing is created or destroyed.

Why divergence matters

Divergence appears in two of Maxwell’s four equations:

The divergence tells you where fields originate. Electric fields originate at charges. Magnetic fields originate... nowhere. They always form closed loops.

Struggling with something?

These optional nodes cover specific concepts in more detail: