U.S. Energy Information Administration logo
Skip to sub-navigation

Electricity explained Magnets and electricity

The spinning of the electrons around the nucleus of an atom creates a tiny magnetic field. The electrons in most objects spin in random directions, and their magnetic forces cancel each other out.

Magnets are different because the molecules in magnets are arranged so that their electrons spin in the same direction. This arrangement and movement creates a magnetic force that flows out from a north-seeking pole and from a south-seeking pole. This magnetic force creates a magnetic field around a magnet.

Have you ever held two magnets close to each other? They don't act like most objects. If you try to push the two north poles or two south poles together, they repel each other. But if you put a north pole and a south pole together, the magnets will stick together because the north and south poles attract each other. Just like protons and electrons—opposites attract in magnets.

magnetic field around a bar magnet

Magnetic field around a bar magnet

diagram showing magnetic repulsion
diagram showing magnetic attraction

Source: National Energy Education Development Project (public domain)

Magnetic fields can be used to make electricity

The properties of magnets are used to make electricity. Moving magnetic fields pull and push electrons. Metals such as copper and aluminum have electrons that are loosely held. Moving a magnet around a coil of wire, or moving a coil of wire around a magnet, pushes the electrons in the wire and creates an electrical current. Electricity generators essentially convert kinetic energy (the energy of motion) into electrical energy.

Last reviewed: November 19, 2022