Oersted's Observations on the Magnetic Effects of Electric Current
Hans Oersted was the first to notice that an electric current could produce magnetic effects. Until his experiments, it was thought that electricity and magnetism were separate phenomena, magnetism only existing in the form of iron magnets, one of which was thought to exist at the centre of the Earth, producing the Earth's magnetic field. A professor at Copenhagen University, he was one day performing demonstrations of magnetism and electricity. While performing a demonstration of electricity, he noticed that every time the electric current was switched on, the compass needle was deflected.
The compass needle as a whole was not attracted to or repelled by the wire carrying the current – actually one end of the magnet was attracted and the other end was repelled, suggesting a turning moment, that equal and opposite forces were exerted on wither end of the magnet.
What he had discovered was that electric currents can produce magnetic fields. Further investigation showed that the strength of the field decreased with distance from the wire, and the direction of the turning force depended on the direction of the current, so reversing the current reverses the turning force. In fact the magnetic field forms concentric circles around the wire, with the magnetic field on each circle being constant.