The phenomena of electricity and magnetism were important subjects of research by physicists in the nineteenth century. Both phenomena exhibited an inverse square law dependence of force and distance. Both phenomena exhibited poles. Some physicists suspected a relation between electricity and magnetism. It was not until 1820 that Hans Christian Oersted experimentally and conclusively proved that electric currents produce magnetic fields. Subsequently, serious studies were made on the correlation between electricity and magnetism. Oersted’s experiment led to the birth of electromagnetism. It had huge technological significance beginning with improvements in electrical telegraphy to electric motors and dynamos.
Physicists were already suspecting electricity and magnetism to have a deep interdependence with each other as studies were made into both phenomena.
The similarities between electricity and magnetism known at the beginning of the nineteenth century were:
While these similarities existed, they also led to incorrect descriptions as to how an electric current could produce magnetism. Oersted initially thought (and incorrectly) that the magnetic field produced by a current-carrying conductor will be parallel to the direction of the current. Thus, initial experiments by Oersted were unsuccessful.
The legend goes that it was only by accident that Oersted, while lecturing in a class, observed that a magnetic compass seemed to be deflected by a current-carrying conductor. This was the beginning of the Oersted experiment.
The Oersted experiment, despite its significance, is quite straightforward and ‘obvious’ to us today.
In 1830, while delivering a lecture, Oersted had a conducting wire connected to a voltaic pile (battery). A magnet in the form of a compass needle was lying beneath the conducting wire.

Hans Christian Oersted immediately reported this discovery and followed up with a detailed publication three months later.
Oersted investigated further and drew the following conclusions about the magnetic field due to the current-carrying conductor.
Oersted’s work immediately influenced many scientific studies into the electromagnetic realm, i.e., where electricity and magnetism were considered to be deeply connected.
Notably, André-Marie Ampère was inspired by Oersted’s work to give Ampère’s force law, which stated the interaction between two current-carrying parallel wires.
Furthermore, Faraday recognised that the interaction of current-carrying conductors and magnets could be used to generate motion and vice versa. The nineteenth-century saw many advances in electromagnetism, which subsequently served as a foundation for the development of electrical engineering in the 20th century.
The primary technological development following Oersted’s law was the electric telegraph.
The beginning of electromagnetism with Oersted’s experiment was brought to its fine conclusion in 1865 with James Clerk Maxwell’s publication of “A Dynamical Theory of the Electromagnetic Field,” which not only unified electricity and magnetism but also predicted electromagnetic waves.
The simple, accidental yet elegant discovery that was a deflection of a compass needle by a current-carrying conductor is the best representative of rapid evolution in electromagnetism and humanity in general. While rapid strides into theoretical studies of electromagnetism were made, innovators constantly invented new and unique ways of using electromagnetism in daily lives–electromagnets, motors, generators, dynamos etc.
The Oersted’s effect is used everywhere around us, be it in the fans, switchboards, the magnetic coils of the computers or electric vehicles. Oersted’s experiment culminated in the crowning achievement in electromagnetic theory by Maxwell, which predicted electromagnetic waves.