Electromagnetism – from Ørsted’s compass needle to Maxwell’s equations

In 1800 electricity and magnetism were two separate curiosities: frictional electricity and lodestones. Within 65 years they had become a single theory that also explained light. Maxwell’s equations are the crown jewel of classical physics; they were already correct relativistically before Einstein realised it, and they underpin all of modern technology – from the generator to the mobile phone. It was a Dane who started it all.

Coulomb’s law and the electric field

In 1785 Charles-Augustin de Coulomb measured with a torsion balance that the force between two charges falls off as the square of the distance – just like Newton’s gravity:

$$F = \frac{1}{4\pi\varepsilon_0}\,\frac{q_1q_2}{r^2},\qquad \vec E = \frac{\vec F}{q}$$

But whereas gravity only attracts, charges can both attract and repel. Michael Faraday (see Faraday) – who knew no mathematics – thought in terms of lines of force filling the space around the charges. For Faraday the field was real, not just an aid to calculation. It turned out to be one of the deepest ideas in physics: today fields are fundamental, and particles are their quanta.

Try it: Field lines (blue) begin on positive charges and end on negative ones; the density of lines shows the field strength. The dashed curves are equipotentials – the field lines always cross them at right angles. With +2 and −1 half the lines go off to infinity. In the parallel-plate capacitor the field between the plates is almost uniform.

Gauss’s law

Coulomb’s law can be recast as a statement about flux: the total flux of electric field out through a closed surface is proportional to the enclosed charge. For the magnetic field the flux is always zero – there are no magnetic monopoles (none has ever been found):

$$\oint\vec E\cdot d\vec A = \frac{Q_{\text{enc}}}{\varepsilon_0}\quad\Leftrightarrow\quad\nabla\cdot\vec E = \frac{\rho}{\varepsilon_0},\qquad \nabla\cdot\vec B = 0$$

With Gauss’s law one can find in a single line the field of a charged sphere, an infinite wire ($E = \lambda/2\pi\varepsilon_0 r$) or an infinite plane ($E = \sigma/2\varepsilon_0$). It also explains why the field inside a conductor is zero – the principle of the Faraday cage, which protects a car from lightning.

Ørsted and Ampère: current makes magnetism

On 21 April 1820 – during a lecture, according to tradition – Hans Christian Ørsted in Copenhagen saw a compass needle turn when a current flowed in a nearby wire. His Latin note of 21 July 1820 went round the world within weeks. In Paris André-Marie Ampère heard of the experiment on 11 September, and a week later he showed that two current-carrying wires attract each other when the currents run the same way. Jean-Baptiste Biot and Félix Savart found the field of a wire, $B = \mu_0 I/2\pi r$. Ampère’s law reads:

$$\oint\vec B\cdot d\vec l = \mu_0 I_{\text{enc}}\quad\Leftrightarrow\quad\nabla\times\vec B = \mu_0\vec J$$

The force on a charge in both fields is the Lorentz force (see Lorentz), which steers electrons in a cathode-ray tube, protons in the LHC and particles in the aurora (see Aurora):

$$\vec F = q\left(\vec E + \vec v\times\vec B\right)$$

Magnetic field lines in 3D

Try it: The field lines are calculated numerically with the Biot–Savart law from the current in the copper wires (the gold arrow shows the direction of the current). Magnetic field lines have neither beginning nor end – they always close around the current, because $\nabla\cdot\vec B = 0$. A single loop gives a dipole field like a bar magnet; that is why Ampère proposed in 1820 that all magnetism is due to tiny current loops. In a long solenoid the field becomes almost uniform – the principle behind electromagnets and MRI scanners.

Faraday’s induction

If current gives magnetism, surely magnetism can give current? Faraday searched for ten years. On 29 August 1831 he discovered that it is not the magnetic field but the change in it that induces a voltage. In 1834 Heinrich Lenz added that the induced current always opposes the change:

$$\mathcal{E} = -\frac{d\Phi_B}{dt}\quad\Leftrightarrow\quad\nabla\times\vec E = -\frac{\partial\vec B}{\partial t}$$

The law of induction is the basis of the generator, the transformer, the electric motor, the induction hob and wireless charging. According to a (probably invented) anecdote, the Chancellor of the Exchequer Gladstone asked what use electricity could be. “Why, sir, there is every probability that you will soon be able to tax it,” Faraday replied.

Maxwell’s equations

In 1861–65 James Clerk Maxwell (see Maxwell) brought everything together in a single system. He discovered that Ampère’s law was inconsistent: for a capacitor being charged it gives different answers depending on which surface one chooses. The remedy was a new term, the displacement current $\varepsilon_0\,\partial\vec E/\partial t$: a changing electric field also produces a magnetic field. The equations then read – in Oliver Heaviside’s vector form of 1884:

$$\begin{aligned} \nabla\cdot\vec E &= \frac{\rho}{\varepsilon_0} &\qquad \nabla\times\vec E &= -\frac{\partial\vec B}{\partial t}\\[4pt] \nabla\cdot\vec B &= 0 &\qquad \nabla\times\vec B &= \mu_0\vec J + \mu_0\varepsilon_0\frac{\partial\vec E}{\partial t} \end{aligned}$$

Conservation of charge follows automatically from the last two: $\partial\rho/\partial t + \nabla\cdot\vec J = 0$. Richard Feynman wrote that, seen from ten thousand years hence, the most significant event of the 19th century will be Maxwell’s discovery of the laws of electrodynamics – and the American Civil War will pale into provincial insignificance beside it.

Electromagnetic waves

In empty space ($\rho = 0$, $\vec J = 0$) the fields can sustain each other: a changing $\vec B$ gives $\vec E$, a changing $\vec E$ gives $\vec B$. Taking the curl of Faraday’s law and inserting Ampère–Maxwell gives the wave equation

$$\nabla^2\vec E = \mu_0\varepsilon_0\,\frac{\partial^2\vec E}{\partial t^2},\qquad c = \frac{1}{\sqrt{\mu_0\varepsilon_0}} = 299\,792\,458\ \text{m/s}$$

Maxwell calculated the speed from laboratory measurements on capacitors and coils and got a figure close to Fizeau’s measurement of the speed of light. “We can scarcely avoid the inference that light consists in the transverse undulations of the same medium which is the cause of electric and magnetic phenomena,” he wrote in 1862. Heinrich Hertz produced and detected radio waves in Karlsruhe in 1887–88. The waves are transverse; $\vec E$, $\vec B$ and the direction of propagation are mutually perpendicular, and $E = cB$. The whole spectrum from radio to gamma rays is the same phenomenon (see The electromagnetic spectrum).

Try it: A plane electromagnetic wave: the electric field (gold) and the magnetic field (blue) oscillate in phase and at right angles to each other and to the direction of propagation. With circular polarisation the field vectors rotate – the sum of two linearly polarised waves a quarter of a period apart (see Polarisation).

Energy, momentum and the Poynting vector

The field contains energy with density $u = \tfrac12\varepsilon_0E^2 + \tfrac{1}{2\mu_0}B^2$. In 1884 John Henry Poynting showed that the energy flow per unit area is

$$\vec S = \frac{1}{\mu_0}\,\vec E\times\vec B,\qquad I = \langle S\rangle = \tfrac12 c\varepsilon_0E_0^2$$

Sunlight at the Earth has an intensity of about 1361 W/m², corresponding to a field amplitude of about 1000 V/m. Light also carries momentum $p = U/c$ and exerts a radiation pressure of about 4.5 µPa – enough to drive solar sails and to give comets their tails. An accelerated charge radiates; Larmor’s formula $P = q^2a^2/6\pi\varepsilon_0c^3$ (1897) explains antennas, synchrotron radiation – and why classical physics cannot explain the stability of atoms (see Quantum mechanics).

Alternating current and resonance

A circuit with a resistor $R$, an inductor $L$ and a capacitor $C$ is the electrical version of a damped spring: the energy oscillates between the electric field of the capacitor and the magnetic field of the coil at the resonant frequency

$$f_0 = \frac{1}{2\pi\sqrt{LC}},\qquad Z = \sqrt{R^2 + \left(\omega L - \frac{1}{\omega C}\right)^2},\qquad Q = \frac1R\sqrt{\frac LC}$$

This is how a radio is tuned to a station. In the 1890s Nikola Tesla and George Westinghouse won the “war of the currents” against Edison’s direct current, because alternating current can be transformed up to high voltage with low losses over long distances.

Try it: A series RLC circuit with L = 10 mH and C = 1 µF ($f_0$ ≈ 1592 Hz) driven by a 1 V source. At the top the current amplitude, below it the phase difference between current and voltage. A small resistance gives a sharp resonance with a high Q factor – the bandwidth is $f_0/Q$.

Fields in matter

In a material the atoms respond to the fields. In a dielectric the electron clouds are displaced and give a polarisation $\vec P$; in a magnetic material the magnetic moments of the atoms line up and give a magnetisation $\vec M$. One therefore introduces the auxiliary fields

$$\vec D = \varepsilon_0\vec E + \vec P = \varepsilon_r\varepsilon_0\vec E,\qquad \vec H = \frac{\vec B}{\mu_0} - \vec M,\qquad \nabla\cdot\vec D = \rho_{\text{free}},\quad \nabla\times\vec H = \vec J_{\text{free}} + \frac{\partial\vec D}{\partial t}$$

The speed of light in the material becomes $v = c/n$ with refractive index $n = \sqrt{\varepsilon_r\mu_r}$. Because $\varepsilon_r$ depends on frequency, one gets dispersion – the colours of the rainbow (see Optics). In a conductor the wave is damped over the skin depth $\delta = \sqrt{2/\mu\sigma\omega}$: for copper 9 mm at 50 Hz, but only 2 µm at 1 GHz. That is why household appliances use thick wires, while high-frequency cables need only a thin surface layer. Iron, nickel and cobalt are ferromagnetic; the cause is quantum-mechanical (see Properties of matter and the Ising model).

Potentials, gauge and relativity

The two homogeneous Maxwell equations are solved by potentials: $\vec B = \nabla\times\vec A$ and $\vec E = -\nabla\phi - \partial\vec A/\partial t$. The potentials are not unique – one can add the gradient of an arbitrary function to $\vec A$ (a gauge transformation) without changing the fields. In the 20th century this freedom became the key to the whole Standard Model of particle physics (see Particle physics and group theory). In 1959 Aharonov and Bohm showed that the potential has quantum-mechanical effects even where the fields are zero.

Maxwell’s equations are not invariant under Galilean transformations: they predict the same speed of light for everyone. Einstein took this seriously in 1905 in the paper “On the electrodynamics of moving bodies”, which begins with a magnet and a coil: only the relative motion matters, yet the classical description distinguishes between the two cases. In relativity $\vec E$ and $\vec B$ are two aspects of a single tensor $F^{\mu\nu}$, and Maxwell’s four equations become two (see Relativity):

$$\partial_\mu F^{\mu\nu} = \mu_0 J^\nu,\qquad \partial_{[\lambda}F_{\mu\nu]} = 0$$

The quantum theory of electromagnetism, quantum electrodynamics (QED), was formulated by Feynman, Schwinger, Tomonaga and Dyson around 1948. It predicts the magnetic moment of the electron to 12 significant figures – the most precisely tested theory in physics.

Further reading