Magnetism — Full Explainer

How Magnetism Works

Magnetism is a fundamental force of nature that allows certain materials to attract or repel one another without physical contact, acting through an invisible field that extends through space. This phenomenon arises from the motion of el…

MECHANISM 1 OF 5
SPIN
Every spinning electron acts like a microscopic magnet with its own field.

Deep within every atom, electrons behave like tiny spinning tops, and this spin creates a miniature magnetic field around each one. This isn't just a metaphor—the electron's intrinsic angular momentum generates a real magnetic dipole, with its own north and south pole. In most materials, electrons pair up with opposite spins, canceling out each other's magnetic effects like two bar magnets placed end-to-end in opposite directions.

However, in magnetic materials like iron, cobalt, and nickel, some electrons remain unpaired. These unpaired electrons all spin in the same direction, and their individual magnetic fields add together rather than cancel out. A single iron atom might have four unpaired electrons all spinning the same way, creating a combined magnetic field thousands of times stronger than a single electron could produce alone.

The orbital motion of electrons circling the nucleus also contributes to magnetism, though usually less significantly than spin. Think of each orbiting electron as a tiny loop of electric current—and any current loop generates a magnetic field. The combination of electron spin and orbital motion determines the total magnetic moment of each atom, which becomes the building block for all magnetic behavior in materials.

MECHANISM 2 OF 5
ALIGN
Billions of atomic magnets organize into coordinated regions called magnetic domains.

Even in naturally magnetic materials, individual atomic magnets don't automatically line up throughout the entire object. Instead, they organize into small regions called magnetic domains, typically containing trillions of atoms all pointing their magnetic fields in the same direction. Within each domain, the atomic magnets are perfectly aligned, creating a strong collective field—but neighboring domains often point in different directions, effectively canceling each other out.

This domain structure exists because it minimizes the material's overall energy. Imagine trying to hold two strong bar magnets with their north poles facing each other—they resist forcefully because this configuration has high magnetic energy. Similarly, atoms arrange themselves into multiple domains with different orientations to reduce the energy stored in their magnetic fields. The boundaries between domains, called domain walls, are narrow transition zones where the magnetic orientation gradually rotates from one direction to another.

When you magnetize a piece of iron by stroking it with a magnet, you're forcing domains aligned with the external field to grow at the expense of others. The domain walls move, allowing favorably oriented domains to expand and consume misaligned ones. Once most domains point the same direction, the iron becomes a magnet itself. Without this domain structure, every piece of iron would be permanently magnetized, and your refrigerator door would attract every metal object in your kitchen.

MECHANISM 3 OF 5
GENERATE
Electric charges in motion always create magnetic fields around their path.

Whenever electric charge moves, it generates a magnetic field in the space surrounding it. This fundamental principle connects electricity and magnetism into a unified phenomenon called electromagnetism. A single electron drifting through a wire creates a circular magnetic field around the wire's length, with the field lines forming concentric rings perpendicular to the current's direction. The faster the charges move or the more charges flow together, the stronger the resulting magnetic field becomes.

This explains why electromagnets work so effectively. Wrap a wire into a coil and run current through it, and you've created a solenoid—a device where the circular magnetic fields from each loop of wire combine and concentrate through the coil's center. The magnetic field inside a solenoid looks remarkably similar to that of a bar magnet, with field lines running through the middle and looping back around the outside. Add an iron core inside the coil, and the metal's domains align with the electromagnet's field, amplifying it by factors of hundreds or thousands.

The Earth's magnetic field itself arises from this principle. Deep in the planet's liquid iron outer core, convection currents driven by heat cause enormous flows of electrically conducting material. These moving charges—essentially a planetary-scale electric current—generate the magnetic field that protects us from solar wind and allows compasses to work. The process is complex and chaotic, which explains why Earth's magnetic poles slowly wander and occasionally flip completely.

MECHANISM 4 OF 5
ATTRACT
North and south poles pull toward each other with increasing force.

Magnetic poles always come in pairs—north and south—and opposite poles attract with a force that grows stronger as they approach. Bring the north pole of one magnet near the south pole of another, and you'll feel them pull together with surprising strength. This attraction happens because magnetic field lines want to form complete loops: they emerge from north poles, curve through space, and return to south poles. When opposite poles face each other, field lines can form shorter, more direct paths between them, creating a lower-energy configuration that nature favors.

The attractive force follows an inverse square law—double the distance between opposite poles, and the force drops to one-quarter its original strength. This rapid falloff with distance explains why magnets need to be quite close to pick up paper clips but don't attract objects across the room. At the microscopic level, the north pole of your refrigerator magnet attracts the south poles of tiny magnetic domains in the metal door, causing those domains to rotate and align with the magnet's field.

This attraction enables countless practical applications. Electric motors rely on the pull between electromagnets and permanent magnets to convert electrical energy into rotational motion. Magnetic resonance imaging machines use powerful magnetic fields to align hydrogen atoms in your body, then detect their response to radio waves. Even the humble magnetic clasp on your jewelry box depends on the reliable attraction between carefully oriented opposite poles to keep your valuables secure.

MECHANISM 5 OF 5
REPEL
Identical poles push away from each other with powerful resistance.

When you try to push two north poles together—or two south poles—you encounter an invisible but very real resistance. The magnets repel each other with a force that intensifies rapidly as you force them closer. This repulsion occurs because magnetic field lines never cross and always resist being compressed into smaller spaces. When like poles face each other, their field lines emerge from both poles and push against each other, unable to merge or form efficient loops, creating a high-energy configuration that the system actively resists.

You can feel this repulsion directly with two strong magnets. Hold them with like poles facing and try to press them together—they'll slip sideways and spin around, attempting to flip into an attractive orientation. The force can be strong enough to make the magnets jump out of your hands. This same repulsive force follows the inverse square law, becoming four times stronger when the distance is cut in half, which is why the last millimeter of compression requires dramatically more force than the first centimeter.

Magnetic repulsion has enabled remarkable technologies. Maglev trains float above their tracks using powerful electromagnets with like poles facing, eliminating friction and allowing speeds exceeding 300 miles per hour. Magnetic bearings use repulsion to suspend rotating shafts without physical contact, preventing wear in high-speed machinery. Even simple toys demonstrate the principle—magnetic levitation kits use stacked ring magnets with like poles facing to create floating platforms that seem to defy gravity, held aloft by nothing but the persistent repulsion between identical poles.

Latest Discoveries in Magnetism
Why Magnetism Matters
Magnetism Real-World Impact
Medical Imaging
Seeing inside the human body
MRI machines use powerful magnets to create detailed images of organs and tissues without radiation.
Electric Motors
Powering modern transportation and industry
Magnetic fields convert electrical energy into motion in everything from electric cars to factory equipment.
Data Storage
Storing the world's digital information
Hard drives use magnetism to encode and preserve billions of bits of data reliably.
Power Generation
Generating electricity for billions daily
Spinning magnets in generators convert mechanical energy into the electrical power that runs civilization.
Concept Galaxy
Magnetism
Electromagnetism Magnetic fields Ferromagnetism Electric motors Magnetic resonance imaging Data storage Quantum mechanics Materials science Solid-state physics
Directly Related Applications Cross-Disciplinary
Continue Learning
Foundations Path
1Magnetism 2Electromagnetism 3Maxwell's equations 4Electromagnetic induction 5Electromagnetic waves
Applications Path
1Magnetism 2Electric motors 3Transformers 4Magnetic resonance imaging 5Particle accelerators