Electricity continued to advance the development of physics, as well as chemistry, in the early decades of the nineteenth century. The Dane Hans Christian Ørsted had been interested in both electricity and magnetism for some time when, on 21 April 1820, he observed something that had not previously been noticed. According to his own account, he was giving a lecture to demonstrate various magnetic and electric phenomena, and had the apparatus for the demonstrations laid out on the table in front of him. He spotted that when a wire was connected to a battery, an ordinary compass needle near the wire flicked over. He had found a direct link between the two phenomena. But he did not draw the attention of his audience to what he had noticed, preferring to carry out some proper experiments before going public.
By moving a magnetic compass needle around to different positions near a wire connected to a battery, Ørsted showed later that year that the electricity in the wire produced a circular magnetic field around the wire. Ørsted was puzzled by what he found. The compass needle was not directly attracted to point to the wire, but neither was it directly repelled to point away from the wire. It seemed to be trying to point perpendicular to it. It pointed in one direction, at right angles to the wire, when the needle was above the wire, and in the opposite direction when the needle was below the wire. In addition, reversing the connections of the wire to the battery reversed the effect. Unable to explain this, Ørsted published a paper describing what he had found and inviting other scientists to come up with an explanation. The challenge was quickly picked up and developed further, not just experimentally but with the first real, albeit incomplete, theory of electromagnetism (as it became known) by the Frenchman André-Marie Ampère.
Ampère learned about Ørsted’s discovery in September 1820, when it was demonstrated in Paris by François Jean Arago. This prompted him to carry out his own experiments, in which he showed, among other things, that two parallel wires each carrying an electric current will repel one another if the currents are flowing in opposite directions, but they attract one another when the currents are flowing in the same direction. He found that the strength of this effect is proportional to the strength of the current flowing in the wires and to the length of the wire, and that it obeys an inverse square law – that is, other things being equal, the force is reduced by a factor of four (to a quarter of its original strength) when the wires are moved twice as far apart, and so on. As Ampère himself was fond of pointing out, this is reminiscent of Isaac Newton’s ‘discovery’ of the inverse square law of gravity. You might wonder how he knew the strength of the electric current. It was because he invented an instrument to measure it. The instrument used a freely moving compass needle to measure the flow of electricity by the amount of deflection produced. Later developments of this became known as galvanometers, in honour of Luigi Galvani, while the unit of electric current, of course, was named after Ampère.
What would prove to be one of the most significant discoveries concerning electromagnetism, as far as its practical implications were concerned, was also made by Ampère, although other researchers independently noticed the same thing. When an electric current is passed through a wire which has been coiled into a helix (dubbed a solenoid by Ampère), it produces a magnetic field that is exactly like the field of a bar magnet, with a north pole at one end of the solenoid and a south pole at the other end. This is the basis of electromagnetic switches, which operate by pulling a strip of metal towards the coil when the current flows, and releasing it when the current is turned off. And it also became the basis of the electric motor (see here).
In attempting to provide a unified description of magnetism and electricity, in which he was only partly successful, Ampère introduced the idea of an ‘electrodynamic molecule’, which carried electric current along a wire; this was the electron in all but name. In 1827 he pulled all his ideas and experimental evidence together in a great book, Mémoire sur la Théorie Mathématique des Phénomènes Électrodynamiques Uniquement Déduite de l’Experience (Memoir on the Mathematical Theory of Electrodynamic Phenomena, Uniquely Deduced from Experience), in which he introduced the term electrodynamics. James Clerk Maxwell, the British scientist who, later in the nineteenth century, did develop a complete mathematical theory of electromagnetism, wrote (in 1873) that ‘the experimental investigation by which Ampère established the law of the mechanical action between electric currents is one of the most brilliant achievements in science’.