Vector fields, curl and divergence
A field assigns a vector to every point in space. Divergence measures whether there are sources and curl measures whether there is circulation: the two central questions of electromagnetism.
01A vector at every point
A vector field assigns a vector to every point in space. It is neither a curve nor a surface: it is a distribution. The wind on a map, the velocity of water in a river, the electric field around a charge and the magnetic field inside a transformer are vector fields.
The field lines are the curves tangent to the field at every point: they show “where something would go” if it were carried along by the field. They never cross —at a crossing there would be two directions— and their density indicates the intensity.
The most important field for electronics comes from differentiating: if V is the potential, then E = −∇V. A field like this, which is the gradient of something, is called conservative, and it has special properties that are seen in section 4.
02Divergence: are there sources?
- div F > 0: there is a source; the field originates there. A positive charge.
- div F < 0: there is a sink. A negative charge.
- div F = 0: a solenoidal field. Whatever goes in, comes out.
∇·E = ρ/ε₀: charges are the sources of the electric field.
∇·B = 0: the magnetic field has no sources, that is, monopoles do not exist. The
lines of B always close on themselves, and that is why a magnet cut in half gives two magnets.
03Curl: is there circulation?
In the plane, with F = (P, Q), only the z component survives: curl F = ∂Q/∂x − ∂P/∂y. A field with zero curl is called irrotational.
A field can have circular lines and zero curl everywhere except at the origin —this is the case of the field around a current-carrying wire, which decays as 1/ρ—, and conversely, a field of straight, parallel lines can have curl if its intensity changes from one side to the other. What matters is not the shape of the lines but the local circulation.
Tap a point of the field and the divergence and the curl are computed there, with a small wheel that spins if there is circulation.
04Conservative fields
A field is conservative if it comes from a potential: F = ∇f. Three equivalent properties, in a simply connected region —one without holes—:
There is a function f with F = ∇f.
∇ × F = 0 throughout the region.
The integral between two points does not depend on the path, and around a closed path it equals zero.
The electrostatic field is conservative, and that is why it makes sense to speak of potential and of voltage between two points without specifying which path. When there are time-varying magnetic fields it stops being so —∇×E = −∂B/∂t ≠ 0— and then the “voltage” between two points depends on the path: that is what causes an induced EMF to appear in a loop, and also what makes it harder to measure with the oscilloscope near a transformer.
The field of a current-carrying wire has zero curl at every point except the origin, and yet its circulation around the wire is not zero: it equals μ₀I. There is no contradiction: the region has a hole, it is not simply connected, and the theorem does not apply there. This is exactly Ampère’s law.
05The nabla operator and its combinations
∇ behaves like a vector of derivatives, and by combining it with the three operations —product by a scalar, dot product and cross product— the three operators of vector calculus appear:
| Operation | Input | Output | Meaning |
|---|---|---|---|
| ∇f · gradient | Scalar | Vector | Direction of maximum increase |
| ∇·F · divergence | Vector | Scalar | Sources and sinks |
| ∇×F · curl | Vector | Vector | Local circulation |
| ∇²f = ∇·∇f · Laplacian | Scalar | Scalar | How far a point departs from the average of its neighborhood |
Two identities worth memorizing, because they simplify long calculations: ∇·(∇×F) = 0 —the divergence of a curl is always zero— and ∇×(∇f) = 0 —the curl of a gradient is too—. The first is the mathematical reason why there are no magnetic monopoles if B is written as the curl of a vector potential.
The Laplacian appears in Laplace’s equation ∇²V = 0, which governs the potential in a region without charges, and in the wave equation, which governs propagation in a transmission line and in free space.
06In the lab
For F = (x²y, xy², 0), compute the divergence and the curl by hand and verify the results at two points with the lab in section 3, comparing with its numerical values.
With iron filings and a magnet, photograph the lines of B and verify that they close. Discuss why that implies ∇·B = 0.
Given F = (2xy, x² + 1), verify that it is conservative and find the potential function by integrating. Check that its gradient returns the original field.
07Common mistakes
- Confusing divergence with curl: one gives a scalar, the other a vector.
- Computing the curl without respecting the order of the determinant, and ending up with the sign flipped.
- Assuming that curved lines imply curl, or that straight lines imply zero curl.
- Applying “curl F = 0 ⟹ conservative” in a region with holes.
- Forgetting that ∇ is not an ordinary vector: it does not commute, because it differentiates whatever is to its right.
08Self-assessment
Compute the divergence of F = (x, y, z).
1 + 1 + 1 = 3: there is a source everywhere; it is the field of a uniform expansion.
Curl of F = (−y, x, 0).
∂Q/∂x − ∂P/∂y = 1 − (−1) = 2, in the k̂ direction: (0, 0, 2). It is a rigid rotation.
What does ∇·B = 0 say?
That magnetic monopoles do not exist: magnetic field lines close on themselves.
Is F = (y, x) conservative?
∂Q/∂x = 1 and ∂P/∂y = 1: the curl is zero, and the domain is the whole plane, so yes. Its potential is f = xy.
What is ∇·(∇×F)?
Zero, always, for any field with continuous derivatives.
Why does the electrostatic field allow us to speak of voltage between two points?
Because it is conservative: the work does not depend on the path, so the potential difference is well defined.
09Further reading
- Jerrold E. Marsden and Anthony J. Tromba. Vector Calculus. 5th ed. (Spanish edition, “Cálculo vectorial”), W. H. Freeman, 2003. The classic treatment of fields, divergence and curl with their physical interpretations.
- Murray R. Spiegel. Vector Analysis (Schaum’s Outline Series). 2nd ed. (Spanish edition, “Análisis vectorial”), McGraw-Hill, 2009. Hundreds of solved exercises with the nabla operator and its identities.
- Matthew N. O. Sadiku. Elements of Electromagnetics. Spanish edition, “Elementos de electromagnetismo,” 5th ed., Alfaomega, 2018. Explains vector calculus from the standpoint of electromagnetism: exactly the approach an electronics engineer needs.