Who Discovered the Relationship Between Electricity and Magnetism?

Hans Christian Ørsted, a Danish physicist, discovered the relationship between electricity and magnetism on April 21, 1820. During a lecture demonstration, he noticed that a compass needle deflected when he connected a wire to a battery, proving for the first time that an electric current produces a magnetic field. That single observation launched a cascade of discoveries by other scientists who, over the next five decades, revealed electricity and magnetism to be two faces of the same fundamental force.

Ørsted’s Compass Experiment

Ørsted had long suspected a connection between electricity and magnetism, and he came to his lecture prepared with both a battery and a compass. His battery was a voltaic pile using 20 copper rectangles, producing roughly 15 to 20 volts. When he connected the wire to both ends of the battery, the compass needle nearby shifted away from magnetic north. The deflection was so slight that his audience didn’t even notice it.

But Ørsted noticed. Over the following months, he ran a careful series of follow-up experiments. He tried different types of wire and consistently saw the needle move. When he reversed the direction of the current, the needle swung the opposite way. He placed wood and glass between the wire and the compass, and the effect persisted, meaning it wasn’t caused by air currents or any known mechanical force. By July 1820, he published his results in a short Latin pamphlet that circulated rapidly across Europe.

Ampère Built the Math Within Weeks

News of Ørsted’s experiment reached Paris quickly, and the French physicist André-Marie Ampère seized on it. On September 18, 1820, less than two months after Ørsted’s publication, Ampère presented his first paper to the French Academy of Sciences. Where Ørsted had shown that a current affects a magnet, Ampère went further: he demonstrated that two current-carrying wires also exert forces on each other. Parallel currents flowing in the same direction attract; opposite currents repel.

Between late 1820 and early 1821, Ampère laid down the core principles of what he called “electrodynamics,” the science of how electric currents interact. He spent the next several years refining these ideas, and in 1826 he published his definitive work, a treatise deriving the laws of electrodynamic interaction entirely from experiments. His mathematical framework became one of the building blocks that later physicists would use to fully unify electricity and magnetism.

Sturgeon’s Electromagnet Made It Practical

The discovery also had immediate practical consequences. In 1825, the English inventor William Sturgeon exhibited the first electromagnet: an iron core wrapped with wire that became magnetic only when current flowed through it. His prototype weighed just 7 ounces (200 grams) but could support 9 pounds (4 kilograms) of iron using the current from a single battery cell.

The American scientist Joseph Henry improved on Sturgeon’s design dramatically. By wrapping more layers of insulated wire around the core, Henry built an electromagnet by 1831 that could lift 750 pounds, over 35 times its own weight. By 1833, he had one lifting more than 3,300 pounds. These powerful electromagnets made the electric telegraph feasible. Samuel Morse consulted Henry while developing his telegraph in the late 1830s, and Henry later noted that it was only “since the discoveries in electro-magnetism” that long-distance electrical communication had become practicable.

Faraday Proved It Works Both Ways

Ørsted had shown that electricity creates magnetism. The missing half of the puzzle was whether magnetism could create electricity. Michael Faraday, working in London, spent years chasing this question and finally succeeded in 1831.

His key experiment used two coils of wire wound around opposite sides of a soft iron ring. The first coil was connected to a battery. A wire from the second coil ran to a compass needle placed about a meter away, far enough to avoid any direct influence from the first circuit. When Faraday switched the first circuit on, the compass needle near the second coil twitched momentarily, then returned to its resting position. When he switched the current off, the needle twitched again, this time in the opposite direction.

The critical insight was that a steady current in the first coil did nothing to the second. Only a changing magnetic field induced a current. Faraday went on to demonstrate that you could generate electricity by moving a magnet near a wire, by switching an electromagnet on and off, or even by moving a wire through the Earth’s own magnetic field. This principle of electromagnetic induction is the basis of every electric generator and transformer in use today.

Maxwell Unified Everything

By the mid-1800s, scientists had accumulated a rich collection of experimental laws connecting electricity and magnetism, but no single theory tied them together. James Clerk Maxwell, a Scottish physicist working between 1860 and 1871 at his family home and at King’s College London, provided that unification.

Maxwell took the experimental findings of Ørsted, Ampère, and Faraday and expressed them in a set of mathematical equations. He also identified something missing from Ampère’s law: a term now called the displacement current, which accounts for changing electric fields producing magnetic effects even in empty space. Adding this correction allowed Maxwell to derive a wave equation, and when he calculated the speed of that wave, it matched the known speed of light. His conclusion was striking: light itself is an electromagnetic wave.

Maxwell published his full theory in 1865 in a paper titled “A Dynamical Theory of the Electromagnetic Field.” The four equations that now bear his name (though he originally wrote them in a more complex form) describe how electric charges produce electric fields, how there are no isolated magnetic charges, how changing magnetic fields create electric fields, and how electric currents and changing electric fields create magnetic fields. Together, they show that electricity and magnetism are not separate phenomena but inseparable parts of a single electromagnetic field.

Why Electricity and Magnetism Are Really One Force

Modern physics offers an even deeper explanation for why these forces are linked. A stationary electric charge creates an electric field. But when that charge moves, it also creates a magnetic field. The magnetic force on a moving charged particle always acts perpendicular to the particle’s direction of travel, which is why magnets can steer charged particles in circles (as in particle accelerators) but can’t speed them up or slow them down.

Einstein’s special relativity revealed the ultimate connection. What looks like a pure magnetic field from one observer’s perspective looks partly like an electric field to an observer moving at a different speed. The two fields are not independent forces that happen to interact. They are the same force, viewed from different frames of reference. Maxwell’s equations, written decades before Einstein, already contained this symmetry. It took relativity to explain why.