The Divergence of a Vector Field
The divergence is one of the two fundamental first-order vector derivatives (the other being the curl). Given a vector field — for example an electric field, a fluid velocity, or a heat flux — the divergence answers a purely local question: at this point, is the field a net source, a net sink, or neither? It does so by comparing how much of flows out of an infinitesimal closed surface to how much flows in, normalized by the enclosed volume. Concretely, is constructed by dotting the del operator into , giving the scalar . Although this looks like a notational trick, the result is genuinely a scalar field: its value at a point is independent of the coordinate frame, which is guaranteed by the geometric flux definition. The divergence is also the integrand of the divergence (Gauss) theorem, — the single most important integral identity in electromagnetism, which turns Gauss's law from a statement about enclosed charge into a local field equation. Physically, the divergence sits at the heart of every conservation statement in field theory. When a quantity (charge, mass, energy) is locally conserved, its current density obeys : the rate at which the density piles up at a point equals the rate at which current converges there. Understanding the divergence therefore means understanding sources, sinks, and the bookkeeping of flux that governs all of classical field physics.
- The divergence of a vector field is a scalar field, , that measures the net outward flux of per unit volume in the limit of a vanishing region around a point.
- In Cartesian coordinates , the sum of the diagonal partial derivatives.
- Positive divergence marks a source (field 'spreads out'); negative divergence marks a sink (field 'converges'); zero divergence (solenoidal) means flux in equals flux out.
- The flux definition is coordinate-independent and underlies the divergence (Gauss) theorem.
- In electromagnetism, (Gauss's law) and (no magnetic monopoles) are two of Maxwell's four equations.
- The formula changes in curvilinear coordinates because of the metric scale factors — never just sum partials in spherical or cylindrical coordinates.
- Key idea: The divergence is the net outward flux per unit volume: . In Cartesian coordinates this reduces to the sum of diagonal partial derivatives, but the flux definition is what makes it a true coordinate-independent scalar.
Where this lives today
Enforcing zero divergence is a daily engineering battle. Every incompressible-flow solver — the codes behind aircraft design, weather models and blood-flow simulation — must keep at each timestep, which is done by solving a Poisson equation for pressure precisely so that its gradient removes any divergence the update created. In computational astrophysics the same fight happens magnetically: naive MHD schemes generate small nonzero that acts like fictitious magnetic monopoles and wrecks the dynamics, so codes use "constrained transport" or divergence-cleaning schemes to keep the field honestly solenoidal. Meanwhile, the deepest experimental question attached to this operator is still open: is exactly true? Grand-unified theories predict magnetic monopoles should exist, and experiments from superconducting loops (which caught one famous, never-repeated candidate event in 1982) to the MoEDAL detector at the LHC keep hunting for a single particle that would put a delta function on the right-hand side.
The physical picture
Picture as the velocity field of a steady fluid. Surround a point with a tiny balloon. If more fluid leaves the balloon than enters, the divergence is positive — there must be a source (a tap) inside. If more enters than leaves, the divergence is negative — there is a sink (a drain). If the balloon's net throughput is zero, the divergence vanishes there, even if fluid streams vigorously straight through.
A useful mental test: a uniform field (every arrow identical) has zero divergence — whatever flows in one face flows out the opposite face. Divergence requires the field to change as you move along its own direction, or for arrows to fan out or converge. A radial 'hedgehog' field fans outward everywhere and has constant positive divergence. Divergence is purely local and pointwise. It is not asking whether the field globally spreads, but whether it spreads at this infinitesimal location. The Coulomb field looks like it spreads from the origin, yet everywhere except at the origin, where all the 'source' is concentrated into a delta function. Because the dot product collapses three components into one number, divergence detects only the 'outflow' geometry of the field and is blind to circulation. A pure vortex has zero divergence but nonzero curl. The two operators are orthogonal probes of the field's first-order structure — and the E&M payoff is immediate: the divergence of will become Gauss's law, revealing charge wherever field lines begin or end, while will declare that magnetic field lines never begin or end at all.
Two definitions, one operator
The computational definition dots del into the field, picking out the three diagonal derivatives — how fast each component changes along its own direction:
where: — vector field with components ; — del operator, ; — a scalar field. Note which derivatives appear: acts only on , never on — sideways variation of a component contributes to curl, not divergence. The geometric definition asks the balloon question directly, with no reference to axes at all:
where: — volume of a small region around the point, shrinking to zero; — closed surface bounding ; — outward-pointing surface element. This is the definition that means something: net outward flux per unit volume. Because no coordinate system appears, the number it produces is automatically frame-independent — which is how we know the Cartesian sum (1) is a genuine scalar. The derivation below shows the two definitions are the same thing.
We are showing that the coordinate-free flux-per-volume definition (2), evaluated on a shrinking box, produces exactly the Cartesian sum (1) — the calculation that welds the geometric meaning of divergence to its computational recipe. The strategy: take an infinitesimal rectangular box of sides centred at , compute the net flux through each opposite pair of faces by Taylor expansion, add the three pairs, and divide by the volume. The step to watch is the sign bookkeeping on opposite faces: their outward normals point in opposite directions, so the pair contributes a difference of the field — which is what becomes a derivative in the limit.
Step 1. Net flux through the pair of faces perpendicular to . The face at has outward normal and passes flux ; the face at has normal :
Why: Taylor-expanding about the centre to first order, the constant parts cancel between the two faces and only the derivative term survives — the box detects change, not value.
Step 2. The - and -face pairs contribute identically with their own derivatives, so the total closed-surface flux is
Why: flux is additive over the six faces, and each Cartesian direction is independent at first order in the box dimensions.
Step 3. Divide by the volume and take the limit:
The geometric balloon test and the algebraic recipe are one and the same. Summing this relation over a stack of tiny boxes filling a finite volume — interior faces cancelling pairwise — is precisely the divergence theorem, previewed next. Verified: standard construction, Griffiths §1.3.4 and Purcell §2.7; higher-order Taylor terms vanish as , so the limit is exact for differentiable fields.
Summing flux-per-volume over a finite region gives the integral identity this operator was born for — stated here, dissected in its own article:
where: — volume element; — the closed surface bounding . The divergence (Gauss) theorem: total source strength inside equals net flux through the boundary. It is the bridge on which Gauss's law travels between its integral and differential forms.
Curvilinear forms and allied identities
In curved coordinate systems the balloon test still defines the divergence, but the recipe changes because area elements and basis vectors vary from point to point. In spherical coordinates:
where: — radius, polar angle, azimuth; — physical (orthonormal) components. The tell-tale structure is inside the radial derivative: an outgoing radial field crosses spheres whose area grows as , and the formula tracks that geometry. In cylindrical coordinates the same logic gives:
where: — cylindrical radius, azimuth, height. Only the -term looks Cartesian, because only the -direction has constant geometry. Two structural identities tie the divergence to its siblings. Applying it to a gradient produces the Laplacian, the master operator of potential theory:
where: — scalar field (e.g. electric potential); — Laplacian. And applying it to any curl gives exactly zero:
where: — any twice-differentiable vector field; mixed partials cancel in pairs. Physically: circulation patterns carry no net outflow. This is the identity that lets automatically satisfy . When a scalar multiplies a vector field, the divergence obeys the Leibniz rule:
where: — scalar field; — vector field. Each term lets del differentiate one factor; this rule reappears constantly in energy-flow calculations later in the track.
The electromagnetic payoff
Two of Maxwell's four equations are divergence statements:
where: — electric and magnetic fields; — charge density; — permittivity of free space. The first is Gauss's law in differential form: charge density is, literally, the source strength of the electric field — the balloon test applied to measures the charge inside. The second says the magnetic field never passes the balloon test anywhere: no magnetic monopoles, field lines that always close on themselves.
Go deeper · Derivation B · 1 minDivergence of the Coulomb field and the delta function
We are computing for the prototype inverse-square field of a point charge — and resolving the famous paradox that the answer is zero everywhere yet the total flux is . The strategy: apply the spherical divergence formula away from the origin, compute the flux through a sphere directly, and let the collision between the two results force the Dirac delta on us. Watch the special role of the exponent 2: it is precisely the falloff that makes constant, and no other power of produces this concentrated-source structure.
Step 1. Apply the spherical divergence formula (4) for , where only is nonzero:
Why: is constant — the growing area of successive spheres exactly compensates the weakening field, so no shell between them gains or loses flux.
Step 2. Compute the flux through a sphere of radius centred on the origin:
Why: the field is radial and the surface element of a sphere is radial, so the dot product is just the product of magnitudes; the cancellation makes the answer independent of .
Step 3. Confront the paradox. By the divergence theorem (3), the volume integral of over any ball containing the origin must equal — but the integrand vanishes at every point except one. A "function" that is zero everywhere except a single point yet integrates to a finite number is precisely the three-dimensional Dirac delta:
Why: the delta is defined by exactly this property — — and Step 2 fixes its coefficient to .
Step 4. Read it as electrostatics: with , the identity gives — Gauss's law for a point charge, whose density is . All the "source" of the Coulomb field lives at the charge itself; empty space, however strong the field, is sourceless. Verified: reproduces Griffiths §1.5.1 and §1.5.3; the flux value and the delta-function identity are standard.
Go deeper · Derivation C · 1 minThe continuity equation from the divergence theorem
We are deriving the local law of charge conservation, , from the global statement that charge in a region changes only by current crossing its boundary. The strategy is the standard localization move of field theory — write the global balance for an arbitrary fixed volume, convert the surface term to a volume term with the divergence theorem, and then argue that an integral vanishing over every volume forces the integrand to vanish pointwise. That last step is the one to appreciate: it is how integral physics becomes differential physics, and we will reuse it for Gauss's law itself.
Step 1. Global conservation for a fixed volume bounded by :
Why: the enclosed charge decreases at exactly the rate net current flows outward — no teleportation, charge must cross the surface to leave.
Step 2. Write the enclosed charge as a volume integral and pull the time derivative inside:
Why: the volume is fixed in space, so only the integrand depends on time — the derivative becomes partial and passes through.
Step 3. Convert the surface flux with the divergence theorem (3):
Why: this is the key structural move — both sides of the balance now live over the same volume and can be compared integrand to integrand.
Step 4. Combine and localize:
Since is arbitrary — the balance holds for every region, however small — the integrand itself must vanish at every point. The same template will localize mass conservation in fluids, probability in quantum mechanics, and energy via the Poynting vector. Verified: standard derivation, Griffiths §5.1.3 and Jackson §6.1; dimensional check, both terms carry .
Limiting cases
Reading off the divergence from the field geometry in limiting cases:
| Case | Result | Meaning |
|---|---|---|
| Uniform field | . No sources or sinks; flux through any closed surface is zero. | |
| Radial 'fanning' field | , a constant positive divergence — uniform source density everywhere. | |
| Coulomb / inverse-square field | : zero everywhere except a point source at the origin. | |
| Pure vortex (rotational) field | . Circulation without sources — divergence is blind to curl. | |
| Magnetic field (always) | Solenoidal field lines never begin or end; there are no magnetic monopoles. |
Worked examples
Example 1 — Cartesian source-hunting with a flux cross-check (confidence builder). Let .
Step 1. Sum the diagonal partials: , , :
Step 2. Classify by position: at the divergence is — a source; at it is — a sink; the plane is the sourceless boundary between the two regimes. Note the - and -coordinates are irrelevant: only variation along each component's own direction registers.
Step 3. Flux cross-check on the simplest fanning field , for which the same recipe gives . On a sphere of radius : on the surface, so the flux is (per unit field). The enclosed volume is , and
— the flux definition and the partial-derivative recipe agree exactly, at any radius.
Example 2 — from field to charge density (exam level). Inside a charged ball the electrostatic field is measured to be radial with , where . What charge density produces it?
Step 1. Use the spherical divergence (4) — the field is radial, so only the first term lives:
Note the trap avoided: the naive is wrong by a factor of 3.
Step 2. Apply Gauss's law (9):
A linearly growing radial field inside a ball means uniform charge density — here .
Step 3. Sanity check with the integral form: for a ball of radius , , while the flux is . The ratio equals the flux — Gauss's law closes, differential and integral forms telling one story.
Applications
Gauss's law in electrostatics. The differential form says that electric field lines originate on positive charge and terminate on negative charge. Where the divergence is positive there is net positive charge density; where it is zero (empty space) the field is sourceless. Integrating over a volume and applying the divergence theorem recovers the integral form , the workhorse for symmetric charge distributions.
Absence of magnetic monopoles. states that magnetic field lines have no sources or sinks — they always close on themselves. This is why a bar magnet cut in half yields two dipoles rather than isolated north and south poles, and it constrains the vector-potential representation , since the divergence of any curl vanishes identically.
Conservation laws as continuity equations. Any locally conserved quantity with density and current density obeys . This applies to electric charge, mass in fluid flow, probability in quantum mechanics, and energy via the Poynting vector. The divergence converts a global conservation statement into a pointwise differential equation.
Heat and fluid flow. For a steady incompressible fluid the velocity field satisfies (no net creation of fluid), and the heat-flux density enters the heat equation through its divergence, . The divergence of a gradient appearing here is exactly the Laplacian.
Origins · 1 minCarl Friedrich Gauss and how this was discovered
Gauss corrected his father's payroll arithmetic at age three and summed 1 to 100 in seconds at seven; by the end of his life he had reshaped number theory, geometry, astronomy, statistics — and the mathematics of flux. The divergence theorem that anchors this article emerged from his work on gravitational and magnetic attraction, where he needed to relate what happens inside a body to what can be measured on its surface. Characteristically, he sat on results for years — his motto was pauca sed matura, "few but ripe" — and several theorems he proved privately were rediscovered by others (Ostrogradsky published the general divergence theorem in 1826). With Weber he built one of the first electromagnetic telegraphs and organized the worldwide Magnetic Union to map the Earth's field, work in which the source-free character of magnetism — our — was hard data before it was theory. The CGS unit of magnetic field bore his name for a century.
Going further
References. Griffiths, Introduction to Electrodynamics, 4th ed., §1.2.4 and §1.3.4 · Jackson, Classical Electrodynamics, 3rd ed., §1.1 and front-cover identities · Purcell & Morin, Electricity and Magnetism, 3rd ed., §2.7–2.10 · Zangwill, Modern Electrodynamics, §1.4
Provenance. Cartesian, spherical, and cylindrical divergence formulas verified against Griffiths front cover and §1.2.4/§1.4. The delta-function identity is Griffiths §1.5.1. Continuity equation derivation follows Griffiths §5.1.3. Maxwell's two divergence equations and constant are standard; a verifier should recompute the flux integrals ( and ) and the second-derivative cancellation for . Cross-check Jackson §1.1 and Purcell §2.7–2.10.
Builds on: Scalar and Vector Fields · The Del Operator (Nabla) · Surface Integrals and Flux · Volume Integrals Leads to: The Divergence (Gauss) Theorem · Second Derivatives and the Laplacian · The Curl of a Vector Field · Spherical Coordinates
The arrows of the Coulomb field visibly spread apart — how can its divergence be zero away from the charge?
Because "spreading apart" is compensated by "weakening". The balloon test counts net flux: between two nearby spheres, the field lines spread over -larger area but the field is weaker, so exactly as much flux leaves the outer sphere as entered the inner one. The spherical formula makes it mechanical: means zero radial divergence. Visual spreading of arrows is not divergence; only a genuine imbalance of in-versus-out flux is. The hedgehog field , whose magnitude grows with , is the one with honest positive divergence.
Why do only the diagonal derivatives appear — what happened to how Fx changes with y?
The divergence asks about outflow, and only the change of a component along its own direction moves flux through a closed box: varying with makes the flux through the two -faces unequal. varying with tilts the flow sideways — it shifts where the flux crosses, not how much net crosses, and instead feeds the curl. The nine first derivatives split cleanly: the diagonal trace is the divergence, the antisymmetric off-diagonal part is the curl, and the symmetric traceless remainder (shear) belongs to continuum mechanics.
What are the units of divergence, and what does a value like 5 per second mean?
Divergence divides field units by length: if is a velocity in m/s, has units 1/s. And it has a beautiful direct meaning there: it is the fractional expansion rate of an infinitesimal fluid blob — . A value of 5 s⁻¹ means a small parcel is inflating by a factor per second's worth of that rate. For in V/m, the divergence carries V/m², which times is exactly a charge density — Gauss's law is dimensionally forced.
What does solenoidal mean, and why is that word used for divergence-free fields?
A field with everywhere is called solenoidal, after the solenoid coil, whose magnetic field is the archetype: lines that never start or stop, only loop. Solenoidal fields have three equivalent characterizations — zero divergence, zero flux through every closed surface, and expressibility as a curl, . The magnetic field satisfies all three globally. Incompressible flow satisfies them too, which is why fluid dynamicists and electromagnetists constantly borrow each other's mathematics.
Is the divergence theorem the same as Gauss's law?
No — one is mathematics, the other physics, and the naming collision confuses everyone once. The divergence theorem (also called Gauss's theorem) is an identity true for any well-behaved vector field: volume integral of divergence equals boundary flux. Gauss's law is a statement about nature: the flux of the electric field specifically is . The theorem is the converter that lets the law wear two outfits — integral () and differential (). You need both: the integral form for symmetric problems, the differential form for field theory.
How literally should I take the delta function in the point-charge divergence?
Take it as precise shorthand for a limiting procedure. A point charge is an idealization; smear the same total charge over a tiny ball of radius and everything is finite: inside the ball, zero outside, with the inside value growing as while the region shrinks as — the volume integral stays throughout. The delta function is the limit of this family. All delta manipulations in electrodynamics can be checked by re-inflating the point into a small ball, doing honest calculus, and shrinking again.
Does positive divergence at a point mean field lines are actually created there?
For the electric field, yes in exactly the field-line-drawing sense: lines begin on positive charge, in proportion to it. In general the statement is about flux, not line count — field lines are a visualization whose density conventions you choose. What is rigorously true: positive at a point means every sufficiently small closed surface around it exports net flux, so any honest field-line drawing must start new lines there. That is why translates to "magnetic field lines have no ends" — a statement checked to extraordinary precision by the continued non-observation of magnetic monopoles.