← STEM Studio
Interactive Explainer · Engineering Mathematics

Vector Calculus: Gradient, Divergence, Curl

Three operators that describe how a field behaves at every point in space — pointing "uphill," spreading from a source, or spinning around a center — made visible as vector field patterns.

1.0
Gradient (∇f) — Points Toward Steepest Increase
Vectors point radially outward from the center, representing the direction of steepest increase of a scalar field (like temperature or elevation) at each point. The gradient is always perpendicular to the field's contour lines.

About Gradient, Divergence, and Curl

Gradient, divergence, and curl are the three fundamental vector calculus operators used throughout electromagnetic field theory, fluid mechanics, and heat transfer. Each answers a different question about how a field behaves at a point in space — how a scalar field changes (gradient), whether a vector field has a source or sink at a point (divergence), and whether a vector field rotates around a point (curl). Toggle between the three above to see how their characteristic vector patterns differ.

Gradient — From a Scalar Field to a Vector

The gradient (∇f) takes a scalar field — a single number at every point in space, like temperature or elevation — and produces a vector field pointing in the direction of steepest increase, with magnitude equal to how steep that increase is. Walking in the direction opposite the gradient (down-gradient) is the fastest way to decrease the scalar quantity — this is literally the mathematical basis of gradient descent optimization algorithms, and physically describes things like heat flow (which moves down the temperature gradient) or water flow (which moves down the elevation/pressure gradient).

Divergence — Measuring Sources and Sinks

Divergence (∇·F) takes a vector field and produces a scalar at each point, measuring whether that point acts as a source (positive divergence — field lines spread outward, like flow emanating from a point) or a sink (negative divergence — field lines converge inward). Zero divergence everywhere describes a field with no sources or sinks anywhere in that region — an important property in fluid mechanics (incompressible flow has zero divergence) and electromagnetics (regions with no electric charge have zero divergence of the electric field, per Gauss's law).

Curl — Measuring Rotation

Curl (∇×F) takes a vector field and produces another vector field measuring the local rotational tendency at each point — its direction (by the right-hand rule) indicates the axis of rotation, and its magnitude indicates how strong that rotation is. A field with zero curl everywhere is called irrotational or conservative — it can be written as the gradient of some scalar potential, which is why conservative force fields (like gravity or electrostatic fields) have zero curl. Nonzero curl shows up physically as the circulating magnetic field around a current-carrying wire (per Ampère's law) or the rotational flow in a fluid vortex.

Frequently asked questions

Are gradient, divergence, and curl all related to each other?

Yes — they're connected through vector identities that show up repeatedly in electromagnetic theory. For example, the curl of a gradient is always zero (a conservative field has no rotation), and the divergence of a curl is always zero (a curl field has no sources or sinks). These identities aren't coincidental — they reflect deep structural properties of vector fields that Maxwell's equations rely on directly.

Why do these operators matter for Maxwell's equations specifically?

Maxwell's equations are written directly in terms of divergence and curl — Gauss's law (∇·E = ρ/ε₀) is a divergence statement about the electric field, and Faraday's law (∇×E = -∂B/∂t) and Ampère's law (∇×B = μ₀J + ...) are curl statements. Understanding what divergence and curl physically mean is a prerequisite to understanding what these fundamental equations of electromagnetism are actually saying.

What does it mean for a field to be "conservative"?

A conservative vector field is one whose curl is zero everywhere — physically, this means the work done moving through the field between two points is independent of the path taken, and depends only on the endpoints. Gravity and electrostatic fields are conservative; the induced electric field around a changing magnetic field (per Faraday's law) is a clear example of a non-conservative field.

🎓

Try our STEM Learning Studio

More calculators, simulators, and guides for this discipline.

Related tools & guides

Maxwell's EquationsSTEM Studio