In 1820, Hans Christian Ørsted stumbled upon a discovery that birthed the study of electromagnetism. While setting up materials for a lecture, Ørsted happened to bring a compass close to a live electrical wire. He noticed that the needle of the compass jumped when close to the wire. After more experimentation and documentation, he officially proved that magnetic fields are created when current travels through a wire, thus proving that electricity and magnetism are connected.
Play with the tutorial below to experience the phenomenon as Ørsted did.