Lesson 6 of 15

The Lorentz Transformation

The Lorentz Transformation

The Lorentz transformation is the relativistic replacement for the Galilean transformation. It tells you how to convert spacetime coordinates (x,t)(x, t) measured in frame SS into coordinates (x,t)(x', t') measured in frame SS', where SS' moves at velocity vv along the xx-axis relative to SS:

x=γ(xvt),t=γ ⁣(tvxc2)x' = \gamma(x - vt), \quad t' = \gamma\!\left(t - \frac{vx}{c^2}\right)

The factor γ=1/1v2/c2\gamma = 1/\sqrt{1-v^2/c^2} appears in both equations — space and time are mixed together. This is the mathematical heart of special relativity: there is no absolute time, only spacetime.

The Inverse Transformation

To go back from SS' to SS, replace vv with v-v (the primed frame moves at +v+v relative to SS, so SS moves at v-v relative to SS'):

x=γ(x+vt),t=γ ⁣(t+vxc2)x = \gamma(x' + vt'), \quad t = \gamma\!\left(t' + \frac{vx'}{c^2}\right)

Key Example (v = 0.6c, γ = 1.25)

Consider an event at x=3cx = 3c m, t=5t = 5 s. In the moving frame:

x=1.25×(3c0.6c×5)=1.25×0=0x' = 1.25 \times (3c - 0.6c \times 5) = 1.25 \times 0 = 0 t=1.25×(50.6×3cc2)=1.25×3.2=4.0 st' = 1.25 \times \left(5 - \frac{0.6 \times 3c}{c^2}\right) = 1.25 \times 3.2 = 4.0 \text{ s}

The spatial separation vanishes in the moving frame — both events happen at the same location.

Your Task

Implement lorentz_x(x, t, v) returning the transformed position xx', and lorentz_t(x, t, v) returning the transformed time tt'. Use c=299792458.0c = 299792458.0 m/s defined inside each function.

Python runtime loading...
Loading...
Click "Run" to execute your code.