He realized that four of the basic laws of electricity and magnetism constituted a complete mathematical description of these phenomena. After adding a missing piece, he showed that the equations predicted a strange type of wave — a wave that could travel through a vacuum by tossing energy back and forth between electric and magnetic fields. The equations also predicted the speed of these waves to be approximately 186,000 miles per second (300,000 km/s) — a number we recognize as the speed of light.
Light was, in fact, one of those strange waves Maxwell found in his equations. In the end, he showed that all waves in what we now call the electromagnetic spectrum — waves that range in size from radio waves, with wavelengths larger than the diameter of Earth, to gamma rays, with wavelengths smaller than the nucleus of an atom — were the same thing as visible light itself.
Stretch a light wave out, and you have a microwave. Scrunch it up, and you have an X-ray. All of these waves move at the same speed — what we call the “speed of light” and denote by the letter c. More importantly, this speed is actually built into Maxwell’s equations.
Thus, if the principle of relativity is really true, and if all the laws of nature (including Maxwell’s equations) are really the same in all frames of reference, then the speed of light has to be the same for all observers.
This is really a weird statement. It says, for example, if a friend is driving by you in a car at 60 mph (100 km/h) and shines a flashlight, both of you will see that light traveling at 186,000 miles per second. To emphasize the strangeness, this means that standing on the ground, you will not see that light moving at 186,000 miles per second plus 60 mph, as you might expect, but at 186,000 miles per second.
Einstein was the first to realize that the only way to resolve this dilemma was to change the way we think about space (i.e., distance) and time. After all, we arrived at the dilemma by thinking about velocities, and velocity is just distance divided by time. Change our ideas about space and time, Einstein argued, and these sorts of problems could go away.