When Sir James Jeans proclaimed “God is a pure mathematician!” he was referring to the fact that most basic processes of nature obey elegant mathematical relationships. Science is so successful because theorists can use mathematics to make a prediction experimenters can test.

Mathematics has been used to predict the existence of the planet Neptune, radio waves, antimatter, neutrinos, black holes, gravitational waves and the Higgs boson, to give but a few examples.

Sometimes the predictions are breathtakingly precise. Probably the most successful example of the power of physical theory concerns the curious case of the spinning electron.

Long ago Michael Faraday found that moving electric charges generate magnetic fields; an electric current flowing around a coil of wire is the basis of the electric motor. Even a static electron has a magnetic field, on account of the fact that all electrons spin. Every electron has an identical quantity of spin, as it does of charge. This intrinsic rotation serves to turn the particle into a tiny magnet.

Naturally physicists want to know how strong a magnet it is. If the electron is treated as a miniscule rotating ball, the calculation is easy. But the answer is only half of what experimenters measure.

The discrepancy is explained by the intrinsic spin not behaving like an ordinary rotation. To illustrate the difference, imagine a cosmic magician turning the Earth upside down. A further 180-degree turn would restore normality. One 360- degree turn returns it to its initial state.

So far, so obvious. Trouble is, if you rotate an electron through 360 degrees it does not come back to its initial state. Instead you have to rotate it through 720 degrees. Experimental physicists can readily perform such a double rotation to check. Going round in circles thus takes on a whole new meaning for electrons. Because of its weird double-take on the surrounding world, the strength of an electron’s magnetism is likewise doubled.

Nature doesn’t just fill the vacuum of space with virtual particles.

All this was worked out in the late 1920s, and is elegantly described by a simple equation emblazoned on a stone in Westminster Abbey that commemorates the work of theoretical physicist Paul Dirac. He derived the peculiar geometrical properties of electron spin by combining quantum theory and relativity.

There the matter might have rested but for the problem the factor 2 is still not quite right. Careful measurement reveals an electron’s magnetic field to be about 0.1% greater than Dirac’s equation predicts. Resolving this discrepancy is a triumph of modern theoretical physics.

When electrons move, they emit photons. To describe this process requires quantum mechanics, the physics of the microworld, whose arcane rules permit an electron to emit photons into the great wide world, but also allow it to emit and then quickly reabsorb the same photon. Photons that enjoy only a fleeting existence before being snatched back are called ‘virtual’, to distinguish them from ‘real’ photons that fly off into the yonder.

According to this quantum description, all electrons are enveloped in a cloud of virtual photons. This virtual photon cloud leads to real physical effects, albeit small ones, including slightly altering the electron’s magnetic field.

Calculating by how much is fiendishly difficult. The first attempt was made by Julian Schwinger in 1948, who found there should be a correction to the factor 2 of α/π, where α is the so-called fine-structure constant – another deep number that occurs in nature. This has a value of about 0.0023228, which went a long way to resolving the mismatch of theory and experiment.

Schwinger’s formula was engraved on his tombstone. But by the time he died in 1994 experimenters and theorists were in a race to calculate and measure the magnetic field of the electron to ever-greater accuracy. Schwinger’s calculation was a first approximation. To improve on it meant considering not only virtual photons surrounding the electron but virtual electrons too, forming a seething ferment of particles popping into and out of existence. The calculational effort to factor in these processes is immense. Nevertheless, theory and experiment now agree to about one part per trillion, representing the most successful test of a physical theory in history.

Aristotle said that nature abhors a vacuum. He was right. Nature not only fills the vacuum of space with clouds of virtual particles; it embellishes the properties of electrons with minute adjustments that might forever have gone unnoticed were it not for physicists’ faith in the power of mathematics to describe the world in ever-finer detail.