Let an observer (2) be positioned on one side of a rod of length [tex]l_0[/tex] in his rest frame. Let (1) be another observer relative to whom (2) is moving to the left with velocity [tex]v[/tex]. Their initial configuration is shown below in (1)'s frame.
(3)...[tex]l[/tex]...(2)
(1)
the rod is moving leftwards.
Let the length of the rod be [tex]l[/tex] in (1)'s frame.
[tex]E_1[/tex] : (3) and (1) coincide.
[tex]E_2[/tex] : (2) and (1) coincide.
According to (1), the time between the two events is [tex]\frac{l}{v}[/tex], and the distance is zero. Therefore,
[tex]t_1^2 - x_1^2 = \frac{l^2}{v^2}[/tex]
According to (2), the time between the two events is [tex]\frac{l_0}{v}[/tex], and the distance is [tex]l_0[/tex]. Therefore,
[tex]t_2^2 - x_2 ^2 = \frac{l_0^2}{v^2} - l_0^2[/tex]
Equating the two, we get
[tex]l = l_0\sqrt{1-v^2}[/tex]