What Causes Some Materials to Have Magnetic Fields?

Some materials have magnetic fields because their atoms contain electrons that spin and orbit in ways that produce tiny magnetic forces, and those atoms cooperate with each other to align in the same direction. This cooperation is the key distinction. Every atom generates a small magnetic effect, but in most materials those effects cancel out. Only in a select group of materials do the atomic magnets line up and reinforce each other, creating a field you can feel with a refrigerator magnet or a compass needle.

How Electrons Create Magnetism

Magnetism starts at the atomic level with electrons doing two things at once. First, each electron spins on its own axis, generating a tiny magnetic field called a spin magnetic moment. Second, each electron orbits the nucleus, creating a separate orbital magnetic moment. The combination of these two motions determines how magnetic an individual atom is.

What matters most is whether those electron contributions cancel out or add up. Electrons fill atomic orbitals in pairs, and two paired electrons spin in opposite directions, neutralizing each other’s magnetism. When an atom has unpaired electrons in partially filled orbitals, though, the leftover spin creates a net magnetic moment. The more unpaired electrons, the stronger the atomic magnet. This is why iron, with four unpaired electrons in its outer shell, is far more magnetic than most other elements.

Why Most Materials Aren’t Magnetic

All matter responds to magnetic fields in some way, but the response is usually so faint you’d never notice it. Materials fall into a few broad categories based on how their electrons are arranged.

Diamagnetic materials, like copper, silver, gold, and water, have atoms where every orbital is filled and every electron is paired. There are no leftover magnetic moments. When you bring a magnet near copper, the electrons shift slightly in their orbits and actually produce a tiny repelling force, but it’s so weak it takes sensitive lab equipment to detect.

Paramagnetic materials, like aluminum, platinum, and oxygen, do have unpaired electrons, so their atoms carry small magnetic moments. But these atoms don’t communicate with their neighbors. Each atomic magnet points in a random direction, and the randomness means the material has no net field of its own. Hold a strong magnet next to a piece of aluminum and the atomic magnets will partially align with it, creating a very weak attraction. Remove the magnet and the alignment vanishes instantly as thermal energy jostles the atoms back into disorder.

What Makes Ferromagnetic Materials Special

The materials that actually produce noticeable magnetic fields, like iron, cobalt, and nickel, belong to a category called ferromagnets. They have unpaired electrons just like paramagnetic materials, but they also have something extra: a quantum mechanical interaction between neighboring atoms that forces their magnetic moments to align in the same direction. This long-range cooperation is what separates a paperclip from a piece of aluminum foil.

In ferromagnetic materials, atoms don’t just respond individually to outside fields. They influence each other, locking into parallel alignment across regions containing billions of atoms. This collective behavior produces a magnetic field strong enough to stick to your refrigerator or pick up nails.

Magnetic Domains and Why Iron Isn’t Always Magnetic

If neighboring atoms in iron all want to align with each other, you might expect every piece of iron to act like a permanent magnet. It doesn’t, and the reason is that the material splits itself into regions called magnetic domains.

Each domain is a patch of atoms all magnetized in the same direction, typically along one of the crystal’s preferred axes. But adjacent domains point in different directions. The material does this to minimize its own stored energy: if all the domains pointed the same way, the resulting field would create a large energy cost at the material’s surface. By breaking into domains that point in opposing directions, the material brings its total magnetization to zero. An unmagnetized iron nail has millions of domains whose fields cancel out perfectly.

When you bring a magnet near that nail, the domains aligned with the external field grow at the expense of their neighbors. The boundaries between domains, called domain walls, slide through the material, and this wall motion is an energetically cheap process. That’s why iron magnetizes so easily. Remove the external field, and in a soft magnetic material like pure iron, most domains relax back toward their original random arrangement. In a hard magnetic material designed for permanent magnets, the domain walls stay put, and the material retains its field.

Permanent Magnets and Magnetic Memory

A permanent magnet is simply a ferromagnetic material whose domains stay aligned after the magnetizing field is removed. The amount of magnetization it keeps is called its remanence, and the amount of reverse field needed to erase that magnetization is called its coercivity. A good permanent magnet has high values of both: it holds a strong field and resists being demagnetized.

Materials with high remanence and coercivity are described as “magnetically hard.” These include the ceramic magnets on your fridge, the alloy magnets inside headphones, and rare earth magnets used in electric motors. By contrast, “magnetically soft” materials like the iron cores inside transformers magnetize and demagnetize easily, which makes them useful for electronics where the field needs to flip direction thousands of times per second.

This property of retaining magnetization is also the basis for magnetic data storage. Hard drives, credit card strips, and magnetic tape all exploit the fact that ferromagnetic materials remember which direction they were last magnetized, acting as a kind of binary memory.

Why Rare Earth Magnets Are So Strong

Elements like neodymium and samarium produce the strongest permanent magnets available. The reason traces back to a specific set of electron orbitals called the 4f shell. In rare earth atoms, this shell is only partially filled, which gives each atom a large magnetic moment. But what really sets rare earth elements apart is where those 4f electrons sit: they’re buried deep inside the atom, tucked beneath the outer electron shells. This confinement, caused by a sharp dip in the energy landscape produced by the orbital’s angular momentum, shields the 4f electrons from outside disturbances.

Because the magnetic electrons are so well protected, rare earth materials have extremely high magnetic anisotropy, meaning their magnetism strongly prefers one direction within the crystal. This makes it very difficult to knock the domains out of alignment, giving rare earth magnets both high remanence and high coercivity. A neodymium magnet the size of a coin can hold several kilograms of weight.

Heat and the Curie Temperature

Ferromagnetic order depends on neighboring atoms staying aligned, and heat is the enemy of that alignment. As temperature rises, atoms vibrate more violently, and at a specific threshold the thermal energy overwhelms the force holding the magnetic moments together. The material abruptly loses its ferromagnetic properties and becomes paramagnetic, with randomly oriented atomic magnets and no net field.

This threshold is called the Curie temperature, and it’s different for every material. For iron, it’s about 1,043 K (roughly 770 °C or 1,418 °F). Cobalt’s is higher, nickel’s is lower. Above the Curie temperature, even the strongest permanent magnet becomes non-magnetic. Cool it back down and the domains can reform, but the original magnetization pattern is gone. This is why extreme heat can permanently demagnetize tools, electronics components, and any other object that relies on a stable magnetic field.

Measuring Magnetic Strength

Magnetic field strength is measured in teslas (T), a unit adopted internationally in 1960. One tesla equals 10,000 gauss, an older unit you’ll still see on some specifications. To put these numbers in context: Earth’s magnetic field, the one that moves your compass needle, measures in microteslas, roughly 25 to 65 millionths of a tesla depending on where you are. A small magnetron magnet, the kind found in surplus electronics, might produce around 0.09 tesla (900 gauss). A typical MRI machine operates at 1.5 to 3.0 teslas, and experimental MRI scanners push up to 10.5 teslas.

The enormous range, from microteslas in Earth’s field to several teslas in medical imaging, reflects the difference between a planetary-scale but diffuse field and a concentrated, engineered one. Both originate from the same fundamental source: the motion and spin of electrons. The gap comes down to how many of those tiny atomic magnets are aligned, how tightly they’re packed, and how strongly the material resists losing that alignment.