How Magnets Work

By: Tracy V. Wilson  | 

magnet and iron filings
Iron filings beautifully show off the opposing fields of the same poles of two bar magnets. Spencer Grant/Photographer's Choice RF/Getty Images

­It all started when we went shopping for a magnet for a demonstration on liquid body armor. We wanted to show that a magnetic field could cause certain liquids to behave as solids. Along with the petri dishes and iron filings we needed, the Steve Spangler Science catalog had a neodymium magnet it described as "super strong." We ordered our supplies, hoping that the magnet would be powerful enough to create an effect we could capture on film.

The magnet didn't just transform our iron-and-oil fluid into a solid -- sometimes, its pull on the fluid cracked the petri dish holding it. Once, the magnet unexpectedly flew out of a videographer's hand and into a dish full of dry filings, which required considerable ingenuity to remove. It also adhered itself so firmly to the underside of a metal table that we had to use a pair of locking pliers to retrieve it. When we decided it would be safer to keep the magnet in a pocket between takes, people wound up momentarily stuck to the table, a ladder and the studio door.


Around the office, the magnet became an object of curiosity and the subject of impromptu experiments. Its uncanny strength and its tendency to suddenly and noisily jump from unwary grips to the nearest metal surface got us thinking. We all knew the basics of magnets and magnetism -- magnets attract specific metals, and they have north and south poles. Opposite poles attract each other while like poles repel. Magnetic and electrical fields are related, and magnetism, along with gravity and strong and weak atomic forces, is one of the four fundamental forces in the universe.

But none of those facts led to an answer to our most basic question. What exactly makes a magnet stick to certain metals? By extension, why don't they stick to other metals? Why do they attract or repel each other, depending on their positioning? And what makes neodymium magnets so much stronger than the ceramic magnets we played with as children?

Iron filings (right) align along the magnetic field lines of a cylindrical neodymium magnet.
Iron filings (right) align along the magnetic field lines of a cylindrical neodymium magnet.

To understand the answers to these questions, it helps to have a basic definition of a magnet. Magnets are objects that produce magnetic fields and attract metals like iron, nickel and cobalt. The magnetic field's lines of force exit the magnet from its north pole and enter its south pole. Permanent or hard magnets create their own magnetic field all the time. Temporary or soft magnets produce magnetic fields while in the presence of a magnetic field and for a short while after exiting the field. Electromagnets produce magnetic fields only when electricity travels through their wire coils.

Iron filings (right) align along the magnetic field lines of a cubical neodymium magnet.
Iron filings (right) align along the magnetic field lines of a cubical neodymium magnet.

Until recently, all magnets were made from metal elements or alloys. These materials produced magnets of different strengths. For example:

  • Ceramic magnets, like the ones used in refrigerator magnets and elementary-school science experiments, contain iron oxide in a ceramic composite. Most ceramic magnets, sometimes known as ferric magnets, aren't particularly strong.
  • Alnico magnets are made from aluminum, nickel and cobalt. They're stronger than ceramic magnets, but not as strong as the ones that incorporate a class of elements known as rare-earth metals.
  • Neodymium magnets contain iron, boron and the rare-earth element neodymium.
  • Samarium cobalt magnets combine cobalt with the rare-earth element samarium. In the past few years, scientists have also discovered magnetic polymers, or plastic magnets. Some of these are flexible and moldable. However, some work only at extremely low temperatures, and others pick up only very lightweight materials, like iron filings.


Making Magnets: The Basics

Many of today's electronic devices require magnets to function. This reliance on magnets is relatively recent, primarily because most modern devices require magnets that are stronger than the ones found in nature. Lodestone, a form of magnetite, is the strongest naturally-occurring magnet. It can attract small objects, like paper clips and staples.

By the 12th century, people had discovered that they could use lodestone to magnetize pieces of iron, creating a compass. Repeatedly rubbing lodestone along an iron needle in one direction magnetized the needle. It would then align itself in a north-south direction when suspended. Eventually, scientist William Gilbert explained that this north-south alignment of magnetized needles was due to the Earth behaving like an enormous magnet with north and south poles.


A compass needle isn't nearly as strong as many of the permanent magnets used today. But the physical process that magnetizes compass needles and chunks of neodymium alloy is essentially the same. It relies on microscopic regions known as magnetic domains, which are part of the physical structure of ferromagnetic materials, like iron, cobalt and nickel. Each domain is essentially a tiny, self-contained magnet with a north and south pole. In an unmagnetized ferromagnetic material, each of the north poles points in a random direction. Magnetic domains that are oriented in opposite directions cancel one another out, so the material does not produce a net magnetic field.

In an unmagnetized ferromagnetic material, domains point in random directions.
In an unmagnetized ferromagnetic material, domains point in random directions.

In magnets, on the other hand, most or all of the magnetic domains point in the same direction. Rather than canceling one another out, the microscopic magnetic fields combine to create one large magnetic field. The more domains point in the same direction, the stronger the overall field. Each domain's magnetic field extends from its north pole into the south pole of the domain ahead of it.

In a magnet, most or all of the domains point in the same direction.
In a magnet, most or all of the domains point in the same direction.

This explains why breaking a magnet in half creates two smaller magnets with north and south poles. It also explains why opposite poles attract -- the field lines leave the north pole of one magnet and naturally enter the south pole of another, essentially creating one larger magnet. Like poles repel each other because their lines of force are traveling in opposite directions, clashing with each other rather than moving together.

Connecting the north pole of one magnet to the south pole of another magnet essentially creates one larger magnet.
Connecting the north pole of one magnet to the south pole of another magnet essentially creates one larger magnet.


Making Magnets: The Details

Iron filings line up along the magnetic fields of four small magnets. After removing the magnet, the filings will continue to have their own weak magnetic fields.
Iron filings line up along the magnetic fields of four small magnets. After removing the magnet, the filings will continue to have their own weak magnetic fields.

To make a magnet, all you have to do is encourage the magnetic domains in a piece of metal to point in the same direction. That's what happens when you rub a needle with a magnet -- the exposure to the magnetic field encourages the domains to align. Other ways to align magnetic domains in a piece of metal include:

  • Placing it a strong magnetic field in a north-south direction
  • Holding it in a north-south direction and repeatedly striking it with a hammer, physically jarring the domains into a weak alignment
  • Passing an electrical current through it

Two of these methods are among scientific theories about how lodestone forms in nature. Some scientists speculate magnetite becomes magnetic when struck by lightning. Others theorize that pieces of magnetite became magnets when the Earth was first formed. The domains aligned with the Earth's magnetic field while iron oxide was molten and flexible.


The most common method of making magnets today involves placing metal in a magnetic field. The field exerts torque on the material, encouraging the domains to align. There's a slight delay, known as hysteresis, between the application of the field and the change in domains -- it takes a few moments for the domains to start to move. Here's what happens:

  • The magnetic domains rotate, allowing them to line up along the north-south lines of the magnetic field.
  • Domains that already pointed in the north-south direction become bigger as the domains around them get smaller.
  • Domain walls, or borders between the neighboring domains, physically move to accommodate domain growth. In a very strong field, some walls disappear entirely.

The resulting magnet's strength depends on the amount of force used to move the domains. Its permanence, or retentivity, depends on how difficult it was to encourage the domains to align. Materials that are hard to magnetize generally retain their magnetism for longer periods, while materials that are easy to magnetize often revert to their original nonmagnetic state.

You can reduce a magnet's strength or demagnetize it entirely by exposing it to a magnetic field that is aligned in the opposite direction. You can also demagnetize a material by heating it above its Curie point, or the temperature at which it loses its magnetism. The heat distorts the material and excites the magnetic particles, causing the domains to fall out of alignment.


Why Magnets Stick

A simplified view of an atom, with a nucleus and orbiting electrons
A simplified view of an atom, with a nucleus and orbiting electrons

If you've read How Electromagnets Work, you know that an electrical current moving through a wire creates a magnetic field. Moving electrical charges are responsible for the magnetic field in permanent magnets as well. But a magnet's field doesn't come from a large current traveling through a wire -- it comes from the movement of electrons.

Many people imagine electrons as tiny particles that orbit an atom's nucleus the way planets orbit a sun. As quantum physicists currently explain it, the movement of electrons is a little more complicated than that. Essentially, electrons fill an atom's shell-like orbitals, where they behave as both particles and waves. The electrons have a charge and a mass, as well as a movement that physicists describe as spin in an upward or downward direction. You can learn more about electrons in How Atoms Work.


Generally, electrons fill the atom's orbitals in pairs. If one of the electrons in a pair spins upward, the other spins downward. It's impossible for both of the electrons in a pair to spin in the same direction. This is part of a quantum-mechanical principle known as the Pauli Exclusion Principle.

Even though an atom's electrons don't move very far, their movement is enough to create a tiny magnetic field. Since paired electrons spin in opposite directions, their magnetic fields cancel one another out. Atoms of ferromagnetic elements, on the other hand, have several unpaired electrons that have the same spin. Iron, for example, has four unpaired electrons with the same spin. Because they have no opposing fields to cancel their effects, these electrons have an orbital magnetic moment. The magnetic moment is a vector -- it has a magnitude and a direction. It's related to both the magnetic field strength and the torque that the field exerts. A whole magnet's magnetic moments come from the moments of all of its atoms.

An iron atom and its four unpaired electrons
An iron atom and its four unpaired electrons

In metals like iron, the orbital magnetic moment encourages nearby atoms to align along the same north-south field lines. Iron and other ferromagnetic materials are crystalline. As they cool from a molten state, groups of atoms with parallel orbital spin line up within the crystal structure. This forms the magnetic domains discussed in the previous section.

You may have noticed that the materials that make good magnets are the same as the materials magnets attract. This is because magnets attract materials that have unpaired electrons that spin in the same direction. In other words, the quality that turns a metal into a magnet also attracts the metal to magnets. Many other elements are diamagnetic -- their unpaired atoms create a field that weakly repels a magnet. A few materials don't react with magnets at all.

This explanation and its underlying quantum physics are fairly complicated, and without them the idea of magnetic attraction can be mystifying. So it's not surprising that people have viewed magnetic materials with suspicion for much of history.


Magnet Myths

Transrapid train at the Emsland, Germany test facility
Transrapid train at the Emsland, Germany test facility

Every time you use a computer, you're using magnets. A hard drive relies on magnets to store data, and some monitors use magnets to create images on the screen. If your home has a doorbell, it probably uses an electromagnet to drive a noisemaker. Magnets are also vital components in CRT televisions, speakers, microphones, generators, transformers, electric motors, burglar alarms, cassette tapes, compasses and car speedometers.

In addition to their practical uses, magnets have numerous amazing properties. They can induce current in wire and supply torque for electric motors. A strong enough magnetic field can levitate small objects or even small animals. Maglev trains use magnetic propulsion to travel at high speeds, and magnetic fluids help fill rocket engines with fuel. The Earth's magnetic field, known as the magnetosphere, protects it from the solar wind. According to Wired magazine, some people even implant tiny neodymium magnets in their fingers, allowing them to detect electromagnetic fields [Source: Wired].


Magnetic Resonance Imaging (MRI) machines use magnetic fields to allow doctors to examine patients' internal organs. Doctors also use pulsed electromagnetic fields to treat broken bones that have not healed correctly. This method, approved by the United States Food and Drug Administration in the 1970s, can mend bones that have not responded to other treatment. Similar pulses of electromagnetic energy may help prevent bone and muscle loss in astronauts who are in zero-gravity environments for extended periods.

Magnets can also protect the health of animals. Cows are susceptible to a condition called traumatic reticulopericarditis, or hardware disease, which comes from swallowing metal objects. Swallowed objects can puncture a cow's stomach and damage its diaphragm or heart. Magnets are instrumental to preventing this condition. One practice involves passing a magnet over the cows' food to remove metal objects. Another is to feed magnets to the cows. Long, narrow alnico magnets, known as cow magnets, can attract pieces of metal and help prevent them from injuring the cow's stomach. The ingested magnets help protect the cows, but it's still a good idea to keep feeding areas free of metal debris. People, on the other hand, should never eat magnets, since they can stick together through a person's intestinal walls, blocking blood flow and killing tissue. In humans, swallowed magnets often require surgery to remove.

Cow magnets
Cow magnets
Photo courtesy Amazon

Some people advocate the use of magnet therapy to treat a wide variety of diseases and conditions. According to practitioners, magnetic insoles, bracelets, necklaces, mattress pads and pillows can cure or alleviate everything from arthritis to cancer. Some advocates also suggest that consuming magnetized drinking water can treat or prevent various ailments. Americans spend an estimated $500 million per year on magnetic treatments, and people worldwide spend about $5 billion. [Source: Winemiller via NCCAM].

Proponents offer several explanations for how this works. One is that the magnet attracts the iron found in hemoglobin in the blood, improving circulation to a specific area. Another is that the magnetic field somehow changes the structure of nearby cells. However, scientific studies have not confirmed that the use of static magnets has any effect on pain or illness. Clinical trials suggest that the positive benefits attributed to magnets may actually come from the passage of time, additional cushioning in magnetic insoles or the placebo effect. In addition, drinking water does not typically contain elements that can be magnetized, making the idea of magnetic drinking water questionable.

Some proponents also suggest the use of magnets to reduce hard water in homes. According to product manufacturers, large magnets can reduce the level of hard water scale by eliminating ferromagnetic hard-water minerals. However, the minerals that generally cause hard water are not ferromagnetic. A two-year Consumer Reports study also suggests that treating incoming water with magnets does not change the amount of scale buildup in a household water heater.

Even though magnets aren't likely to end chronic pain or eliminate cancer, they are still fascinating to study.


Originally Published: Apr 2, 2007

Magnet FAQs

Why is the earth’s magnetic field important?
Without Earth’s magnetic field, life on the planet would eventually die out. That's because we would be exposed to high amounts of radiation from the sun and our atmosphere would leak into space.
Are humans electromagnetic?
Humans can generate their own electromagnetic fields. This can be explained due to the presence of small electric currents running in the body (generated due to chemical reactions). In fact, you could induce circulating currents within the body with a nearby magnetic field.
Are magnets harmful to the body?
Whether the magnetic field of a magnet is harmful to the human body depends on its strength. Scientists agree that magnets under 3000 Gauss are harmless but anything above this number is potentially dangerous.
Can magnets damage my Macbook?
Magnets can damage a Macbook. This is because the data on your computer’s hard disk can be erased due to the magnetization of a nearby magnet. If this happens, your data may get corrupted and require restoration from a backup.
What is magnetic inductance?
Magnetic inductance is defined as a property that allows any material (such as iron) to temporarily acquire magnetic properties when placed near another magnet. This phenomenon was first observed by Michael Faraday in 1831.

Lots More Information

Related HowStuffWorks Articles

More Great Links

  • Andrews, C.M. "Understanding Permanent Magnets." TechNotes. Group Arnold. December 1998.
  • Byerly, Diane et al. "Pulsed Electromagnetic Fields - A Countermeasure for Bone Loss and Muscle Atrophy." Space Life Sciences. (3/9/2007)
  • Carpenter, C.J. "Magnetic Field." AccessScience@McGraw-Hill. Last modified 4/10/2000 (3/9/2007).
  • Carpenter, C.J. "Magnetism."AccessScience@McGraw-Hill. Last modified 2/13/2006 (3/9/2007).
  • Constantinides, S. "Novel Permanent Magnets and their Uses." May 1995.
  • Cunningham, Aimee. "Magnet Makeover." Science News. 2/3/2007 (3/9/2007).
  • Encyclopedia Britannica. "Magnet." Encyclopedia Britannica Online. 3/2007 (3/9/2007)
  • Epstein, Arthur J. and Joel S. Miller. "Magnet." AccessScience@McGraw-Hill. Last modified 4/10/2000 (3/9/2007).
  • Hewitt, Paul G. "Conceptual Physics." Addison-Wesley Publishing Company, Inc. 1987.
  • Huang, S. "Why Don't Magnets Work on Some Stainless Steels?" Scientific American. 10/2/2006 (3/9/2007). 0000999C-453C-151C-BF1F83414B7FFEB5
  • Hungerford, Laura. "Cow Magnets." Newton Ask a Scientist. 7/16/2003 (3/9/2007)
  • Killeya, Matthew. "First Practical Plastic Magnets Created." New Scientist 8/30/2004 (3/9/2007).
  • Luborsky, F.E. "Magnetic Materials." AccessScience@McGraw-Hill. Last modified 6/17/2004 (3/14/2007)
  • Manning, Kenneth V. "Magnetic Moment." AccessScience@McGraw-Hill. Last modified 4/10/2000 (3/14/2007)
  • National Center for Complementary and Alternative Medicine. "Questions and Answers About Using Magnets to Treat Pain." 5/2004 (3/9/2007)
  • Norton, Quinn. "A Sixth Sense for a Wired World." Wired. 6/7/2006 (3/9/2007),71087-0.html
  • Penicott, Katie. "Magnetic Polymer Makes Its Debut." Physics Web 11/16/2001 (3/9/2007)
  • "The Great Magnet, the Earth." 11/29/2004 (3/9/2007)
  • Powell, Mike R. "Magnetic Water and Fuel Treatment: Myth, Magic or Mainstream Science?" Skeptical Inquirer. January/February 1998. (3/9/2007).
  • Pumfrey, Stephen and David Tilley. "William Gilbert: Forgotten Genius." Physics Web. 11/2003 (3/9/2007).
  • Stern, Dr. David P. "Magnetism." NASA. 11/25/2001. (3/9/2007)