Vector Fields, Gradient, Divergence & Curl
The three differential operators behind every law of electromagnetism
An electric field is not a single vector — it is a vector attached to every point in space. To describe how fields spread out from charges, curl around currents, and change from point to point, we need three differential operators: the gradient, the divergence, and the curl.
From Single Vectors to Vector Fields
In the previous lesson, we worked with individual vectors — fixed quantities with fixed components. But the electric field E is not a single vector. At every point in space, there is a different electric field vector with its own magnitude and direction. This is a vector field: a rule that assigns a vector to every point (x, y, z).
Similarly, the temperature in a room is a scalar field — a single number assigned to every point. The distinction is fundamental: scalar fields have magnitude only, while vector fields have magnitude and direction at each point. In electromagnetics, the electric potential V(x, y, z) is a scalar field, while the electric field E(x, y, z) and magnetic field B(x, y, z) are vector fields.
To relate these fields to one another — and to the charges and currents that produce them — we need differential operators that can detect how fields change from point to point. There are exactly three such operators that matter for EM: the gradient, the divergence, and the curl.
A vector is a single arrow. A vector field is an entire space full of arrows — one at every point. When we write E = Exx̂ + Eyŷ + Ezẑ in the context of a field, the components Ex, Ey, Ez are functions of position (x, y, z), not constants.
The Gradient: Direction of Steepest Increase
The gradient operates on a scalar field f(x, y, z) and produces a vector field ∇f. At each point, ∇f points in the direction of the steepest increase of f, and its magnitude equals the rate of increase in that direction. In Cartesian coordinates, ∇f = (∂f/∂x)x̂ + (∂f/∂y)ŷ + (∂f/∂z)ẑ.
The symbol ∇ (called 'del' or 'nabla') is a vector differential operator. When it acts on a scalar, it produces a vector. In electromagnetics, the gradient connects the scalar potential V to the electric field: E = −∇V. The electric field points in the direction of steepest decrease of potential (hence the minus sign) — a positive charge rolls 'downhill' in the potential landscape.
- Compute each partial derivative: ∂f/∂x = 2x, ∂f/∂y = 2y, ∂f/∂z = 2z.
- Write the gradient: ∇f = 2x x̂ + 2y ŷ + 2z ẑ.
- Evaluate at (1, 2, 3): ∇f = 2(1)x̂ + 2(2)ŷ + 2(3)ẑ = 2x̂ + 4ŷ + 6ẑ.
- Compute the magnitude: |∇f| = √(2² + 4² + 6²) = √(4 + 16 + 36) = √56 ≈ 7.483.
The function f = x² + y² + z² is the squared distance from the origin, so its gradient points radially outward everywhere — away from the origin, in the direction of increasing distance. This is the same structure as the electric field of a point charge, which also points radially. The connection is not coincidental: the potential of a point charge is proportional to 1/r, and E = −∇V.
The Divergence: Measuring Outward Flux
The divergence operates on a vector field F and produces a scalar field ∇·F. At each point, it measures how much the field 'spreads out' from (or flows into) that point — the net outward flux per unit volume. In Cartesian coordinates, ∇·F = ∂Fx/∂x + ∂Fy/∂y + ∂Fz/∂z.
If ∇·F > 0 at a point, that point is a source — the field flows outward. If ∇·F < 0, it is a sink. If ∇·F = 0 everywhere, the field is divergence-free (solenoidal). In EM, this is the heart of Gauss's law: ∇·E = ρ/ε₀, which says charge density ρ is the source of the electric field. The magnetic field, by contrast, is always divergence-free: ∇·B = 0, reflecting that there are no magnetic monopoles.
The notation ∇·F is literally the dot product of the del operator with the vector field. That is why the result is a scalar, just as any dot product yields a scalar.
The Curl: Measuring Circulation
The curl operates on a vector field F and produces another vector field ∇×F. At each point, the curl measures how much the field 'circulates' around that point — its direction is the axis of rotation (right-hand rule) and its magnitude is the strength of circulation. In Cartesian coordinates, the curl is computed as a determinant, just like the cross product.
If ∇×F = 0 everywhere, the field is irrotational. In EM, the curl is central to both Ampere's law (∇×B = μ₀J, linking circulating magnetic fields to currents) and Faraday's law (∇×E = −∂B/∂t, linking circulating electric fields to changing magnetic fields). The curl is what makes electromagnetic induction mathematically precise.
Just as the cross product has a minus sign on the middle (ŷ) term, so does the curl. The pattern is +, −, + for the x̂, ŷ, ẑ components — always verify the middle term.
Gauss's law uses divergence (∇·E = ρ/ε₀). Gauss's law for magnetism uses divergence (∇·B = 0). Faraday's law uses curl (∇×E = −∂B/∂t). Ampere's law uses curl (∇×B = μ₀J + μ₀ε₀∂E/∂t). The gradient connects potential to field (E = −∇V). Master these three operators, and the mathematical content of Maxwell's equations is already in your hands.
- Compute each partial derivative: ∂Fx/∂x = 2x, ∂Fy/∂y = 2y, ∂Fz/∂z = 2z.
- Sum them: ∇ · F = 2x + 2y + 2z.
- Evaluate at (1, 1, 1): ∇ · F = 2(1) + 2(1) + 2(1) = 6.
Check your understanding
- A vector field assigns a vector to every point in space; the electric field E and magnetic field B are the primary vector fields in EM, while the electric potential V is a scalar field.
- The gradient ∇f = (∂f/∂x)x̂ + (∂f/∂y)ŷ + (∂f/∂z)ẑ turns a scalar field into a vector field pointing in the direction of steepest increase; in EM, E = −∇V.
- The divergence ∇ · F = ∂Fx/∂x + ∂Fy/∂y + ∂Fz/∂z measures outward flux per unit volume; it is positive at sources and negative at sinks, and appears in Gauss's law (∇ · E = ρ/ε₀).
- The curl ∇ × F measures local circulation and appears in Faraday's law (∇ × E = −∂B/∂t) and Ampere's law (∇ × B = μ₀J); together with the gradient and divergence, it completes the vocabulary of Maxwell's equations.