>
section 2 of 106 min read

2. Magnetostatics and Time-Varying Fields

Electrostatics is the world of stationary charges. Magnetism is what charges do when they move. Together they become electromagnetism, and the bridge between them is what makes radio possible.

2.1 Biot-Savart law

A current element IdlI\,d\vec{l} at position r\vec{r}\,' creates a tiny magnetic field at observation point r\vec{r}:

dB=μ04πIdl×(rr)rr3d\vec{B} = \frac{\mu_0}{4\pi}\frac{I\,d\vec{l}\times(\vec{r} - \vec{r}\,')}{|\vec{r} - \vec{r}\,'|^3}

The cross product gives the field direction: thumb along the current, fingers curl in the direction of B\vec{B}. The constant μ0=4π×107\mu_0 = 4\pi\times 10^{-7} H/m is the permeability of free space, the magnetic counterpart of ε0\varepsilon_0.

The Biot-Savart integral lets you compute the field of any current distribution, just as Coulomb's law (integrated) lets you compute the field of any charge distribution. In practice we use it for awkward geometries; for symmetric ones we reach for Ampere's law.

2.2 Ampere's law

The magnetic counterpart of Gauss's law:

CHdl=Ienclosed\oint_C \vec{H}\cdot d\vec{l} = I_{enclosed}

Add up the magnetic field component along any closed loop and you get the total current piercing that loop. Useful symmetric examples:

  • Long straight wire (radius 0\to 0, current II): H=I/(2πρ)H = I/(2\pi\rho) at distance ρ\rho.
  • Solenoid (turns per unit length nn, current II): inside, H=nIH = nI, outside, H0H \approx 0.
  • Toroid (mean radius rr, NN turns): inside the toroid, H=NI/(2πr)H = NI/(2\pi r).

The relation B=μH\vec{B} = \mu\vec{H} uses the permeability μ=μ0μr\mu = \mu_0\mu_r, with μr\mu_r the relative permeability of the material. Air has μr1\mu_r \approx 1. Iron, around 1000. Mu-metal (used to shield magnetically sensitive instruments and TEMPEST-resistant rooms), tens of thousands. The high μr\mu_r of iron is the reason transformer cores are iron: the field is funneled and contained, drastically increasing inductance and coupling.

2.3 The magnetostatic Maxwell equations

Two of Maxwell's four equations are the magnetic equivalents of what we just used.

  • B=0\nabla\cdot\vec{B} = 0. There are no magnetic monopoles. Magnetic field lines have no beginning or end; they always close on themselves into loops.
  • ×H=J\nabla\times\vec{H} = \vec{J}. Currents create circulating H\vec{H} fields.

The first of these is the deepest. We have never observed a magnetic monopole. Every magnet has a north and a south, and breaking a magnet in two gives you two smaller magnets, not a north and a south by themselves.

2.4 Lorentz force

A charge moving with velocity v\vec{v} through electric and magnetic fields experiences

F=q(E+v×B)\vec{F} = q(\vec{E} + \vec{v}\times\vec{B})

This single law makes:

  • Hall sensors work. Current passes through a thin slab in a perpendicular magnetic field; the Lorentz force on the moving carriers pushes them sideways, producing a voltage across the slab proportional to BB. Used in everything from ABS wheel-speed sensors to DC current probes.
  • Cathode-ray tube and old-school oscilloscope deflection plates work.
  • Mass spectrometers separate ions of different mass-to-charge ratios.
  • Cyclotrons accelerate particles in spirals.

2.5 Inductance and stored magnetic energy

Self-inductance LL relates the flux through a coil to the current driving it: Φ=LI\Phi = L I. The energy stored in the resulting field is

WM=12LI2W_M = \tfrac{1}{2}LI^2

with energy density

wM=12μH2=12BHw_M = \tfrac{1}{2}\mu H^2 = \tfrac{1}{2}\vec{B}\cdot\vec{H}

Both wEw_E and wMw_M have the same form, 12DE\tfrac{1}{2}\vec{D}\cdot\vec{E} and 12BH\tfrac{1}{2}\vec{B}\cdot\vec{H}. The symmetry is real and runs through everything that follows.

2.6 Faraday's law: changing fields beget electric fields

A time-varying magnetic flux through a loop induces an EMF around that loop:

CEdl=dΦBdt\oint_C \vec{E}\cdot d\vec{l} = -\frac{d\Phi_B}{dt}

In differential form,

×E=Bt\nabla\times\vec{E} = -\frac{\partial\vec{B}}{\partial t}

The minus sign is Lenz's law: the induced EMF tries to oppose the change in flux. Push a magnet into a coil, the induced current creates a field opposing your push, and you feel a drag force. This is how generators, transformers, induction cooktops, wireless chargers, and eddy-current brakes all work.

It is also how a near-field EM probe steals secrets. Hold a small loop antenna near a chip, and any time-varying magnetic field from the chip's switching currents induces a voltage across the loop. That voltage, sampled by an oscilloscope, is a direct readout of the chip's switching activity, often correlated tightly with the data being processed. This is the workhorse measurement of side-channel and TEMPEST attacks, and Faraday is the physics behind it.

2.7 Displacement current: Maxwell's masterpiece

The original Ampere's law, ×H=J\nabla\times\vec{H} = \vec{J}, is incomplete. Imagine a capacitor charging up. Current flows into one plate from the wire, but no continuous current flows between the plates. If you draw an Amperian loop around the wire, Ienclosed=II_{enclosed} = I. If you draw the same loop around the gap between the plates, Ienclosed=0I_{enclosed} = 0. Same loop, two answers. Something is wrong.

Maxwell's fix was to recognize that the changing electric field between the plates plays the role of a current. He defined the displacement current density

Jd=Dt\vec{J}_d = \frac{\partial\vec{D}}{\partial t}

and updated Ampere's law:

×H=J+Dt\nabla\times\vec{H} = \vec{J} + \frac{\partial\vec{D}}{\partial t}

This addition was not just a bookkeeping fix. It introduced the symmetry between E\vec{E} and B\vec{B} that makes electromagnetic waves possible. A changing B\vec{B} creates E\vec{E} (Faraday). A changing E\vec{E} creates B\vec{B} (displacement current). Each begets the other; a self-sustaining wave can propagate through empty space without any wires or charges to support it. Light itself is one such wave. Maxwell predicted this in 1861, and Hertz confirmed it in 1887 with the first deliberate generation and detection of radio waves.

2.8 The four Maxwell equations

Putting it all together, in differential form:

D=ρ\nabla\cdot\vec{D} = \rho B=0\nabla\cdot\vec{B} = 0 ×E=Bt\nabla\times\vec{E} = -\frac{\partial\vec{B}}{\partial t} ×H=J+Dt\nabla\times\vec{H} = \vec{J} + \frac{\partial\vec{D}}{\partial t}

In integral form:

DdA=Qenc\oint\vec{D}\cdot d\vec{A} = Q_{enc} BdA=0\oint\vec{B}\cdot d\vec{A} = 0 Edl=ddtBdA\oint\vec{E}\cdot d\vec{l} = -\frac{d}{dt}\int\vec{B}\cdot d\vec{A} Hdl=Ienc+ddtDdA\oint\vec{H}\cdot d\vec{l} = I_{enc} + \frac{d}{dt}\int\vec{D}\cdot d\vec{A}

Memorize these. Tape them above your desk. Every other equation in the rest of this chapter, and most of the rest of this curriculum's RF and high-speed-digital content, is a consequence of these four lines.

2.9 Boundary conditions at material interfaces

When a wave hits a boundary between two media (free space to PCB substrate, dielectric to conductor, etc.), Maxwell's equations applied to a thin pillbox or a small loop straddling the interface yield four matching rules:

  • Tangential E\vec{E} is continuous across the boundary.
  • Normal D\vec{D} has a jump equal to the surface charge density ρs\rho_s.
  • Tangential H\vec{H} has a jump equal to the surface current density K\vec{K} (zero for non-conductors).
  • Normal B\vec{B} is continuous across the boundary.

These conditions are what determine reflection coefficients, refraction angles, and the modes of waveguides. Without them, you cannot solve a single waveguide problem, antenna problem, or PCB stack-up problem properly.

2.10 The vector and scalar magnetic potentials

For some problems it is useful to introduce a magnetic vector potential A\vec{A} defined by B=×A\vec{B} = \nabla\times\vec{A}. The condition B=0\nabla\cdot\vec{B} = 0 is automatically satisfied by this definition. In current-free regions, you can also write H=Vm\vec{H} = -\nabla V_m where VmV_m is a scalar magnetic potential, useful in some magnetic-circuit problems. We will not use either heavily, but you will see them in advanced texts and in antenna analysis (Chapter 13).