Physics · Article
Gradient, divergence, curl, and vector calculus
Distinguish three spatial derivatives using original exact fields, then connect local flux and circulation to oriented boundary integrals under stated conditions.
Previous article: Integrals and multivariable calculus
Back to PhysicsAfter reading, you can
- Identify scalar and vector fields in a fixed Cartesian frame, retaining their quantity kinds and units.
- Calculate a partial derivative by changing one coordinate while holding the others fixed.
- Use a scalar field's gradient to find a local rate in a specified unit direction.
- Calculate divergence as a scalar and interpret it through net outward local flux.
- Calculate curl as an oriented vector and relate its normal component to local circulation per area.
- Check regularity, region and boundary orientation before using the divergence theorem or Stokes' theorem.
Declare the field and the coordinate frame
A scalar field assigns one scalar value to each allowed location; a vector field assigns a vector. Temperature can be a scalar field, while a supplied velocity at each location is a vector field. A field's arrows describe its values at locations; they do not by themselves supply a particle's trajectory.
Use fixed perpendicular Cartesian x, y and z axes, all in metres, with a stated origin. The frame is right-handed: curling the right hand's fingers from positive x toward positive y points its thumb along positive z. Components are ordered (x, y, z). All our exact hypothetical fields are supplied on the open region D where −1 m < x < 3 m, −1 m < y < 3 m and −1 m < z < 3 m.
First supply the static temperature rule T(x, y, z) = 280 K + (3 K/m)x + (4 K/m)y on D. K denotes kelvin. Later, supply separate velocity fields at one stipulated instant, with component units m/s. These are teaching models, not measurements, and their decimal values imply no instrument precision. Spatial derivatives at that instant do not supply a future motion or a conservation law.
Differentiate one coordinate at a time
The partial derivative ∂T/∂x holds y and z fixed and takes the finite two-sided limit of [T(x + h, y, z) − T(x, y, z)]/h as the nonzero length increment h approaches zero. The symbol ∂ marks a partial derivative. Use points and increments inside D; the open region provides both sides near every point.
For the supplied T, the position-independent term and the y term cancel from this quotient. What remains is (3 K/m)h/h = 3 K/m for h ≠ 0. Thus ∂T/∂x = 3 K/m. Holding x and z fixed instead gives ∂T/∂y = 4 K/m; holding x and y fixed gives ∂T/∂z = 0 K/m.
For a vector field F = (Fₓ, Fᵧ, F_z), each component is itself a scalar function of x, y and z. Differentiate the selected component with respect to the selected coordinate. In the linear fields below, all first partial derivatives exist and are continuous throughout D. The coordinate derivatives are spatial rates; none is a derivative with respect to time.
The gradient gives a scalar field's local spatial change
In this fixed Cartesian frame, the gradient is ∇T = (∂T/∂x, ∂T/∂y, ∂T/∂z). The symbol ∇ is pronounced 'nabla' and denotes a spatial differential operator. It acts on a field; it is not an ordinary physical vector supplied by the model. Gradient takes a scalar field to a vector field. Here ∇T = (3, 4, 0) K/m.
For a differentiable scalar field, the local derivative per length in a dimensionless unit direction u is ∇T·u. The dot product multiplies corresponding components and adds them. If the gradient is nonzero, its direction gives the greatest local increase and its magnitude gives that rate. If it is zero, this interpretation selects no unique direction.
Our gradient has magnitude √(3² + 4²) K/m = 5 K/m, so its unit direction is (3/5, 4/5, 0). A direction is a vector of magnitude one, not a displacement in metres. The gradient describes increasing temperature in the supplied static rule. Inferring heat transport would require a separate physical law.
Divergence measures net outward local flux
In these Cartesian coordinates, divergence is ∇·F = ∂Fₓ/∂x + ∂Fᵧ/∂y + ∂F_z/∂z. It takes a vector field to a scalar field. Each component is differentiated with respect to its matching coordinate. The dot notation abbreviates this operation on functions.
To interpret it, select a small closed region around a point, integrate F's outward normal component across its complete boundary, and divide by the enclosed volume. For a field with continuous first partial derivatives, the limit as a ball shrinks to the point is the divergence there. Positive means net outward flux and negative net inward flux in that limit.
Supply V = (αx, αy, αz) at one instant, with α = 0.50 s⁻¹. Each component has units s⁻¹ m = m/s. Its divergence is α + α + α = 1.50 s⁻¹ everywhere on D. At the origin V is the zero vector, yet its divergence is positive: nearby spatial change, rather than the speed at that point, determines divergence.
For a velocity field, outward surface flux has units (m/s)m² = m³/s, and dividing by volume gives s⁻¹. It is a volume-flux quantity, not automatically a mass-flow rate. No mass density or material-creation claim is supplied by this velocity rule.
Curl records oriented local circulation
In a right-handed Cartesian frame, curl is ∇×F = (∂F_z/∂y − ∂Fᵧ/∂z, ∂Fₓ/∂z − ∂F_z/∂x, ∂Fᵧ/∂x − ∂Fₓ/∂y). It takes a vector field to a vector field. The component order and subtraction signs are part of the definition.
Circulation around an oriented closed curve adds F's component along the directed path, multiplied by path length. For a field with continuous first partial derivatives, curl·n is the limit of circulation per area around shrinking planar circles with chosen unit normal n. The right-hand rule pairs the loop direction with n: counterclockwise as seen from the positive-z side pairs with +z. Curl is a derivative-based local quantity, not a diagnosis from a curved arrow.
Supply W = (−βy, βx, 0 m/s) at the same stipulated instant, with β = 0.25 s⁻¹. Its divergence is zero. Its x and y curl components vanish; its z component is β − (−β) = 0.50 s⁻¹. Thus ∇×W = (0, 0, +0.50) s⁻¹. Positive-z circulation is locally positive, even though net outward local flux is zero.
Compare fields by calculation
A nonzero velocity need not have nonzero divergence or curl. For the uniform field U = (1 m/s, 0 m/s, 0 m/s), every spatial component derivative is zero. The speed is 1 m/s while both operators give zero.
Curl does not require field arrows to bend. Supply the shear field H = (γy, 0 m/s, 0 m/s), with γ = 0.50 s⁻¹. Its arrows are horizontal, with horizontal velocity increasing as y increases. Divergence is zero, but curl's z component is 0 − γ = −0.50 s⁻¹. Opposite sides of a small loop contribute unequally despite the arrows being straight.
The table compares the four stipulated velocity fields on D. Divergence and curl share s⁻¹ units here, yet answer different questions. A zero net result also allows nonzero contributions that cancel; it does not require every field value to vanish.
| Supplied field, components in m/s | Divergence (s⁻¹) | Curl, ordered x, y, z (s⁻¹) |
|---|---|---|
| U = (1 m/s, 0 m/s, 0 m/s) | 0 | (0, 0, 0) |
| V = (αx, αy, αz) | +1.50 | (0, 0, 0) |
| W = (−βy, βx, 0 m/s) | 0 | (0, 0, +0.50) |
| H = (γy, 0 m/s, 0 m/s) | 0 | (0, 0, −0.50) |
Connect a complete boundary to a volume
For an oriented surface, n is its dimensionless unit normal and dA the positive area measure. The surface flux integral ∬ F·n dA adds signed normal contributions. F·n is positive where F points outward relative to n and negative where it points inward.
Use these sufficient divergence-theorem conditions: E is a bounded solid with a piecewise-smooth closed boundary ∂E; n points outward from E; and F has continuous first partial derivatives on an open region containing E and its boundary. Then ∬_∂E F·n dA = ∭_E (∇·F) dV. Here ∂E names the complete boundary and dV is positive volume measure. An isolated face does not enclose that volume.
Take E to be the cube 0 ≤ x, y, z ≤ 2 m, wholly within D, and use V. Its volume is 8 m³. The volume integral is (1.50 s⁻¹)(8 m³) = 12 m³/s. Directly, the three faces at x, y or z = 2 m each contribute (1 m/s)(4 m²) = 4 m³/s; the opposite faces at zero contribute zero. The total confirms the theorem for this supplied field.
Connect a loop to an oriented surface
Write circulation as ∮_C F·dr. The circle on the integral sign marks a closed path C; dr is a directed length increment along it. For a velocity field the units are (m/s)m = m²/s. These differ from surface flux through the loop's enclosed area.
For Stokes' theorem, take a bounded orientable piecewise-smooth surface S with a simple closed piecewise-smooth boundary C. Choose a consistent normal n and pair C's direction with it by the right-hand rule. If F has continuous first partial derivatives on an open region containing S and its boundary, then ∮_C F·dr = ∬_S (∇×F)·n dA. Reversing both orientations preserves the equality while reversing its sign.
Use the rectangle 0 ≤ x ≤ 2 m, 0 ≤ y ≤ 1 m, z = 0, with n = (0, 0, 1). Follow its boundary from (0, 0) to (2, 0), (2, 1), (0, 1) and back, with coordinates in metres. For W, the four edge circulations are 0, +0.50, +0.50 and 0 m²/s. Their total is +1.00 m²/s, equal to (0.50 s⁻¹)(2 m²) from curl's normal component.
Before using an operator or theorem, name the field, its domain, its units and the required orientation. Our linear fields have continuous derivatives across the stated neighbourhoods; exact arithmetic establishes these model calculations. It does not establish a real fluid's motion or heat flow. The next lesson introduces matrices and linear algebra, which provide further tools for organizing component calculations.
Three spatial derivatives and a consistently oriented loop
Directed boundary: O → A → B → C → O
n = +z; out of the plane toward the viewer
- O → A: 0 m²/s
- A → B: +0.50 m²/s
- B → C: +0.50 m²/s
- C → O: 0 m²/s
Total circulation: +1.00 m²/s
Normal curl component: +0.50 s⁻¹
Rectangle area: 2 m²
Path arrows indicate integration direction, not a particle trajectory.
1. Gradient: scalar to vector
T = 280 K + (3 K/m)x + (4 K/m)y gives ∇T = (3, 4, 0) K/m. The gradient describes local temperature change; it supplies no heat-flow law.
2. Divergence: vector to scalar
V = (αx, αy, αz), α = 0.50 s⁻¹, gives ∇·V = 1.50 s⁻¹. The full 2 m cube has outward velocity flux 12 m³/s; no mass density is supplied.
3. Curl: vector to vector
W = (−βy, βx, 0 m/s), β = 0.25 s⁻¹, gives ∇×W = (0, 0, +0.50) s⁻¹. Its normal component supplies oriented local circulation per area.
4. Pair the rectangle's orientations
Follow (0, 0) → (2, 0) → (2, 1) → (0, 1) → (0, 0), with coordinates in metres and normal +z. The four edge circulations sum to +1.00 m²/s. Reverse both boundary direction and normal to obtain −1.00 m²/s on both sides of Stokes' equality.
Worked examples
Find a temperature rate in a unit direction
For the supplied T, find the greatest local temperature increase per length at the origin. Then evaluate T at the endpoint of a 1 m step in that direction.
- Hold the other coordinates fixed in turn: the three partial derivatives are 3 K/m, 4 K/m and 0 K/m. Thus ∇T = (3, 4, 0) K/m.
- Its magnitude is √(9 + 16) K/m = 5 K/m. Dividing the gradient by its magnitude gives the dimensionless unit direction u = (3/5, 4/5, 0).
- The directional rate is ∇T·u = (3 K/m)(3/5) + (4 K/m)(4/5) = 5 K/m.
- The 1 m step reaches (0.60 m, 0.80 m, 0 m), within D. Direct substitution gives T = 280 K + 1.80 K + 3.20 K = 285 K.
- The finite increase is exactly 5 K because this supplied field is linear in position. A general field's gradient supplies a local derivative, not a guaranteed exact finite-step change.
The greatest local rate is 5 K/m in direction (3/5, 4/5, 0). The stated model gives T = 285 K at the allowed endpoint.
Check flux on every face of a cube
For V = (αx, αy, αz), α = 0.50 s⁻¹, find the total outward surface flux on the boundary of the 2 m cube. Compare it with the volume integral of divergence.
- Each cube face has area (2 m)(2 m) = 4 m². Its outward normal is one of ±x, ±y or ±z unit directions.
- On x = 2 m, the normal velocity component is α(2 m) = 1 m/s, giving +4 m³/s. On x = 0, the outward normal is negative x but Vₓ = 0 m/s, giving zero.
- The y and z face pairs give the same contributions. All six faces together give 4 + 4 + 4 = 12 m³/s.
- Divergence is α + α + α = 1.50 s⁻¹ and cube volume is (2 m)³ = 8 m³. Their product is 12 m³/s.
- The complete piecewise-smooth boundary is outward-oriented, and the linear field has continuous first partial derivatives on D around the whole cube. Thus the stated theorem conditions hold.
Both calculations give +12 m³/s. This is velocity surface flux; no mass density has been supplied to turn it into a mass-flow rate.
Check a loop's circulation and orientation
For W = (−βy, βx, 0 m/s), β = 0.25 s⁻¹, calculate circulation around the stated 2 m by 1 m rectangle in the direction paired with +z.
- The bottom edge has y = 0 and runs in positive x, so its tangential component Wₓ is zero: its circulation is 0 m²/s.
- The right edge has x = 2 m and runs in positive y. Wᵧ = (0.25 s⁻¹)(2 m) = 0.50 m/s, so its contribution is (0.50 m/s)(1 m) = +0.50 m²/s.
- The top edge has y = 1 m and runs in negative x. Wₓ = −0.25 m/s; integration from x = 2 m to x = 0 gives (−0.25 m/s)(−2 m) = +0.50 m²/s.
- The left edge has x = 0 and runs in negative y. Its tangential component Wᵧ is zero, so the total is +1.00 m²/s.
- The normal curl component is +0.50 s⁻¹ and the rectangle area 2 m². Their product is +1.00 m²/s. The smooth linear field, planar surface and compatible boundary orientation meet the stated Stokes conditions.
The counterclockwise circulation as seen from the positive-z side is +1.00 m²/s, equal to curl flux through the +z-oriented rectangle.
Try it yourself
Evaluate T and its gradient at (1 m, 1 m, 2 m). Does the gradient have temperature units?
Show the answer and reasoning
T = 287 K and ∇T = (3, 4, 0) K/m. The gradient has temperature-per-length units.
Substitution gives 280 K + 3 K + 4 K; z contributes nothing. The partial derivatives are constant across D, but each divides a temperature change by a length change. T and its gradient have different quantity kinds and units.
For this T, calculate the directional rate in u = (−4/5, 3/5, 0). Is u a unit direction?
Show the answer and reasoning
Yes, u is a unit direction, and ∇T·u = 0 K/m.
The squared magnitude is 16/25 + 9/25 = 1. The dot product is −12/5 K/m + 12/5 K/m = 0 K/m. For this linear rule, allowed steps in that direction keep T constant. A zero rate in this one direction does not make T a maximum or minimum.
A separate supplied uniform velocity field is J = (3 m/s, 0 m/s, 0 m/s) throughout D. Find its speed, divergence and curl.
Show the answer and reasoning
The speed is 3 m/s; divergence is 0 s⁻¹ and curl (0, 0, 0) s⁻¹.
The vector magnitude is 3 m/s. Every component is position-independent, so every spatial partial derivative is zero. Neither divergence nor curl is the speed of the field.
For H = ((0.50 s⁻¹)y, 0 m/s, 0 m/s), find divergence and curl. Can the arrows remain horizontal?
Show the answer and reasoning
Divergence is 0 s⁻¹ and curl (0, 0, −0.50) s⁻¹. The arrows remain horizontal.
Hₓ depends on y, so ∂Hₓ/∂x = 0 while ∂Hₓ/∂y = 0.50 s⁻¹. The other components vanish. Thus the only nonzero curl component is ∂Hᵧ/∂x − ∂Hₓ/∂y = −0.50 s⁻¹. Variation across rows produces circulation even though each arrow points along x.
For V on the 2 m cube, what is the outward flux through the single face y = 2 m? Can that one face replace the complete boundary in the stated divergence theorem?
Show the answer and reasoning
The face flux is +4 m³/s. It cannot replace the complete closed boundary, whose flux is +12 m³/s.
The face has outward normal +y, normal component 1 m/s and area 4 m². The theorem relates the volume integral to all outward boundary contributions. One open face does not enclose the cube.
For W on the stated rectangle, reverse the boundary to clockwise as seen from the positive-z side. What happens to circulation? What must change in the surface orientation to retain the Stokes equality?
Show the answer and reasoning
Circulation becomes −1.00 m²/s. Choose normal n = (0, 0, −1) so the surface curl flux also becomes −1.00 m²/s.
Reversing the directed path negates its line integral. Curl itself is unchanged, but its dot product with the reversed normal is −0.50 s⁻¹, giving −1.00 m²/s over 2 m². Reversing only the path while keeping +z would mismatch the orientations required by the theorem.
What to carry forward
- A field supplies scalar or vector values at locations in a stated frame and domain; spatial derivatives do not by themselves prescribe temporal evolution.
- Gradient turns a differentiable scalar field into a vector describing local spatial rates, with the scalar's units divided by length.
- Divergence is a scalar local net-outward-flux-per-volume quantity, distinct from field speed.
- Curl is an oriented vector whose normal component describes local circulation per area; calculate it with the stated Cartesian signs and right-hand convention.
- The divergence theorem uses a complete closed outward boundary and a sufficiently regular field over the enclosed region.
- Stokes' theorem pairs surface normal and boundary direction and requires a sufficiently regular field over the surface neighbourhood. Preserve those conditions, units and model limits.
References
Sources for the concepts and teaching approaches in this article.
- MA 105: Calculus, Lecture 20B. V. Limaye — Indian Institute of Technology BombayCourse notes · PDF
- Calculus Volume 3Gilbert Strang and Edwin “Jed” Herman — OpenStax / Rice UniversityTextbook chapterCalculus Volume 3, 4.3 Partial DerivativesCalculus Volume 3, 4.6 Directional Derivatives and the GradientCalculus Volume 3, 6.8 The Divergence TheoremCalculus Volume 3, 6.7 Stokes’ Theorem
- Vector Analysis鈴木 修吾 (SUZUKI Shugo) — University of TsukubaCourse notes · PDF