Electromagnets are formed by wrapping electrical wire around an iron core. When the wire has been formed into a tightly wound core around the iron core, an electrical current is allowed to flow through the wire. This current will induce a magnetic field within the iron core, that will allow the core to be used as a magnet. Depending on the strength of the current, the number of wire loops within the coil, and the composition of the iron core, the strength of the magnetic field may be adjusted, from weak to strong. Electromagnets are used in electronics applications, loudspeakers, and in junkyards to help lift heavy scrap metal. The connection between electricity and magnetism was discovered by Michael Farraday, and is known as Farradays Law. Magnetism can likewise be used to produce electrical current by spinning a coil of wire within a magnetic field to produce current flow through the wire.