Electromagnetic Waves, Antennas, and RF: Spatial Derivatives of Fields - Gradient, Divergence,
and Curl
EM01 introduced scalar and vector fields, and EM02 developed the vector algebra needed to
describe their magnitude, direction, projection, and transverse wave geometry. The next step is to
ask how a field changes from one nearby point in space to another.
For an ordinary function of one variable, the derivative answers that question. For a field in
three-dimensional space, there is more than one possible kind of spatial change. The three most
important first-order differential operations are
These operations are the mathematical language in which Maxwell’s equations will eventually be
written. EM03 develops them before Maxwell’s equations appear, so the later physics will not be
obscured by unfamiliar vector calculus [1, 2, 3, 4].
1 From an ordinary derivative to a spatial derivative
For a function of one variable,
the derivative
measures the local rate of change of f as x changes.
In three-dimensional space, a scalar field depends on several coordinates:
Changing x while holding y and z fixed gives the partial derivative
Similarly,
measure local change in the other coordinate directions.
Partial derivatives are therefore ordinary local slopes taken along selected coordinate
directions.
1.1 Units of a spatial derivative
If ϕ has units [ϕ], then
Every spatial derivative introduces one inverse power of length. This dimensional fact is a useful
check throughout vector calculus.
2 The nabla operator
In Cartesian coordinates it is convenient to collect the three spatial derivative directions into the
differential operator
The symbol ∇ is pronounced “del” or “nabla.”
It resembles a vector, but it is not an ordinary physical vector. Its components are derivative
operations. What ∇ produces depends on what follows it and on whether it is used directly, dotted
into a vector field, or crossed with a vector field.
The three central constructions are
Their input and output types differ.
Figure. gradient maps a scalar field to a vector field, divergence maps a vector field to a
scalar field, and curl maps a vector field to another vector field.
3 Gradient of a scalar field
Let
The gradient is
The input ϕ is a scalar field. The output ∇ϕ is a vector field.
Each component tells how rapidly ϕ changes in one coordinate direction.
For example, if
then
 | = 2x, | (13)
|
 | = 4y, | (14)
|
 | = 3, | (15) |
so
The gradient can vary from point to point even when the original scalar field is smooth.
4 Geometric meaning of the gradient
The gradient has two closely related geometric meanings:
- it points in the direction of the fastest local increase of the scalar field;
- it is normal to a surface on which the scalar field is constant.
Figure. Level curves represent constant values of a scalar field. The gradient is
perpendicular to the local tangent of a level curve and points toward increasing field value.
To derive the first statement, imagine moving through space along a path r(s), where s is distance
along the path. Let the unit tangent to the path be
The chain rule gives
But
so
This is the directional derivative of ϕ along n.
Using the dot product,
where 𝜃 is the angle between ∇ϕ and n.
The largest possible value occurs when
so the direction of fastest increase is the direction of the gradient.
5 Why the gradient is normal to a level surface
Suppose a path lies entirely on a level surface
Along that path,
Therefore
where t is any tangent direction to the level surface.
Hence
This result will later connect naturally with plane-wave phase. Surfaces of constant phase are
wavefronts, and the wave vector is normal to those surfaces.
6 Divergence of a vector field
Now consider a vector field
The divergence is obtained by taking the dot product of ∇ with A:
The input is a vector field. The output is a scalar field.
Divergence measures local net outward flux density: whether, in a very small neighborhood, more
field flux tends to leave than enter.
Figure. Positive divergence corresponds locally to net outward flux from a small volume.
Negative divergence corresponds to net inward flux.
7 Deriving divergence from a small box
Take a small rectangular box with side lengths
and volume
Consider the two faces perpendicular to the x direction. The net outward contribution from those
faces is approximately
For sufficiently small Δx,
Thus the x-face contribution becomes
The same argument for the y and z faces gives total net outward flux
Therefore
This is the local physical meaning of divergence.
8 Interpreting the sign of divergence
At a point,
| ∇⋅ A | > 0 | | indicates local net outward flux, | (36)
|
| ∇⋅ A | < 0 | | indicates local net inward flux, | (37)
|
| ∇⋅ A | = 0 | | indicates zero local net flux to first order. | (38) |
The word “source” is often used for positive divergence and “sink” for negative divergence.
However, zero divergence does not mean the vector field is zero. It means only that the local
first-order balance of outward and inward flux is zero.
9 Curl of a vector field
Divergence measures local net outflow. Curl measures a different geometric property: local
circulation.
For
the curl is
The input is a vector field, and the output is another vector field.
Figure. Curl measures local oriented circulation. The direction of the curl vector follows
the right-hand rule.
10 Deriving one component of curl from a small loop
Consider a small rectangular loop in the xy plane. Traverse it counterclockwise when viewed from
+z.
The circulation around the loop is
To first order, the two horizontal edges contribute
while the two vertical edges contribute
Adding them gives
Therefore
The other two components follow from the same argument applied to loops in the yz and zx
planes.
This establishes the local interpretation
11 Curl and local rotation
A useful model field is
Its divergence is
But its curl is
| ∇× A | = z | (49)
|
| = 2Ωz. | (50) |
Thus
This field circulates locally even though it has zero divergence.
For a rigid-body velocity field, the curl is twice the angular-velocity vector. That factor of two is
specific to the relation between curl and rigid rotation; curl itself should not generally be identified
directly with angular velocity.
12 Gradient, divergence, and curl answer different questions
The three operations should not be treated as interchangeable versions of “taking a
derivative.”
For a scalar field ϕ,
For a vector field A,
and
Their output types are different:
| scalar | vector, | (55)
|
| vector | scalar, | (56)
|
| vector | vector. | (57) |
13 Gradient of a plane-wave phase
EM02 introduced the three-dimensional plane-wave phase
Write
Then
Taking the spatial gradient,
| ∇𝜃 | = kxx + kyy + kzz | (61)
|
| = k. | (62) |
Therefore
This result gives a precise differential meaning to the statement from EM02 that the wave vector is
normal to constant-phase surfaces.
14 Gradient of a scalar plane wave
Consider
Let
Using the chain rule,
Since ∇𝜃 = k,
The gradient of this scalar plane wave is therefore parallel or antiparallel to the wave vector, except
at points where the gradient vanishes.
15 A vector plane wave can have zero divergence but nonzero curl
Now consider the simple vector field
Its components are
The divergence is
Although Ex varies with z, it does not vary with x. Therefore
and
The curl, however, contains
Hence
This example is important because it separates the ideas clearly:
Later Maxwell equations will relate curls of electric and magnetic fields to time variation. EM03
does not use those equations yet; it only establishes the Differential Geometry needed to read
them.
16 Worked Example 1: compute a gradient
Let
Find ∇ϕ and evaluate it at
The partial derivatives are
 | = 6x + 2y, | (78)
|
 | = 2x + 2y. | (79) |
Therefore
At (1,−1),
| ∇ϕ | = [6(1) + 2(−1)]x + [2(1) + 2(−1)]y | (81)
|
| = 4x. | (82) |
Thus
The scalar field increases most rapidly locally in the +x direction.
17 Worked Example 2: directional derivative and a level curve
Let
At the point
the gradient is
Choose the unit tangent direction
The directional derivative is
 | = ∇ϕ ⋅t | (88)
|
| = (4x + 4y) ⋅ (x −y) | (89)
|
| =  | (90)
|
| = 0. | (91) |
Thus
The chosen direction is tangent to the level curve through P, while the gradient is normal to
it.
18 Worked Example 3: compute divergence
Let
Then
| ∇⋅ A | = + +  | (94)
|
| = 2 − 1 + 3 | (95)
|
| = 4. | (96) |
Therefore
The divergence is positive everywhere, so the field has local net outward flux everywhere in this
model.
19 Worked Example 4: a divergence-free rotational field
Let
The divergence is
| ∇⋅ A | = +  | (99)
|
| = 0 + 0 | (100)
|
| = 0. | (101) |
Thus
But the field need not be spatially constant or zero. It can circulate while maintaining zero local
net outflow.
20 Worked Example 5: compute curl
For the same field,
only the z component of curl is nonzero:
| (∇× A)z | = − | (104)
|
| = 3 − (−3) | (105)
|
| = 6. | (106) |
Therefore
The positive z direction corresponds to counterclockwise local circulation when viewed from
+z.
21 Worked Example 6: gradient of a plane wave
Let
The wave vector is
Using the plane-wave gradient result,
Thus
At phase
we obtain
The gradient points opposite k at that phase because the sine factor is positive and the derivative
of cosine contributes a minus sign.
22 Worked Example 7: divergence and curl of a transverse wave field
Let
Since
depends on z, not x,
The other components vanish, so
For the curl,
Therefore
| ∇× E | = −kE0 sin(kz − ωt)y. | (119) |
Hence
This is an early example of why divergence and curl encode genuinely different information about
the same field.
23 Common mistakes
- Mistake: treating ∇ as an ordinary physical vector. It is a differential operator whose
components contain partial derivatives.
- Mistake: forgetting that gradient acts on a scalar field and produces a vector field.
- Mistake: assuming divergence differentiates every component with respect to every
coordinate. In Cartesian form, divergence pairs Ax with x, Ay with y, and Az with z.
- Mistake: thinking zero divergence means the vector field is zero. A circulating field
can have zero divergence.
- Mistake: thinking curl merely means that drawn field lines look curved. Curl measures
local oriented circulation density.
- Mistake: confusing ∇⋅ A, which is a scalar, with ∇× A, which is a vector.
- Mistake: assuming ∇⋅ E = 0 implies ∇× E = 0. These are independent local
properties.
- Mistake: forgetting units. Every spatial derivative introduces division by length.
24 What EM03 adds to the field picture
EM01 established that physical quantities can be fields over space and time. EM02 established the
vector algebra needed to describe vector-valued fields. EM03 now gives a precise language for local
spatial variation.
For a scalar field,
The gradient points toward fastest increase and is normal to level surfaces.
For a vector field,
measures local net outward flux density, while
measures local oriented circulation.
For plane-wave phase,
which connects the vector-calculus language directly to the wave-vector geometry of
EM02.
The next lesson, EM04, will combine spatial derivatives to introduce the Laplacian and the
three-dimensional wave equation. In particular,
will become the natural three-dimensional generalization of the second spatial derivative from the
one-dimensional Wave mechanics series.
References
[1] H. M. Schey, Div, Grad, Curl, and All That, 4th ed., W. W. Norton & Company,
2005.
[2] David J. Griffiths, Introduction to Electrodynamics, 4th ed., Cambridge University
Press, 2017.
[3] Gilbert Strang and Edwin “Jed” Herman, Calculus, Volume 3, OpenStax, 2016,
chapters on vector fields and vector calculus.
[4] Massachusetts Institute of Technology, 18.02SC Multivariable Calculus, MIT
OpenCourseWare, materials on gradient, divergence, curl, flux, and line integrals.
[5] Samuel J. Ling, Jeff Sanny, and William Moebs, University Physics, Volume 2,
OpenStax, 2016, chapters on electric and magnetic fields and electromagnetic waves.
[6] Richard P. Feynman, Robert B. Leighton, and Matthew Sands, The Feynman Lectures
on Physics, Volume II, Addison-Wesley, 1964, chapters on vector electromagnetic fields
and Maxwell’s equations.