Ampere's largest accomplishment was the discovery of the laws of electromagnetism. Because of these great discoveries the ampere, a unit used to measure the rate of flow of an electric current, was named after him. He showed that parallel electric currents attract each other if they move in the same direction and repel if their directions are opposite. He invented the mathematical theory to explain the development of electrodynamics. He discovered that an electric current through a coil, acts like a magnet. This discovery led to the invention of the alvanometer, an instrument for detecting and measuring electric currents. With the alvanometer he proved that electric current makes a circut through a battery. Ampere's great knowledge and insite on electrodynamics helped him in his teachings at the Ecole Polytechnique, in Paris. He published "Mathematical Theory of Electrodynamic Phenomena," in 1827.