In 1905, Albert Einstein published the theory of special relativity, which explains how to interpret motion between different inertial frames of reference — that is, places that are moving at constant speeds relative to each other.
Einstein explained that when two objects are moving at a constant speed as the relative motion between the two objects, instead of appealing to the ether as an absolute frame of reference that defined what was going on. If you and some astronaut, Amber, are moving in different spaceships and want to compare your observations, all that matters is how fast you and Amber are moving with respect to each other.
Special relativity includes only the special case (hence the name) where the motion is uniform. The motion it explains is only if you’re traveling in a straight line at a constant speed. As soon as you accelerate or curve — or do anything that changes the nature of the motion in any way — special relativity ceases to apply. That’s where Einstein’s general theory of relativity comes in, because it can explain the general case of any sort of motion.
Einstein’s theory was based on two key principles:
The principle of relativity: The laws of physics don’t change, even for objects moving in inertial (constant speed) frames of reference.
The principle of the speed of light: The speed of light is the same for all observers, regardless of their motion relative to the light source. (Physicists write this speed using the symbol c.)
The genius of Einstein’s discoveries is that he looked at the experiments and assumed the findings were true. This was the exact opposite of what other physicists seemed to be doing. Instead of assuming the theory was correct and that the experiments failed, he assumed that the experiments were correct and the theory had failed.
In the latter part of the 19th century, physicists were searching for the mysterious thing called ether — the medium they believed existed for light waves to wave through. The belief in ether had caused a mess of things, in Einstein’s view, by introducing a medium that caused certain laws of physics to work differently depending on how the observer moved relative to the ether. Einstein just removed the ether entirely and assumed that the laws of physics, including the speed of light, worked the same regardless of how you were moving — exactly as experiments and mathematics showed them to be!
Einstein’s theory of special relativity created a fundamental link between space and time. The universe can be viewed as having three space dimensions — up/down, left/right, forward/backward — and one time dimension. This 4-dimensional space is referred to as the space-time continuum.
If you move fast enough through space, the observations that you make about space and time differ somewhat from the observations of other people, who are moving at different speeds.
You can picture this for yourself by understanding the thought experiment depicted in this figure. Imagine that you’re on a spaceship and holding a laser so it shoots a beam of light directly up, striking a mirror you’ve placed on the ceiling. The light beam then comes back down and strikes a detector.
However, the spaceship is traveling at a constant speed of half the speed of light (0.5c, as physicists would write it). According to Einstein, this makes no difference to you — you can’t even tell that you’re moving. However, if astronaut Amber were spying on you, as in the bottom of the figure, it would be a different story.
Amber would see your beam of light travel upward along a diagonal path, strike the mirror, and then travel downward along a diagonal path before striking the detector. In other words, you and Amber would see different paths for the light and, more importantly, those paths aren’t even the same length. This means that the time the beam takes to go from the laser to the mirror to the detector must also be different for you and Amber so that you both agree on the speed of light.
This phenomenon is known as time dilation, where the time on a ship moving very quickly appears to pass slower than on Earth.
As strange as it seems, this example (and many others) demonstrates that in Einstein’s theory of relativity, space and time are intimately linked together. If you apply Lorentz transformation equations, they work out so that the speed of light is perfectly consistent for both observers.
NOTE: Above information has been taken from wikipedia and/or official websites of topics.