Relativity tells us moving objects will have different lengths in the direction of motion, depending on the frame of reference of the observer. This is known as length contraction.
This type of problem can be reduced to two different frames of reference. One is the frame of reference where a static observer is observing the moving object as it passes by. The other frame of reference is riding along with the moving object. The length of the moving object can be calculated using the Lorentz transformation.
where
LM is the length in the moving frame of reference
LS is the length observed in the stationary frame of reference
v is the velocity of the moving object
c is the speed of light
Length Contraction Example Problem
How fast would a meter stick have to move to appear half its length to a stationary observer?
In the above illustration, the top meter stick is measured as it zips by at velocity v. Both meter sticks are the same length (1 meter) in their own frame of reference, but the moving one appears to only be 50 cm long to the stationary observer. Use the Lorentz transformation contraction formula to find out the value of v.
LM is the length in the moving frame of reference. In the moving frame of reference, the meter stick is 1 meter long.
LS is the measured length from the stationary frame of reference. In this case, it is ½LM.
Plug these two values into the equation

Divide both sides by LM.

Cancel out the LM to get

Square both sides to get rid of the square root

Subtract 1 from both sides



Multiply both sides by c2

Take the square root of both sides
or
v = 0.866c or 86.6% the speed of light.
Answer
The ruler is moving 0.866c or 86.6% the speed of light.
Note the moving frame of reference must be moving rather quickly to show any measurable effect. If you follow the same steps as above, you can see the ruler needs to be traveling at 0.045c or 4.5% the speed of light to change the length by a millimeter.
Note too that the meter stick only changes its length in the direction of the movement. The vertical and depth dimensions do not change. Both rulers are as tall and thick in both frames of reference.