Portrait of Hans Christian Ørsted
Public domain, via Wikimedia Commons

Classics

Oersted's Compass and the Birth of Electromagnetism

A simple experiment in 1820 revealed a profound connection between electricity and magnetism, paving the way for modern technology.

Ørsted's compass needle swings as current flows through a nearby wire.
Ørsted's compass needle swings as current flows through a nearby wire.

Imagine holding a simple compass. Its needle reliably points north, guided by the Earth’s magnetism. Now, picture placing that compass near a seemingly unrelated object: a metal wire. Under normal conditions, the compass ignores the wire completely. But what if a flow of electricity suddenly moves through that wire? In 1820, a Danish physicist watched a compass needle twitch and turn near just such a wire. This small movement revealed a fundamental link between two forces of nature once thought to be strangers.

For centuries, scientists had studied electricity and magnetism as entirely separate phenomena. Electricity was the force behind lightning, static shocks, and the chemical reactions in the recently invented battery. Magnetism was the mysterious influence that guided compasses and caused certain stones to attract iron. There was no obvious reason to think they were connected.

Yet, some thinkers were guided by a deep philosophical belief in the unity of nature. They suspected that all the fundamental forces, like electricity, magnetism, heat, and light, were just different manifestations of a single, underlying power. The Danish physicist Hans Christian Oersted (1777-1851) was a prominent advocate of this view. He had long searched for a way to prove a connection between electricity and magnetism, convinced that if a current could produce heat and light, it must also be able to produce a magnetic effect.

In April 1820, during a lecture for his students, Oersted had his chance. He set up a simple circuit using a powerful battery of the time, known as a voltaic pile, and connected it with a wire. He placed a compass nearby. When he completed the circuit, allowing an electric currentElectric currentA flow of electric charge, usually electrons moving through a wire. It is what powers and connects almost every electrical device. full glossary entry (a flow of electric charge) to pass through the wire, the compass needle immediately deflected. It turned away from its usual north-pointing direction. This was the connection he had been seeking. The electricity was clearly exerting a force on the magnet.

But the effect was strange. The needle did not point directly toward or away from the wire. To understand the shape of this new influence, Oersted spent the next few months experimenting. He methodically moved the compass to different positions all around the current-carrying wire. He discovered a consistent and beautiful pattern: the needle always tried to align itself tangentially, as if tracing a circle with the wire at its center. This revealed that the current was generating a circular magnetic fieldMagnetic fieldThe region around a magnet or an electric current where magnetic forces act. It is what turns a compass needle and what links electricity to magnetism. full glossary entry that wrapped around the wire.

Oersted published his findings in a short Latin pamphlet in July 1820. The news spread rapidly, and scientists across Europe immediately recognized its importance. The discovery opened an entirely new field of study: electromagnetism.

This single observation was a pivotal moment in physics. It directly inspired others, like André-Marie Ampère, who quickly developed the mathematical laws describing the forces between currents. Michael Faraday then showed that the relationship worked both ways: a changing magnetic field could produce an electric current, leading to the invention of the electric generator. Decades later, James Clerk Maxwell would unify these discoveries into a complete theory of electromagnetism, which also described light itself as an electromagnetic wave.

Today, Oersted’s discovery is the principle behind countless technologies. Every electric motor, generator, and transformer relies on the relationship he first observed. From the spinning of a hard drive to the operation of a city’s power grid, the twitching compass needle of 1820 set in motion the understanding that powers our modern world.