Hans Christian Ørsted's discovery of the magnetic effect of electric currents in 1820 was immediately recognised as an important advance, although he left further work on electromagnetism to others. André-Marie Ampère quickly repeated Ørsted's experiment, and formulated them mathematically (which became Ampère's law) . Ørsted also discovered that not only is a magnetic needle deflected by the electric current, but that the live electric wire is also deflected in a magnetic field, thus laying the foundation for the construction of an electric motor. Ørsted's discovery of piperine, one of the pungent components of pepper, was an important contribution to chemistry, as was his preparation of aluminium in 1825.