Why do like magnetic poles repel each other?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

Like magnetic poles repel each other because of the fundamental nature of magnetic forces, which dictate that like poles (north-north or south-south) exert a repulsive force, while unlike poles attract.12

This interaction can be understood by treating magnets as magnetic dipoles. The force between two dipoles is determined by how one dipole interacts with the magnetic field produced by the other. When a dipole is placed in a nonuniform magnetic field, it experiences a force that drives it toward a state of lower potential energy. Because the potential energy of the system increases when like poles are forced together, the magnets naturally repel to reach a more stable, lower-energy configuration.1

Historically, this behavior was described by an inverse square law, similar to Coulomb’s law for electric charges. Fundamentally, these magnetic forces arise from the motion of electric charges, such as the spin and orbital motion of electrons within the material.123