How Do Magnets Produce Electricity?
In 1820 a Danish scientist named Hans Christian Oersted observed that wires carrying electric currents were sometimes either attracted to or repelled from each other. Studying the phenomenon taught him that all wires carrying electric currents are surrounded by magnetic fields. A little later his work was extended by that of Andre-Marie Ampere, who described exactly how the electric current and magnetic field are related in a mathematical sense. This discovery established that there was a fundamental connection between electricity and magnetism, although it was not until the time of Michael Faraday that it was learned that this connection worked in reverse as well. Magnets can also produce electricity.