Divergence measures how much a vector field "spreads out" from a point. Positive divergence means net outward flow (a source), negative divergence means net inward flow (a sink), and zero divergence means the flow is balanced. This concept is central to fluid dynamics, electromagnetism, and the divergence theorem that connects surface integrals to volume integrals.
Vector Fields and Divergence
Vector Fields and the Nabla Operator
A vector field assigns a vector to each point in a subset of space. Velocity fields and force fields are classic examples: at every point, you get both a magnitude and a direction.
The nabla operator is the vector differential operator that drives most of the key operations in vector calculus. In Cartesian coordinates:
Depending on how you apply to a field, you get different operations: apply it to a scalar field and you get the gradient, take its dot product with a vector field and you get divergence, take its cross product with a vector field and you get curl.
Divergence and the Dot Product
Divergence measures the magnitude of a vector field's source or sink at a given point. It's a scalar quantity. For a vector field :
This follows directly from treating as a vector and taking its dot product with . Recall that the dot product of and is . With , each "component" is a partial derivative operator, so the dot product produces a sum of partial derivatives.
Concrete example: Let . Then:
The divergence here depends on position. Where , the field acts as a source; where , it acts as a sink.
Key Algebraic Properties
Divergence is linear, which makes computation much easier:
- for any constant
For a scalar function times a vector field , there's a product rule:
This comes up frequently when simplifying expressions inside volume integrals.
One more identity worth knowing: the divergence of a curl is always zero.
This holds for any sufficiently smooth vector field , and it's the reason every curl field is automatically divergence-free.

Properties of Divergence
Flux Density and Solenoidal Fields
Divergence can be interpreted as flux density: the net outward flux per unit volume at a point. More precisely, for a small closed surface around a point:
This limit definition is what gives divergence its physical meaning. It tells you how much "stuff" is being created or destroyed per unit volume at that location.
A vector field with zero divergence everywhere is called solenoidal (or divergence-free). Solenoidal fields have no net sources or sinks anywhere. The most important physical example: magnetic fields are always solenoidal. Maxwell's equations require , reflecting the fact that magnetic monopoles don't exist and magnetic field lines always form closed loops.
Incompressible Flow
In fluid dynamics, a flow is incompressible when the fluid density stays constant as it moves. The velocity field of an incompressible flow satisfies:
This is the continuity equation for incompressible flow. Physically, it says that whatever fluid enters a small region must also leave it; nothing accumulates or depletes. Water and most liquids under normal conditions behave as incompressible fluids, so this condition appears constantly in applications.

Divergence Theorem and Applications
The Divergence Theorem
Also known as Gauss's theorem, this result connects the total flux through a closed surface to the divergence integrated over the enclosed volume. For a vector field and a closed surface bounding a volume :
The left side is the total outward flux of through . The right side sums up all the sources and sinks inside . The theorem says these must be equal.
Why this matters practically: sometimes a surface integral is hard to evaluate directly but the corresponding volume integral is straightforward, or vice versa. The divergence theorem lets you pick whichever side is easier. It also provides the theoretical foundation for conservation laws in physics.
The Laplacian Operator
The Laplacian is what you get when you take the divergence of the gradient of a scalar field. For :
The Laplacian measures how much the value of at a point deviates from the average of in a small neighborhood around that point. If , the function value at that point is below the local average; if , it's above the local average.
This operator shows up in many of the most important PDEs in physics:
- Heat equation: (heat diffuses from hot to cold regions)
- Laplace's equation: (steady-state solutions with no sources)
- Poisson's equation: (electrostatic potential related to charge density )
- Wave equation:
Notice that Laplace's equation is just the special case of Poisson's equation with zero charge density. A scalar field satisfying is called harmonic.