The ground frame labels an event with a where and a when, . A frame moving to the right at speed labels the same event . The formulas joining the two pairs are called a coordinate transformation.
If clocks and rulers are shared by the two frames, the moving frame's origin is to the right at time , so and . This is the Galilean transformation.
The lower ruler in the figure belongs to the moving frame. For the same event, the read on the upper ruler and the read on the lower one differ by .
Take light travelling as in the ground frame and translate it into the moving frame with the Galilean transformation.
You get , so the speed of light in the moving frame is . This contradicts the constancy of the speed of light.
In the figure, the larger is, the more the transformed path of light tips away from degrees. To keep the speed of light fixed, it is the transformation with shared clocks and rulers that has to go.
The new transformation must meet three conditions: uniform motion stays uniform in every frame, the path of light stays the path of light in every frame, and swapping the two frames gives the same form.
The first condition makes the transformation linear. The moving frame's origin sits at in the ground frame, so it can be written .
By the third condition, the reverse is , with replaced by and the same .
For the second condition, put and into the two equations: and . Multiply them together and divide by .
So : the coefficient of the transformation is the Lorentz factor itself.
The position equation is . For the time equation, put into the reverse equation and solve for :
The solution uses . The reverse pair, with replaced by , is and .
The time equation contains the position . Two events simultaneous in the ground frame (the same ) have different if their differs; the relativity of simultaneity comes from this term.
When is much smaller than , and , and the Galilean transformation returns.
Put into the finished transformation: and . Dividing gives , so light travels at in every frame.
On a spacetime diagram, the moving frame's two axes approach the path of light equally from either side, and the path of light stays at degrees. The figure tilts the axes for changing ; however far they tilt, they never cross the path of light.
Time dilation follows from this transformation too. For a clock at rest in the moving frame (), one tick becomes in the ground frame, by the reverse equation.