Vector Calculus for Physics (Gradient, Divergence and Curl)
Almost every field theory in physics — gravitation, electrostatics, magnetostatics, fluid flow, heat conduction — is written in the language of three differential operators acting on fields: the gradient, the divergence and the curl. This first chapter is a working course in that language. It assumes you can already differentiate and integrate functions of one variable and have met partial derivatives; it builds from there to the three operators, the three integral theorems that invert them, and the handful of identities that the rest of the course will use without comment.
The emphasis throughout is on what the mathematics means physically, in the manner of Griffiths' opening chapter. The gradient is not merely a vector of partial derivatives — it is the direction of steepest increase and encodes the whole local behaviour of a scalar field. The divergence is not a formula to memorise — it is the flux out of an infinitesimal box per unit volume, which is why it appears in every conservation law. The curl measures circulation per unit area, which is why it governs anything that rotates or induces.
How to read this chapter. Keep a page for the identities you derive (Section 6) and a page for the three fundamental theorems (Section 7). Everything in Blocks A–C is applied vector calculus; a derivation later that "just quotes Stokes" is quoting a result you should be able to state precisely from memory by the end of this chapter.
1. Scalar and Vector Fields
A scalar field assigns a single number to every point of space: the temperature in a room, the electrostatic potential , the air pressure . A vector field assigns a vector to every point: the velocity of a fluid, the electric field , the gravitational field .
In Cartesian coordinates we write and a vector field as
The Cartesian unit vectors are constant — the same at every point — which is what makes Cartesian components easy to differentiate. The next chapter deals with the complication that polar and spherical basis vectors are not constant.
2. The Gradient: Steepest Ascent of a Scalar Field
Given a scalar field , its gradient is the vector field
Its meaning comes from the multivariable chain rule. The change in produced by an infinitesimal displacement is
Writing for a step of length in the direction , the directional derivative is . This is largest when , so:
- points in the direction in which increases most rapidly;
- is that maximum rate of increase (the slope in the steepest direction);
- is perpendicular to the surfaces of constant (level surfaces), because moving along such a surface gives , hence .
Worked example — gradient of the radial distance. Let . Then and similarly for , so
The distance from the origin increases fastest as you move directly away from the origin, at unit rate — exactly as it must. A short extension: for any function of distance alone, the chain rule gives , so . This single result — the gradient of the potential of a point source — is why both the electrostatic and the gravitational field fall off as .
3. The Del Operator
The three operators are unified by treating
as a vector differential operator. It is not a vector — it has no value until it acts on something — but it obeys enough of the algebra of vectors that the notation is worth keeping. Acting on a scalar by ordinary multiplication it gives the gradient ; dotted into a vector field it gives the divergence ; crossed into a vector field it gives the curl . Because contains derivatives, order matters: is a scalar field, but is a scalar operator, and the two are entirely different objects.
4. The Divergence: Flux per Unit Volume
The divergence of a vector field is the scalar field
Its physical meaning is outward flux per unit volume. Consider an infinitesimal box of sides centred on a point. The flux of out of the two faces perpendicular to is
Adding the analogous contributions from the other two pairs of faces and dividing by the volume gives exactly . A positive divergence marks a source (field lines beginning there); a negative divergence marks a sink. A field with everywhere is called solenoidal — its field lines never begin or end, and the magnetic field is the canonical example.
Worked example. For , : this radially expanding field has a uniform source density, consistent with the fact that a sphere of radius encloses a flux equal to times its volume. For the inverse-square field , a direct computation gives everywhere except the origin, where the field diverges and the naive derivative fails; the flux out of any surface enclosing the origin is , which is Gauss's law in embryo and is handled rigorously with the Dirac delta in a later chapter.
5. The Curl: Circulation per Unit Area
The curl of a vector field is the vector field
Its physical meaning is circulation per unit area. Take a small rectangular loop of sides in the -plane and compute around it; the four edge contributions combine to , which is the -component of the curl times the area of the loop. The direction of is the axis about which the circulation is greatest, by the right-hand rule; its magnitude is that maximum circulation per unit area. A field with everywhere is called irrotational, and Section 7 shows that such a field is the gradient of a potential.
Worked example. The field describes rigid rotation about the -axis. Its curl is , a uniform vector along the rotation axis — and indeed a rigidly rotating fluid with angular velocity has velocity and . The curl literally measures twice the local angular velocity of the field. By contrast the inverse-square field has zero curl everywhere it is defined, which is why electrostatic fields do no net work around a closed loop.
6. Second Derivatives and the Standard Identities
Applying twice gives five combinations, of which two are identically zero and one defines a new operator.
- The Laplacian of a scalar: . It appears in Laplace's equation , Poisson's equation and the wave and diffusion equations.
- Curl of a gradient is zero: for any twice-differentiable , because mixed partial derivatives commute.
- Divergence of a curl is zero: for any twice-differentiable , for the same reason.
Two product rules are used constantly and are worth memorising:
The second — "curl curl equals grad div minus Laplacian" — is the identity that turns Maxwell's equations into wave equations.
7. The Three Fundamental Theorems
Each operator has an integral theorem that inverts it, generalising the ordinary fundamental theorem of calculus .
Gradient theorem (fundamental theorem for line integrals). For a path from to ,
The integral depends only on the endpoints, so around any closed loop.
Divergence theorem (Gauss's theorem). For a volume bounded by the closed surface ,
The total source strength inside a region equals the net flux through its boundary — the mathematical content of every "flux = enclosed charge" law.
Stokes' theorem. For a surface bounded by the closed curve ,
The total circulation density over a surface equals the circulation around its rim. Faraday's law and Ampère's law are both statements of this theorem applied to a physical field.
Worked example — verifying Stokes. Take (curl , from Section 5) and let be the disc in the plane, with its boundary circle traversed counter-clockwise. The surface integral is . The line integral: on the circle , and parametrising by , gives . The two agree, as Stokes' theorem guarantees.
8. Common Pitfalls
- Confusing which operator acts on what. Gradient acts on a scalar and returns a vector; divergence acts on a vector and returns a scalar; curl acts on a vector and returns a vector. "" for scalar is meaningless.
- Forgetting that does not commute. ; the first is a number, the second an operator. Product rules pick up two terms because differentiates each factor in turn.
- Applying at the origin. The formula is valid only away from the singularity; the enclosed flux is , encoded by a delta function.
- Dropping the non-constant basis vectors when computing divergence or curl in polar or spherical coordinates. The Cartesian formulas above do not carry over term-by-term; use the standard curvilinear expressions.
- Assuming zero curl proves a potential exists globally. It does so only on a simply connected domain; a field like has zero curl but no single-valued potential on a loop around the axis.
- Sign and orientation errors in the theorems. Stokes requires the right-hand rule between and the sense of ; the divergence theorem requires the outward normal.
Summary
- A scalar field assigns a number, a vector field a vector, to each point; Cartesian basis vectors are constant, which is why Cartesian components differentiate cleanly.
- Gradient: points along steepest increase of , has magnitude equal to that slope, and is normal to level surfaces; . Key result: , so .
- Divergence: is outward flux per unit volume; positive at sources, zero for a solenoidal field.
- Curl: is circulation per unit area; it equals twice the local angular velocity of the field and is zero for an irrotational field.
- Second derivatives: is the Laplacian; and identically; .
- Three theorems: gradient theorem (line integral of = endpoint difference), divergence theorem (volume integral of = surface flux), Stokes' theorem (surface integral of = boundary circulation). These are the backbone of every field law in the course.