On this page
Most of us learn early on that magnets stick to refrigerators and that a compass points to the Earth's magnetic North. But what happens when you bring a compass near an electric circuit? This very question led to one of the most important discoveries in physics, merging electricity and magnetism into a single field of study.
Why does a compass needle deflect near a current-carrying wire?
A compass needle is a tiny, lightweight bar magnet balanced on a pivot. It naturally aligns itself with the Earth's magnetic field. However, when you bring it near a wire that has an electric current flowing through it, the needle turns away from North.
In 1820, Hans Christian Ørsted discovered that an electric current generates a magnetic field (1). His experiment showed that a compass needle placed near a current-carrying wire deflects to align perpendicular to the wire. This happens because the magnetic field produced by the current exerts a force on the tiny magnet in the compass, overpowering the much weaker magnetic field of the Earth.
How can you recreate Oersted's experiment?
You can easily see this effect with a simple classroom or at-home activity. You will need a thick copper wire, a small compass, a battery, and a switch.
Set up the wire: Connect the ends of the thick copper wire to the battery and switch, leaving the switch open so no current flows yet.
Align the compass: Place the compass flat on the table and let the needle settle toward the Earth's North.
Position the wire: Hold the straight section of the copper wire directly over the compass and parallel to the needle.
Close the circuit: Turn the switch on. You will immediately see the compass needle deflect sharply to one side.
For more hands-on science activities, you can explore other classic experiments, such as Tracing a ray through a glass slab: the Class 10 practical or Dispersion of white light by a glass prism, explained for Class 10.
What happens to the compass needle when the current is reversed?
If you swap the connections on your battery so that the current flows in the opposite direction, the behavior of the magnetic field changes completely. When the current is reversed, the direction of the magnetic field also reverses, causing the compass needle to deflect in the opposite direction (1).
For example, if the current is flowing from South to North in a wire held over the compass, the North pole of the needle will deflect toward the West. If you reverse the current so it flows from North to South, the needle will instead deflect toward the East. This proves that the magnetic field's orientation is strictly dependent on the direction of the moving electrical charges.
How do you find the direction of the magnetic field?
To predict exactly which way the needle will point, physicists use a simple mnemonic. Ampère's right-hand grip rule states that if you point your right thumb in the direction of the conventional current, your curled fingers will point in the direction of the magnetic field lines (2).
Because the field lines form circles around the wire, the field underneath the wire points in the opposite direction to the field above the wire. This means that moving the compass from below the wire to above it will also reverse the direction of the deflection.
If you are reviewing this for an exam, the Fermi Concept Library has every concept in physics, chemistry, biology, mathematics and computing, each with its own lesson and its place in the map. For ideas like magnetic fields that are easier to see than to read, the Fermi Simulation Lab provides interactive simulations to help you visualize the forces at work.



