Electricity and magnetism might seem like different forces, and that’s exactly how they seemed to early scientists. Then, in 1820, Hans Christian Øersted generated an electric current near a compass. Low and behold, its needle wobbled. A magnetic field was circling the electric current, keeping the compass from orienting itself to the earth’s magnetic poles.
This would be a really big deal if you were still using candles and gas lamps like Øersted and his friends. Proving that you could use electricity to create a magnetic field also meant that magnetic fields could keep electric currents going, which meant that now everyone could party late into the night.
But electromagnetism isn’t just about keeping the lights on. It’s also what attracts atoms to each other to make molecules as atoms share or transfer electrons. And in attracting atoms to each other, electromagnetism holds the world together.