Benjamin Crowell · Simple Nature Ch. 10 · CC BY-SA 3.0
The speed of light is the same for all observers. This single fact forces us to abandon absolute time, absolute simultaneity, and the simple addition of velocities. Space and time merge into spacetime. Energy and mass are the same thing: E = mc2.
The postulates
Einstein's two postulates: (1) The laws of physics are the same in all inertial frames. (2) The speed of light in vacuum is the same for all observers, regardless of their motion. Everything else in special relativity follows from these two statements.
Scheme
; The Lorentz factor: gamma = 1 / sqrt(1 - v^2/c^2); This factor appears everywhere in special relativity.; gamma >= 1 always. gamma -> infinity as v -> c.
(define c 3e8) ; m/s
(define (gamma v)
(/ 1 (sqrt (- 1 (/ (* v v) (* c c))))))
(define (beta v) (/ v c))
; gamma at various speeds
(display "v = 0: gamma = ") (display (gamma 0)) (newline)
(display "v = 0.1c: gamma = ") (display (gamma (* 0.1 c))) (newline)
(display "v = 0.5c: gamma = ") (display (gamma (* 0.5 c))) (newline)
(display "v = 0.9c: gamma = ") (display (gamma (* 0.9 c))) (newline)
(display "v = 0.99c: gamma = ") (display (gamma (* 0.99 c))) (newline)
(display "v = 0.999c: gamma = ") (display (gamma (* 0.999 c)))
Python
importmath
c = 3e8def gamma(v):
return1 / math.sqrt(1 - (v/c)**2)
for frac in [0, 0.1, 0.5, 0.9, 0.99, 0.999]:
v = frac * c
print(f"v = {frac}c: gamma = {gamma(v):.4f}")
Time dilation and length contraction
Time dilation: a moving clock runs slow by a factor of gamma. If a muon lives 2.2 microseconds in its rest frame, it lives gamma * 2.2 microseconds in ours. Length contraction: a moving object is shortened in the direction of motion by a factor of gamma. These are not illusions. They are real, measurable effects.
Scheme
; Time dilation: delta_t = gamma * delta_t0; Length contraction: L = L0 / gamma
(define c 3e8)
(define (gamma v) (/ 1 (sqrt (- 1 (/ (* v v) (* c c))))))
; Muon example: rest-frame lifetime = 2.2 microseconds
(define tau0 2.2e-6) ; seconds
(define v-muon (* 0.998 c))
(define g (gamma v-muon))
(define tau (* g tau0))
(display "Muon at 0.998c:") (newline)
(display " gamma = ") (display g) (newline)
(display " rest lifetime = ") (display (* tau0 1e6)) (display " us") (newline)
(display " dilated lifetime = ") (display (* tau 1e6)) (display " us") (newline)
; Distance traveled in lab frame
(define d (* v-muon tau))
(display " distance in lab = ") (display d) (display " m") (newline)
; Length contraction: the atmosphere is thinner in muon's frame
(define L0 d)
(define L (/ L0 g))
(display " atmosphere in muon frame = ") (display L) (display " m")
Lorentz transformations
The Lorentz transformation maps coordinates from one inertial frame to another. It replaces the Galilean transformation (x' = x - vt) with one that mixes space and time: x' = gamma * (x - v*t), t' = gamma * (t - v*x/c^2). This mixing is why simultaneity is relative.
Scheme
; Lorentz transformation (1D):; x' = gamma * (x - v*t); t' = gamma * (t - v*x/c^2)
(define c 3e8)
(define (gamma v) (/ 1 (sqrt (- 1 (/ (* v v) (* c c))))))
(define (lorentz-x x t v)
(let ((g (gamma v)))
(* g (- x (* v t)))))
(define (lorentz-t x t v)
(let ((g (gamma v)))
(* g (- t (/ (* v x) (* c c))))))
; Spaceship at v = 0.6c; Event: x = 1e9 m, t = 2 s in lab frame
(define v (* 0.6 c))
(define x 1e9)
(define t 2.0)
(display "Lab frame: x = ") (display x) (display " m, t = ")
(display t) (display " s") (newline)
(define xp (lorentz-x x t v))
(define tp (lorentz-t x t v))
(display "Ship frame: x' = ") (display xp) (display " m, t' = ")
(display tp) (display " s")
E = mc2
The total energy of an object is E = gamma * m * c^2. At rest (gamma = 1), this is just E = mc^2: mass itself is a form of energy. The kinetic energy is (gamma - 1) * mc^2. At low speeds this reduces to (1/2)mv^2. At high speeds the energy diverges, which is why massive objects cannot reach the speed of light.
Scheme
; E = gamma * m * c^2 (total energy); KE = (gamma - 1) * m * c^2; At low v, KE ~ (1/2) m v^2
(define c 3e8)
(define (gamma v) (/ 1 (sqrt (- 1 (/ (* v v) (* c c))))))
(define (relativistic-KE m v)
(* (- (gamma v) 1) m c c))
(define (classical-KE m v)
(* 0.5 m v v))
; 1 kg at various speeds
(define m 1.0)
(display "KE comparison (1 kg):") (newline)
(display "v/c Relativistic Classical Ratio") (newline)
(define (compare frac)
(let* ((v (* frac c))
(KE-rel (relativistic-KE m v))
(KE-cls (classical-KE m v)))
(display frac) (display "c ")
(display KE-rel) (display " ")
(display KE-cls) (display " ")
(display (/ KE-rel KE-cls)) (newline)))
(for-each compare (list 0.010.10.50.9))
; Rest energy of 1 kg
(display "Rest energy of 1 kg: ")
(display (* m c c)) (display " J")
We use natural units informally (v as a fraction of c) but compute in SI. The Lorentz transformation here is the standard 1+1 dimensional form (one space dimension plus time). The full 3+1 form involves velocity in an arbitrary direction and is more complex. Crowell develops the four-vector formalism. Our muon example uses real experimental parameters: cosmic-ray muons do reach the ground precisely because of time dilation.