An electromagnet is a type of magnet in which the magnetic field is induced by the flow of an electric current through a coil of wire. The magnetic field disappears when the flow of electricity is stopped.

Electromagnets have at least two advantages over permanent magnets:

  • the magnetic field can be switched on and off, or reversed, or its strength varied, by controlling the electric current, and
  • they can generate a stronger magnetic field than a permanent magnet of similar size and weight.

Their main disadvantage compared with permanent magnets is that they consume electrical power.

The operation of an electromagnet is one aspect of electromagnetism.

One unusual use of an AC electromagnet is that it can be used to repair the damage to a cathode ray tubes screen caused by bringing a magnet next to them. The damage is caused by a magnet magnetizing pieces of iron (or whatever) inside the screen so the bend the path of the electrons distorting the image. The rapidly reversing polarity of an AC electromagnet will leave the magnetic domains of the screen in random directions, thus making them cancel out. This procedure is known as degaussing. Of course, you should never take a magnet next to a computer monitor in the first place.