Curious Minds

Clear answers to science and history questions

Why Do Magnets Repel and Attract Each Other?

· 7 min read · Science

Magnets attract and repel each other because of the electromagnetic force, which arises from the motion of electric charges inside the magnet’s atoms. This force is mediated by magnetic fields, and the direction of the force depends on the orientation of the magnets’ poles: opposite poles (north and south) attract, while like poles (north-north or south-south) repel.

What Is a Magnetic Field?

A magnetic field is a region of space where a magnetic force is exerted on moving electric charges, magnetic dipoles, and other magnets. It is a vector field, meaning it has both a magnitude and a direction at every point. You can visualize it with iron filings, which align along the field lines. Field lines emerge from the north pole and enter the south pole, forming closed loops. The strength of the field is measured in teslas (T) or gauss (1 T = 10,000 gauss); the Earth’s magnetic field is about 0.5 gauss, while a typical fridge magnet is about 100 gauss.

How Do Magnets Work at the Atomic Level?

Every electron in an atom has a property called spin, which creates a tiny magnetic moment. In most materials, these moments cancel out because electrons pair up with opposite spins. However, in ferromagnetic materials like iron, cobalt, nickel, and some rare-earth elements, unpaired electrons align their spins in small regions called domains. In an unmagnetized piece of iron, the domains point in random directions, so the net magnetic field is zero. When you magnetize the material (e.g., by stroking it with a magnet or exposing it to a strong magnetic field), the domains align, and the material becomes a magnet. This alignment persists because the domains are “locked” in place by impurities and crystal defects.

Why Do Like Poles Repel and Opposite Poles Attract?

The simple rule “opposite poles attract, like poles repel” is a consequence of the way magnetic fields interact. Consider two bar magnets placed end to end. The north pole of one magnet produces field lines that point away from it, while the south pole of the other magnet has field lines pointing toward it. When you bring a north pole near a south pole, the field lines connect smoothly, and the magnets pull together because the system lowers its magnetic potential energy. Conversely, when you bring two north poles together, the field lines are forced to bend and compress, which increases the potential energy. The system naturally tries to minimize energy, so it pushes the magnets apart. This is analogous to pushing two identical ends of a spring together—the stored energy creates a repulsive force.

What Is the Role of Electrons and Moving Charges?

Magnetism is fundamentally a relativistic effect of moving charges. In a permanent magnet, the aligned electron spins create a net current loop at the atomic level. Each atom acts like a tiny loop of current, and the combined effect of billions of aligned loops produces a macroscopic magnetic field. When two magnets interact, the force is transmitted by the exchange of virtual photons, the quantum particles of the electromagnetic field. At the classical level, you can think of the force as arising from the interaction between the magnetic field of one magnet and the moving charges in the other. For example, in a ferromagnetic material, the electrons’ spins are the moving charges, and they experience a force when placed in an external magnetic field. This force is what we observe as attraction or repulsion.

Why Do Some Materials Respond to Magnets but Others Don’t?

Not all materials respond to magnets the same way. Materials fall into several categories based on their magnetic behavior:

  • Ferromagnetic (iron, cobalt, nickel, gadolinium, and their alloys): Strongly attracted to magnets; can become permanent magnets.
  • Paramagnetic (aluminum, platinum, oxygen): Weakly attracted to magnets; the effect is so small it is usually only detectable with sensitive instruments.
  • Diamagnetic (copper, bismuth, water, most organic compounds): Weakly repelled by magnets; this effect is extremely small and often masked by other forces.
  • Antiferromagnetic (chromium, manganese oxide): Have aligned spins that cancel out, so they show no net magnetism.
  • Ferrimagnetic (ferrites like magnetite): Similar to ferromagnetic but with unequal opposing spins, producing a net magnetic moment.

The key difference lies in how the electron spins align in response to an external magnetic field. In ferromagnetic materials, the spins align parallel to the field, reinforcing it. In paramagnetic materials, the spins align weakly and only when the field is present. In diamagnetic materials, the electrons’ orbital motion creates a tiny opposing field, leading to repulsion.

How Do Electromagnets Differ from Permanent Magnets?

An electromagnet is a magnet that only works when an electric current flows through a coil of wire. The current creates a magnetic field, and the strength can be controlled by changing the current or the number of turns in the coil. When the current stops, the magnetic field disappears (unless the core is made of a ferromagnetic material that retains some magnetization, called hysteresis). Permanent magnets, on the other hand, maintain their magnetic field without an external power source because their domains remain aligned. Electromagnets are used in applications where you need to switch magnetism on and off, such as in scrapyard cranes, MRI machines, and electric motors.

What Are the Practical Applications of Magnetic Attraction and Repulsion?

The principles of magnetic attraction and repulsion underpin many technologies:

  • Electric motors and generators – use repulsion and attraction between electromagnets and permanent magnets to convert electrical energy into motion or vice versa.
  • Magnetic levitation (maglev) trains – use repulsion to lift the train above the track, eliminating friction and allowing high speeds.
  • Hard disk drives – use magnetism to store data on a spinning platter, with read/write heads that detect and change magnetic orientation.
  • MRI machines – use powerful superconducting magnets to align hydrogen nuclei in the body, producing detailed images.
  • Compasses – use the Earth’s magnetic field to align a magnetized needle, which points north.
  • Speakers and microphones – use a magnet and a coil to convert electrical signals into sound and vice versa.

In each case, the force between magnets is harnessed to do useful work, whether it’s moving a train or producing sound waves.

Common Misconceptions About Magnets

One common misconception is that magnets attract all metals. In reality, they only strongly attract ferromagnetic materials (iron, nickel, cobalt) and some rare-earth alloys. Aluminum and copper are not attracted to a magnet—they are actually diamagnetic, meaning they are weakly repelled. Another misconception is that cutting a magnet in half gives you a separate north and south pole. In fact, each half becomes a new magnet with its own north and south pole. There is no known isolated magnetic monopole in nature; magnetic poles always come in pairs. Also, some people think that magnets can “run out” of energy if used too much. While a permanent magnet can be demagnetized by heating it above its Curie temperature (for iron, about 770°C) or by striking it hard, normal use does not deplete its magnetism because the energy comes from the alignment of domains, not from an external source.

Frequently Asked Questions

Why does a magnet attract a paperclip but not a piece of copper?

A paperclip is made of steel, which is mostly iron, a ferromagnetic material. The magnetic field of the magnet aligns the domains in the steel, creating an induced magnetic field that is attracted to the magnet. Copper, on the other hand, is diamagnetic—its electrons produce a very weak opposing field, so the attraction is negligible and often not noticeable.

Can a magnet ever repel a ferromagnetic material?

No, a permanent magnet will always attract a ferromagnetic material like iron, because the induced field in the iron aligns with the external field, creating attraction. However, if the material is already magnetized and you bring like poles together, you get repulsion. But an unmagnetized piece of iron will always be attracted.

What is the Curie temperature?

The Curie temperature is the temperature above which a ferromagnetic material loses its permanent magnetism. At this temperature, the thermal energy overcomes the alignment of electron spins, and the material becomes paramagnetic. For iron, this is about 770°C (1,418°F). When cooled back down, the material can be remagnetized.

Why do magnets lose their strength over time?

Permanent magnets can gradually lose strength due to several factors: exposure to high temperatures, physical shock (dropping or striking), and exposure to alternating magnetic fields. Over years, even at room temperature, thermal fluctuations can cause some domains to misalign, but this is usually very slow for good-quality magnets like neodymium.

Are there any health risks from strong magnets?

Strong magnets can be dangerous if swallowed, especially multiple magnets, because they can attract through intestinal walls and cause blockages or perforations—this is a medical emergency. Also, strong magnets can interfere with pacemakers and other implanted medical devices, so people with such devices should keep magnets at a safe distance. Otherwise, everyday magnets like fridge magnets are generally safe.

In this article
  1. What Is a Magnetic Field?
  2. How Do Magnets Work at the Atomic Level?
  3. Why Do Like Poles Repel and Opposite Poles Attract?
  4. What Is the Role of Electrons and Moving Charges?
  5. Why Do Some Materials Respond to Magnets but Others Don’t?
  6. How Do Electromagnets Differ from Permanent Magnets?
  7. What Are the Practical Applications of Magnetic Attraction and Repulsion?
  8. Common Misconceptions About Magnets
  9. Frequently Asked Questions