When an electric current flows in a wire it creates a magnetic field around the wire. By winding the wire into a coil we can strengthen the magnetic field. Electromagnets are made from coils like this.

We can make an electromagnet stronger by:

  • wrapping the coil around an iron core
  • adding more turns to the coil
  • increasing the current flowing through the coil
A coil of insulated wire is wrapped around an iron nail. One end of the coil of wire is connected to a battery. The other is connected to a switch in the circuit.A coil of wire wrapped around a nail connected to a battery and switch

The magnetic field around an electromagnet is just the same as the one around a bar magnet. It can, however, be reversed by turning the battery around. Unlike bar magnets, which are permanent magnets, the magnetism of electromagnets can be turned on and off just by closing or opening the switch.

Relays are electrically operated switches. They use an electromagnet, often to control a high-power circuit using a low-power signal or where multiple circuits need to be controlled by one circuit.