Divergence of a Vector Field
Divergence is the operator that turns a flow into a bookkeeping question: at this exact point, is stuff being made, destroyed, or merely passing through? It is one of the three first-order operators built from the del symbol ∇ — the gradient acts on a scalar and returns a vector, the curl acts on a vector and returns a vector, and the divergence acts on a vector field and returns a scalar field . The notation is engineered to look like the dot product of the symbolic vector with , and in Cartesian coordinates that mnemonic is exact: . But the Cartesian sum is the shadow, not the substance. The substance is geometric: shrink a closed surface onto a point and measure how much more flux of leaves than enters, per unit volume enclosed. That flux-density ratio is a genuine scalar — every observer in every coordinate system agrees on its value — and it is why divergence is the language conservation laws are written in. Charge, mass, energy, and probability are all conserved by one differential sentence, : whatever accumulates in a region got there by flowing across its boundary and nowhere else. Two ideas run through everything below. First, divergence is local flux density, and the Divergence (Gauss) Theorem promotes it to the global statement . Second, because the definition is intrinsic, re-expressing it in curved coordinates drags in the metric: the Jacobian's derivatives produce the and weights of spherical and cylindrical systems, and forgetting them is the single most common way to get divergence wrong.
- The divergence of a vector field is a scalar field measuring the net outward flux per unit volume produced at each point — positive at a source, negative at a sink, zero for a pass-through (solenoidal) flow.
- In Cartesian coordinates it is the sum of the diagonal partial derivatives, , but that formula is only the coordinate-free flux limit evaluated on an infinitesimal box.
- The intrinsic definition is what makes it a true scalar and what ties it to the Divergence (Gauss) Theorem.
- Curvilinear forms carry metric factors: spherical divergence has , not — the general rule is .
- The inverse-square field is the signature example: away from the origin yet flux through any enclosing sphere, so — a point source.
- Divergence writes every conservation law in differential form: Gauss's law , no monopoles , mass continuity, and probability conservation.
- Key idea: Divergence is flux density, ; the Cartesian sum of diagonal derivatives is merely this limit evaluated on an infinitesimal box.
Divergence is flux density: . The Cartesian sum of diagonal derivatives is merely this limit evaluated on an infinitesimal box, which is why the operator returns a coordinate-independent scalar.
Where this lives today
Divergence is the differential grammar of every conservation law running in modern physics and engineering. In computational fluid dynamics, enforcing (incompressibility) at every grid cell is the central constraint of the pressure-projection methods that simulate everything from aircraft wings to blood flow; a solver that lets divergence leak makes mass from nothing and blows up. In electromagnetism, particle-in-cell plasma codes and finite-difference Maxwell solvers must hold the discrete Gauss law to machine precision, and "divergence cleaning" algorithms exist to scrub the accumulated error. In geophysics, the divergence theorem turns a satellite's measured gravity flux into the mass distribution below — the inverse problem behind GRACE maps of ice-sheet loss. And at the frontier, — the statement that magnetic monopoles do not exist — remains an open experimental question: MoEDAL at the LHC and superconducting induction searches still hunt for a single monopole, whose discovery would put a nonzero source on the right-hand side of one of the tidiest zeros in physics.
The physical picture
Picture as the velocity field of a fluid and drop a tiny imaginary balloon at a point. If more fluid streams out across the balloon's skin than in, fluid is being created inside — that excess outflow, divided by the balloon's volume as it shrinks to nothing, is the divergence. A faucet is a source (positive divergence), a drain a sink (negative), and a steady pass-through current has zero divergence. Crucially, divergence sees only the spreading of field lines along their own direction; a pure swirl or shear, where lines neither converge nor separate, contributes nothing — that rotational part is what the curl measures. Divergence and curl together partition the local behaviour of any field into "spreading" and "spinning".
Because divergence is a limit of an intrinsic flux ratio, it is a genuine scalar: the Cartesian neatness is a happy accident of constant orthonormal basis vectors, and in curved coordinates the basis vectors vary, generating extra metric terms. The cleanest demonstration of the geometry is the inverse-square field — the shape of every point charge and point mass. Its divergence is zero everywhere it is defined, yet the flux through any sphere around the origin is a radius-independent : the field weakens as at exactly the rate the sphere's area grows as . The only way a field can be source-free everywhere yet emit a fixed flux is to hide a singular source at one point.
The core equations
The operational definition is the Cartesian sum: differentiate each component along its own axis and add. It is the fastest way to compute in flat coordinates and makes the "dot product with ∇" mnemonic exact.
where: — the vector field; — the del operator; each — the rate at which the -component of grows along the -axis. Only the diagonal derivatives enter; cross terms like belong to the curl. The geometric definition is the more fundamental one, because it never mentions a coordinate system. It says divergence is the flux per unit volume in the limit of a vanishing region, which is why it returns a scalar.
where: — the volume of a small region collapsing onto the point; — the closed surface bounding ; — the outward-pointing area element. Reading it: sum the field poking out through the skin, divide by the volume inside, shrink to a point. In spherical coordinates the intrinsic scalar of equation (2) picks up metric factors, because a radial face's area grows as and the angular faces shrink toward the poles. These are not decorations — they keep the operator coordinate-independent.
where: — radius, polar angle, azimuth; — the physical (orthonormal) components of ; the factor is the Jacobian, and its derivatives generate every metric weight you see. Notice the radial term is , never the naive . Cylindrical coordinates carry the same lesson with a simpler geometry: the radial face grows as , and the axial direction is flat.
where: — cylindrical radius, azimuth, height; — physical components on the local orthonormal basis. The -term is bare because the -direction has no metric stretch. All three special cases are instances of one master formula, valid in any coordinate system, written with the metric determinant — the cleanest statement that divergence is the metric-weighted derivative of the flow.
where: — the determinant of the metric tensor ; — the contravariant components of ; — derivative with respect to coordinate , repeated index summed. Set to recover (3), or to recover (4). The local statement becomes global through the Divergence (Gauss) Theorem — the identity that makes divergence useful, converting a volume integral of sources into a surface integral of flux.
where: — any finite region; — its closed bounding surface. Reading it: the total source strength inside a region equals the net flux escaping its boundary. Two identities pin down divergence's place among the operators. The first: the divergence of any curl vanishes identically — a purely rotational field has no sources — which is why follows the moment .
where: — any twice-differentiable vector field. It holds because the symmetric mixed-partial is contracted against the antisymmetric Levi-Civita symbol. The product rule distributes divergence over a scalar times a vector — the workhorse behind integration by parts in field theory.
where: — a scalar field; — its gradient. The result mixes the sources of with the way varies along . Finally, composing divergence with gradient produces the Laplacian, the operator behind every equilibrium and diffusion problem in physics.
where: — the Laplacian, measuring how a scalar's value at a point compares to its neighbourhood average: the divergence of the gradient flow.
The goal is to prove that the intrinsic definition in equation (2) collapses to the Cartesian sum in equation (1), so the two are not two operators but one seen from two angles. We apply the flux-density limit to an infinitesimal box whose faces align with the axes, evaluate the six face contributions with a first-order Taylor expansion, and watch the higher-order corrections die as the box shrinks — leaving exactly the sum of diagonal derivatives.
Step 1. Centre a box of sides at and take the two faces normal to . Their outward normals oppose, so their fluxes subtract: the net -flux is . Why: outward flux across a flat face is the normal component of times the face area, and pairing opposite faces extracts a difference of across the box.
Step 2. Taylor-expand to first order: , so . Why: over an infinitesimal gap only the first derivative survives; the constant part of cancels in the difference.
Step 3. Repeat for the - and -face pairs, add, and divide by the volume: . Why: the three axes are independent, so their contributions add, and the shared factor cancels.
Step 4. Take . The neglected terms are of order relative to the leading ones, so they vanish, leaving the Cartesian formula exactly. Why: the limit discards the box shape — the answer is intrinsic even though the scaffold was rectangular. *The same construction on curved faces — where a spherical face carries area — produces the metric factors of equation (3) by exactly the same logic.*
Go deeper · Derivation B · 1 minThe continuity equation from local conservation
The goal is to show that divergence is the exact mathematical form of a conservation law, deriving the continuity equation from the plain statement that a conserved quantity leaves a region only by flowing across its boundary. The same three lines underlie charge conservation in electromagnetism, mass conservation in fluids, and probability conservation in quantum mechanics, with and reinterpreted each time.
Step 1. Fix a region with boundary ; let be the density of the conserved stuff and its current. Global balance: the amount inside changes only by flow across the boundary, . Why: with no sources inside, every unit that appears or vanishes crossed ; the minus sign encodes that outward flux depletes the interior.
Step 2. Convert the surface flux to a volume integral with the Divergence Theorem: . Why: trading a boundary integral for a bulk one lets both sides be compared integrand-to-integrand.
Step 3. Since is fixed, the time derivative slides inside and both terms live over the same volume: . Why: with the region not moving, acts only on , so the integrals combine.
Step 4. The integral vanishes for every , which forces the integrand to zero: . Why: a continuous function whose integral over every region is zero is itself zero everywhere — this localisation turns a global balance into a pointwise law. *The same four steps recover for fluid mass conservation, charge conservation behind Maxwell's equations, and for probability in quantum mechanics — only the interpretation of and changes.*
Go deeper · Derivation C · 1 minThe inverse-square field and its delta-function source
The goal is to resolve a paradox at the foundation of electrostatics and gravitation: the field has strictly zero divergence everywhere it is defined, yet it clearly emanates from the origin. We compute the divergence away from the origin, the total flux through an enclosing sphere, and reconcile the two with the Divergence Theorem — discovering that the divergence is a Dirac delta concentrated at the source point.
Step 1. Apply the spherical radial term for : . Why: the metric factor cancels the field's , leaving the derivative of a constant — so the field is genuinely source-free everywhere except the origin, where the formula is singular.
Step 2. Compute the flux through a sphere of any radius : . Why: the area element carries , cancelling the field's , so the integrand is radius-independent — a fixed through every sphere.
Step 3. Reconcile with the Divergence Theorem: the volume integral of the divergence over any region containing the origin must equal , yet the divergence is zero everywhere except one point. Why: a function zero almost everywhere integrates to zero; getting instead demands a source of zero width and finite strength — a Dirac delta.
Step 4. Identify it: , with defining property for every enclosing the origin. Why: this is exactly the distribution that is zero away from a point yet integrates to a fixed nonzero value. *Multiplying by turns this result directly into Gauss's law for a point charge, and the total flux is the geometric root of the factor that appears throughout Gaussian electromagnetism.*
Limiting cases
Four special cases fix the operator's meaning and are worth carrying in memory:
| Case | Result | Meaning |
|---|---|---|
| Uniform (constant) field | No spreading anywhere; every region takes in exactly what it lets out — no sources. | |
| Solenoidal (source-free) field | Flux is conserved at every point; field lines form closed loops or run to infinity. The magnetic field is the canonical case. | |
| Linear radial flow | For , the divergence is the constant — uniform isotropic expansion, contributing one per spatial dimension. | |
| Inverse-square radial field | Zero everywhere except a delta-function source at the origin — the seed of Gauss's law and the Coulomb and gravitational fields. |
Worked examples
1 · Cartesian divergence at a point (confidence builder)
Compute for and evaluate it at the point .
Step 1. Differentiate each component along its own axis. ; ; . Only the diagonal derivatives matter — the field's dependence on the other variables is invisible to the divergence.
Step 2. Add them: . This is the divergence as a field, valid at every point.
Step 3. Evaluate at : , so . Because the result is positive, the point acts as a net source — a tiny box there leaks more of than it collects. ∇·F = 2(xy + yz + zx), which is 22 at (1, 2, 3).
2 · Verifying the Divergence Theorem for F = r (fully worked)
Confirm equation (6) directly for the radial field over a solid ball of radius by computing both sides.
Step 1. The volume side. , a constant. So . With , this is .
Step 2. The surface side. On the sphere the outward normal is , and , a constant over the whole surface. So . With , this is again .
Step 3. The two sides agree: . The check exposes the geometry — the field grows linearly with while the enclosing area grows as , and the theorem stitches the two together consistently. Both sides equal 32π ≈ 100.5, confirming ∫ ∇·F dV = ∮ F·dS.
3 · Spherical divergence: the metric factor in action
Using the spherical formula, compute the divergence of (a) and (b) , and reconcile with the Cartesian results.
Step 1. For (a), and , so only the radial term survives: . This matches from Example 2 — the same scalar, two coordinate systems, one answer.
Step 2. For (b), , so for . The metric factor did the essential work: it cancelled the field's before differentiating, which is why the answer is and not the naive .
Step 3. The contrast is the lesson: spreads uniformly (divergence everywhere, a distributed source), while is source-free away from the origin and hides its whole source in a delta at . ∇·(r r̂) = 3 (matching the Cartesian value) and ∇·(r̂/r²) = 0 for r ≠ 0 — both obtained only by keeping the 1/r² metric factor.
Physics of the portrait
Divergence is a rare concept that was used for two centuries before it had a name or a symbol. It began as an integral identity in the hands of the potential theorists, and only became a pointwise operator when vector analysis was invented at the end of the nineteenth century.
Origins · 1 mindivergence and how this was discovered
The divergence is the child of two lineages that met late. The first is potential theory: Joseph-Louis Lagrange met the flux integral in fluid mechanics in the 1760s, and Carl Friedrich Gauss, in his 1813 memoir on the attraction of ellipsoids, proved a special case of what we now call the Divergence Theorem. The general theorem — the identity that makes the operator useful — was first proved by the Russian mathematician Mikhail Ostrogradsky in 1826, which is why continental texts still call it the Gauss–Ostrogradsky theorem; George Green's 1828 essay on electricity and magnetism gave the parallel identities that carry his name. But none of these workers had a divergence operator: they had surface and volume integrals and the relation between them. The pointwise object arrived with vector analysis. James Clerk Maxwell, in his 1873 Treatise, used the quantity but named its negative the "convergence", and William Kingdon Clifford introduced the word "divergence" in his 1878 Elements of Dynamic. The modern notation and the clean split of into gradient, divergence, and curl were forged in the 1880s by Josiah Willard Gibbs at Yale and Oliver Heaviside in England, working independently to strip Hamilton's quaternions down to the three-dimensional vector calculus physicists actually use. What Gauss and Ostrogradsky wrote as a theorem about integrals became, in their hands, a differential operator whose value at a point is flux density — the form in every physics course today.
Going further
Texts. Stone and Goldbart, Mathematics for Physics, §10 (vector calculus) · Arfken, Weber and Harris, Mathematical Methods for Physicists, 7th ed., §3.5–3.6 and §3.10 (curvilinear forms) · Hassani, Mathematical Physics, Ch. 15 (vector analysis) · Nakahara, Geometry, Topology and Physics, §5.4 (divergence as ) · Riley, Hobson and Bence, Mathematical Methods for Physics and Engineering, 3rd ed., §10.7–10.9 · Griffiths, Introduction to Electrodynamics, 4th ed., §1.2.4 and §1.5.3. Key numerical anchors: ; the flux of over any enclosing sphere is exactly ; the Divergence-Theorem check for over the ball gives on both sides.
Prerequisites. Scalar and Vector Fields · The Del Operator and Vector Differential Identities · Surface Integrals and Flux · Partial derivatives. Leads to. The Divergence (Gauss) Theorem · The Laplacian Operator · Curl of a Vector Field · Volume Integrals.
Ask the tutor: Ask me to walk through why the metric factor makes vanish away from the origin yet hide a delta-function source at it.
Is divergence the same thing as the divergence theorem?
No — they are the local and global versions of one idea. The divergence is a pointwise scalar: the flux per unit volume produced right at a point. The divergence theorem (equation 6) is an integral identity that adds up that pointwise flux density over a whole region and equates it to the total flux through the boundary, . You can compute the operator at a single point without ever mentioning a surface; the theorem is what lets you trade a volume of sources for a surface of flux.
Why does divergence return a scalar while gradient and curl return vectors?
Because it is built as a contraction — a dot product — rather than a directional derivative or a cross product. The gradient asks "in which direction does a scalar increase fastest?", which has a direction, so it is a vector. The curl asks "about which axis does a vector circulate?", again directional. Divergence asks "how much is the field spreading, summed over all directions at once?", a single number with no preferred direction. Formally, contracts the two indices of by setting and summing, and a fully contracted object is a scalar — invariant under rotations of the axes.
What does it mean physically for divergence to be negative?
A negative divergence marks a sink — a point where more of the field flows in than out, so field lines are absorbed or the flowing quantity is disappearing. For a fluid velocity field, means the fluid is compressed there: a small parcel shrinks in volume as it moves. For an electric field, a region of negative divergence contains negative charge, since . The sign is a strict verdict: positive is net creation or outflow, negative is net destruction or inflow, zero means the point merely relays whatever passes through it.
Why is ∇·B = 0 but ∇·E is not?
Because electric charges exist as isolated sources while magnetic charges (monopoles) apparently do not. Gauss's law says that wherever there is charge density , the electric field has a source or sink — lines start on positive charges and end on negative ones. The magnetic law says magnetic field lines never start or end; they always close on themselves. This follows the moment you write , because the divergence of any curl is identically zero (equation 7). Experimentally no isolated magnetic pole has been found, which is why the right-hand side stays exactly zero — though searches continue.
Why can't I just add ∂F_r/∂r + ∂F_θ/∂θ + ∂F_φ/∂φ in spherical coordinates?
Because the spherical basis vectors change direction from point to point, so their derivatives contribute terms the naive sum omits. The clean way to see it is the master formula : the Jacobian must sit inside the derivatives, producing and . Physically, a radial face of a spherical cell has area proportional to , so the outer face is larger than the inner, and that growth weights the flux — an effect the bare misses. Skipping the metric factors breaks conservation; a real source-free field would appear to have nonzero divergence.
What does ∇·(r̂/r²) = 4π δ³(r) actually mean?
It means the inverse-square field has all of its source packed into a single point of zero size. Away from the origin the field is perfectly source-free — you can verify directly — yet the flux through any sphere around the origin is a fixed , however small the sphere. A quantity that is zero everywhere except one point yet integrates to a nonzero value is, by definition, a Dirac delta. The coefficient is the total flux, and the geometric origin of the that peppers Gaussian electromagnetism. Multiply by and this becomes Gauss's law for a point charge, .