Proofs in Physics

Deriving Special Relativity

From two postulates to the Lorentz transformations, time dilation, length contraction, and $E = mc^2$

In 1905, Albert Einstein published "On the Electrodynamics of Moving Bodies," which derived the entire theory of special relativity from just two postulates. What follows is that derivation — every result flows logically from those two starting assumptions and algebra. No differential geometry is needed. This is the relativity you can derive with the math you're learning right now.

1. The Two Postulates

Everything in special relativity follows from exactly two assumptions:

Postulate 1 — The Principle of Relativity
The laws of physics are the same in all inertial (non-accelerating) reference frames.

No experiment performed inside a sealed, smoothly-moving train can tell you whether the train is moving or stationary. There is no "absolute rest" — only relative motion between observers.

Postulate 2 — The Invariance of the Speed of Light
The speed of light in vacuum, $c = 2.998 \times 10^8$ m/s, is the same for all observers, regardless of the motion of the source or the observer.

This is the radical one. In everyday experience, velocities add: if you throw a ball at 20 m/s from a train moving at 30 m/s, a person on the ground sees the ball at 50 m/s. But light doesn't work this way. If you shine a flashlight from that train, the ground observer still measures the light at $c$ — not $c + 30$.

Einstein's genius was accepting this experimentally verified fact (the Michelson-Morley experiment) and asking: if the speed of light is the same for everyone, what else must be true? The answer: space and time themselves must be different for different observers.

2. The Light Clock Thought Experiment

Imagine a "clock" made of two mirrors facing each other, with a pulse of light bouncing between them. Each round trip = one "tick." This is a light clock.

Observer A is riding with the clock. She sees the light go straight up and down. If the mirrors are separated by distance $d$, the time for one tick is:

$$\Delta t_0 = \frac{2d}{c}$$

We call $\Delta t_0$ the proper time — the time measured by the observer at rest relative to the clock.

Observer B is standing on the ground watching the clock fly past at velocity $v$. He sees the light travel a diagonal path — it goes up and to the right, then down and to the right — because the clock is moving horizontally while the light bounces vertically.

The diagonal path is longer than the vertical path. But Postulate 2 says the light still travels at speed $c$. So if the path is longer but the speed is the same, the time must be longer. This is time dilation — and we can derive exactly how much longer using the Pythagorean theorem.

3. Deriving Time Dilation
Step 1 — Set up the geometry

During one half-tick (light goes from bottom mirror to top), Observer B sees the clock move horizontally by $\frac{v \Delta t}{2}$, while the light travels the diagonal distance $\frac{c \Delta t}{2}$, reaching a mirror at height $d$.

This forms a right triangle with:

$$\text{hypotenuse} = \frac{c\Delta t}{2} \qquad \text{vertical leg} = d \qquad \text{horizontal leg} = \frac{v\Delta t}{2}$$
Step 2 — Apply the Pythagorean theorem
$$\left(\frac{c\Delta t}{2}\right)^2 = d^2 + \left(\frac{v\Delta t}{2}\right)^2$$
Step 3 — Substitute $d = \frac{c\Delta t_0}{2}$

From Observer A's measurement, $d = \frac{c\Delta t_0}{2}$:

$$\frac{c^2\Delta t^2}{4} = \frac{c^2\Delta t_0^2}{4} + \frac{v^2\Delta t^2}{4}$$
Step 4 — Multiply everything by 4
$$c^2\Delta t^2 = c^2\Delta t_0^2 + v^2\Delta t^2$$
Step 5 — Collect $\Delta t^2$ terms on one side
$$c^2\Delta t^2 - v^2\Delta t^2 = c^2\Delta t_0^2$$
$$\Delta t^2(c^2 - v^2) = c^2\Delta t_0^2$$
Step 6 — Solve for $\Delta t$
$$\Delta t^2 = \frac{c^2\Delta t_0^2}{c^2 - v^2} = \frac{\Delta t_0^2}{1 - v^2/c^2}$$
$$\Delta t = \frac{\Delta t_0}{\sqrt{1 - v^2/c^2}}$$
Step 7 — Define the Lorentz factor

We give the recurring expression a name:

$$\gamma = \frac{1}{\sqrt{1 - v^2/c^2}} = \frac{1}{\sqrt{1 - \beta^2}} \qquad \text{where } \beta = \frac{v}{c}$$
Result — Time Dilation
$$\boxed{\Delta t = \gamma\,\Delta t_0}$$

Moving clocks run slow. An observer watching a moving clock sees it tick slower by a factor of $\gamma$. At everyday speeds $\gamma \approx 1$ and the effect is negligible. At $v = 0.9c$, $\gamma = 2.29$ — the moving clock ticks at less than half the rate.

c = 2.998e8;
v = 0.9*c;
gamma = 1/sqrt(1 - (v/c)^2);       % 2.294
dt0 = 1;                            % 1 second proper time
dt = gamma*dt0;                      % 2.294 seconds observed
What was the math?

Pythagorean theorem + algebra (isolating a variable, factoring, square roots). That's it. The most revolutionary result in modern physics came from geometry you learned in middle school, applied to a clever thought experiment.

4. Deriving Length Contraction

Consider a rod of proper length $L_0$ (measured at rest). An observer moving at velocity $v$ relative to the rod measures its length by timing how long it takes the rod to pass a fixed point, then computing $L = v \Delta t$.

Step 1 — The rest observer's measurement

For the observer at rest with the rod, the moving observer takes time $\Delta t_0$ to pass the rod:

$$L_0 = v\Delta t_0$$
Step 2 — The moving observer's measurement

The moving observer measures a different time $\Delta t$ for the rod to pass. But time dilation tells us $\Delta t_0 = \gamma\Delta t$ (the moving observer's clock runs slow from the rest frame's perspective):

$$L = v\Delta t = v\cdot\frac{\Delta t_0}{\gamma} = \frac{v\Delta t_0}{\gamma} = \frac{L_0}{\gamma}$$
Result — Length Contraction
$$\boxed{L = \frac{L_0}{\gamma} = L_0\sqrt{1 - v^2/c^2}}$$

Moving objects are shortened in the direction of motion. At $v = 0.9c$, an object is compressed to $44\%$ of its rest length. At $v = 0.99c$, it's just $14\%$. The contraction is only along the direction of motion — perpendicular dimensions are unchanged.

L0 = 100;                            % 100 m rest length
v = 0.9*c;
gamma = 1/sqrt(1-(v/c)^2);
L = L0/gamma;                        % 43.6 m observed
5. Deriving the Lorentz Transformations

Time dilation and length contraction are special cases. The Lorentz transformations are the general equations that convert any event's coordinates $(x, y, z, t)$ in one frame to $(x', y', z', t')$ in another frame moving at velocity $v$ along the $x$-axis.

Step 1 — Start with the Galilean transformation

In Newtonian physics, the transformation is simple:

$$x' = x - vt \qquad t' = t$$

But this violates Postulate 2 — it predicts that light speed changes between frames. We need a correction.

Step 2 — Assume linearity

The transformation must be linear (to preserve straight-line motion and the homogeneity of spacetime). Assume:

$$x' = \gamma(x - vt) \qquad t' = \gamma\!\left(t - \frac{vx}{c^2}\right)$$

We need to show that $\gamma = \frac{1}{\sqrt{1-v^2/c^2}}$ and that the $vx/c^2$ term in $t'$ is required.

Step 3 — Enforce Postulate 2

A light pulse emitted at the origin at $t = 0$ must satisfy $x = ct$ in frame $S$ and $x' = ct'$ in frame $S'$. Substitute:

$$ct' = \gamma(ct - vt) = \gamma t(c - v)$$
$$ct' = c\gamma\!\left(t - \frac{vt \cdot c}{c^2}\right) \;?\; \text{No — use } x = ct:$$
$$t' = \gamma\!\left(t - \frac{v(ct)}{c^2}\right) = \gamma t\!\left(1 - \frac{v}{c}\right)$$

Then $x' = ct'$ gives:

$$\gamma t(c-v) = c\gamma t\!\left(1 - \frac{v}{c}\right) = \gamma t(c - v) \quad \checkmark$$

This is consistent. Now consider light going in the $-x$ direction ($x = -ct$):

$$x' = \gamma(-ct - vt) = -\gamma t(c+v)$$
$$t' = \gamma\!\left(t - \frac{v(-ct)}{c^2}\right) = \gamma t\!\left(1+\frac{v}{c}\right)$$

For $x' = -ct'$: $-\gamma t(c+v) = -c\gamma t\!\left(1+\frac{v}{c}\right) = -\gamma t(c+v)$ $\checkmark$

Step 4 — Find $\gamma$ from the inverse transformation

By Postulate 1 (symmetry between frames), the inverse transformation has the same form with $v \to -v$:

$$x = \gamma(x' + vt') \qquad t = \gamma\!\left(t' + \frac{vx'}{c^2}\right)$$

Substitute the forward transformations into the inverse and require $x = x$. After algebra:

$$x = \gamma\!\left[\gamma(x-vt) + v\gamma\!\left(t - \frac{vx}{c^2}\right)\right] = \gamma^2\!\left[x - vt + vt - \frac{v^2x}{c^2}\right] = \gamma^2 x\!\left(1 - \frac{v^2}{c^2}\right)$$

For this to equal $x$:

$$\gamma^2\!\left(1 - \frac{v^2}{c^2}\right) = 1 \qquad \Rightarrow \qquad \gamma = \frac{1}{\sqrt{1 - v^2/c^2}}$$
Result — The Lorentz Transformations
$$\boxed{x' = \gamma(x - vt) \qquad t' = \gamma\!\left(t - \frac{vx}{c^2}\right)}$$
$$\boxed{y' = y \qquad z' = z}$$

Inverse:

$$x = \gamma(x' + vt') \qquad t = \gamma\!\left(t' + \frac{vx'}{c^2}\right)$$

LaTeX: x' = \gamma(x - vt) \qquad t' = \gamma\!\left(t - \frac{vx}{c^2}\right)

% Lorentz transformation for an event
c = 1;  % natural units (c = 1)
v = 0.6; gamma = 1/sqrt(1-v^2);
x = 10; t = 8;
xp = gamma*(x - v*t);                % x' = 7.5
tp = gamma*(t - v*x);                % t' = 2.5
The key insight

The $-vx/c^2$ term in the time transformation is what makes relativity fundamentally different from Newtonian physics. It says that time itself depends on where you are in space. Two events that are simultaneous in one frame ($t_1 = t_2$) are generally not simultaneous in another frame. This is the relativity of simultaneity — the deepest conceptual consequence of Special Relativity.

6. Relativistic Velocity Addition

If an object moves at velocity $u'$ in frame $S'$, and $S'$ moves at velocity $v$ relative to $S$, what velocity $u$ does an observer in $S$ measure?

Derivation

From the Lorentz transformations: $dx = \gamma(dx' + v\,dt')$ and $dt = \gamma(dt' + v\,dx'/c^2)$.

Divide:

$$u = \frac{dx}{dt} = \frac{dx' + v\,dt'}{dt' + v\,dx'/c^2} = \frac{u' + v}{1 + u'v/c^2}$$
Result — Velocity Addition
$$\boxed{u = \frac{u' + v}{1 + u'v/c^2}}$$

At low speeds ($u', v \ll c$), the denominator $\approx 1$ and this reduces to the Galilean $u = u' + v$. But at high speeds, the denominator prevents the result from ever exceeding $c$. If $u' = c$ (a light beam), then $u = \frac{c + v}{1 + v/c} = c$ — light speed is invariant, as required by Postulate 2.

c = 2.998e8;
u_prime = 0.8*c;  v = 0.6*c;
% Galilean (wrong at high speed):
u_galilean = u_prime + v;              % 1.4c — impossible!
% Relativistic (correct):
u = (u_prime + v)/(1 + u_prime*v/c^2); % 0.946c — always < c
7. Relativistic Momentum

Newton's momentum $p = mv$ doesn't conserve in collisions when analyzed from different relativistic frames. The fix: replace $m$ with $\gamma m$.

Motivation

Consider a symmetric collision analyzed from a frame where one particle is fast and one is slow. If we use $p = mv$, momentum isn't conserved after Lorentz-transforming to a different frame. To preserve conservation of momentum (a fundamental law) across all inertial frames, we must modify the definition:

$$p = \gamma mv = \frac{mv}{\sqrt{1 - v^2/c^2}}$$
Result — Relativistic Momentum
$$\boxed{\mathbf{p} = \gamma m\mathbf{v}}$$

At low speeds, $\gamma \approx 1$ and $p \approx mv$ (Newtonian). As $v \to c$, $\gamma \to \infty$ and $p \to \infty$. This is why you can't accelerate a massive object to $c$ — it would require infinite momentum, which requires infinite energy.

8. Deriving $E = mc^2$

This is perhaps the most famous equation in science. It follows from Newton's second law (in its momentum form) combined with relativistic momentum.

Step 1 — Start with the work-energy theorem

The kinetic energy gained by a particle equals the work done on it:

$$KE = \int_0^x F\,dx = \int_0^x \frac{dp}{dt}\,dx = \int_0^p v\,dp$$

(We used $F = dp/dt$ and $dx = v\,dt$, so $F\,dx = v\,dp$.)

Step 2 — Express $v\,dp$ in terms of $v$

From $p = \gamma mv = \frac{mv}{\sqrt{1-v^2/c^2}}$, differentiate (by parts/quotient rule):

$$dp = \frac{m}{(1-v^2/c^2)^{3/2}}\,dv = m\gamma^3\,dv$$

So $v\,dp = m\gamma^3 v\,dv$.

Step 3 — Integrate from 0 to $v$
$$KE = \int_0^v \frac{mv}{(1-v^2/c^2)^{3/2}}\,dv$$

Use substitution $u = 1 - v^2/c^2$, $du = -2v\,dv/c^2$:

$$KE = \frac{mc^2}{2}\int_1^{1-v^2/c^2} u^{-3/2}(-du) = mc^2\left[\frac{1}{\sqrt{1-v^2/c^2}} - 1\right]$$
Step 4 — Simplify
$$KE = \gamma mc^2 - mc^2 = (\gamma - 1)mc^2$$
Step 5 — Define total energy

The total energy $E$ is kinetic energy plus a "rest energy" term that exists even when $v = 0$:

$$E = KE + mc^2 = \gamma mc^2$$

When $v = 0$, $\gamma = 1$, so:

Result — Mass–Energy Equivalence
$$\boxed{E_0 = mc^2}$$

A particle at rest has energy $mc^2$. Mass is a form of energy. A small amount of mass corresponds to an enormous amount of energy because $c^2 \approx 9 \times 10^{16}$ m²/s² is a huge number.

$$\boxed{E = \gamma mc^2} \qquad \boxed{KE = (\gamma - 1)mc^2}$$
m = 1;  c = 2.998e8;
E_rest = m*c^2;                       % 8.99e16 J from 1 kg
% That's ~21.5 megatons of TNT equivalent

% Verify KE reduces to classical at low speed
v = 100;  % 100 m/s (slow)
gamma = 1/sqrt(1-(v/c)^2);
KE_rel = (gamma-1)*m*c^2;             % ≈ 5000 J
KE_classical = 0.5*m*v^2;             % 5000 J — they agree!
The classical limit

At low speeds, $\gamma \approx 1 + \frac{1}{2}\frac{v^2}{c^2}$ (binomial approximation). Then $KE = (\gamma - 1)mc^2 \approx \frac{1}{2}\frac{v^2}{c^2} \cdot mc^2 = \frac{1}{2}mv^2$. Newton's kinetic energy formula is a low-speed approximation of Einstein's.

9. The Energy–Momentum Relation
Derivation

From $E = \gamma mc^2$ and $p = \gamma mv$:

$$E^2 = \gamma^2 m^2 c^4 \qquad p^2c^2 = \gamma^2 m^2 v^2 c^2$$

Subtract:

$$E^2 - p^2c^2 = \gamma^2 m^2 c^2(c^2 - v^2) = \frac{m^2c^2(c^2-v^2)}{1-v^2/c^2} = \frac{m^2c^4(1-v^2/c^2)}{1-v^2/c^2} = m^2c^4$$
Result — Energy–Momentum Relation
$$\boxed{E^2 = (pc)^2 + (mc^2)^2}$$

This is the "full" version of $E = mc^2$. For a particle at rest ($p = 0$): $E = mc^2$. For a massless particle like a photon ($m = 0$): $E = pc$. This single equation contains both cases.

This is also a Pythagorean relationship — total energy, momentum, and rest energy form a right triangle in energy-momentum space.

10. Spacetime Interval & Minkowski Geometry

In Euclidean geometry, the distance between two points is invariant under rotations: $d^2 = \Delta x^2 + \Delta y^2 + \Delta z^2$. In special relativity, there's an analogous invariant — the spacetime interval:

Result — Spacetime Interval
$$\boxed{s^2 = -(c\Delta t)^2 + \Delta x^2 + \Delta y^2 + \Delta z^2}$$

Or equivalently (with opposite sign convention): $s^2 = (c\Delta t)^2 - \Delta x^2 - \Delta y^2 - \Delta z^2$

This quantity is the same for all inertial observers. You can verify this by substituting the Lorentz transformations — the $s^2$ you compute in frame $S$ equals the $s'^2$ computed in frame $S'$.

The minus sign is what makes spacetime geometry fundamentally different from Euclidean geometry. It creates three categories of separation:

This geometry — flat spacetime with a $(-,+,+,+)$ signature — is called Minkowski spacetime. It is the arena of special relativity. General relativity will generalize this to curved spacetime, where $s^2$ is computed using the metric tensor $g_{\mu\nu}$.

% Check invariance of spacetime interval under Lorentz transformation
c = 1; v = 0.6; gamma = 1/sqrt(1-v^2);
% Event in frame S:
x = 5; t = 3;
s2 = -(c*t)^2 + x^2;                  % s² = 16

% Transform to S':
xp = gamma*(x - v*t);
tp = gamma*(t - v*x/c^2);
s2p = -(c*tp)^2 + xp^2;               % s² = 16  ✓ same!
11. MATLAB Explorations
%% === Lorentz factor vs velocity ===
c = 1;
v = linspace(0, 0.999, 1000);
gamma = 1./sqrt(1 - v.^2/c^2);
figure; plot(v, gamma, 'LineWidth', 2);
xlabel('v/c'); ylabel('\gamma');
title('Lorentz Factor'); grid on;
ylim([0 25]);

%% === Time dilation — muon example ===
% Muons created in upper atmosphere: rest half-life = 2.2 µs
% They travel at 0.998c. Do they reach the ground?
c_real = 2.998e8;
v_muon = 0.998*c_real;
gamma_muon = 1/sqrt(1-(v_muon/c_real)^2);   % 15.82
t_rest = 2.2e-6;                              % 2.2 µs rest frame
t_observed = gamma_muon * t_rest;             % 34.8 µs in Earth frame
d = v_muon * t_observed;                      % 10.4 km — reaches ground!
% Without relativity: d_classical = v_muon * t_rest = 658 m (wouldn't reach)

%% === E = mc² — energy content of everyday objects ===
m = 0.001;  % 1 gram
c_real = 2.998e8;
E = m * c_real^2;                             % 8.99e13 J
E_kWh = E / 3.6e6;                           % 24.97 million kWh
fprintf('1 gram = %.2f million kWh\n', E_kWh/1e6);

%% === Relativistic addition: can you exceed c? ===
v1 = 0.9; v2 = 0.9;  % both in units of c
u_galilean = v1 + v2;                         % 1.8c (impossible)
u_einstein = (v1+v2)/(1+v1*v2);              % 0.994c (always < 1)
fprintf('Galilean: %.2fc, Einstein: %.4fc\n', u_galilean, u_einstein);
What we proved

Starting from just two postulates and the Pythagorean theorem, we derived:

  1. Time dilation: $\Delta t = \gamma\Delta t_0$
  2. Length contraction: $L = L_0/\gamma$
  3. The Lorentz transformations: $x' = \gamma(x-vt)$, $t' = \gamma(t-vx/c^2)$
  4. Relativistic velocity addition: $u = (u'+v)/(1+u'v/c^2)$
  5. Relativistic momentum: $p = \gamma mv$
  6. Mass-energy equivalence: $E = mc^2$
  7. The energy-momentum relation: $E^2 = (pc)^2 + (mc^2)^2$
  8. The spacetime interval: $s^2 = -(c\Delta t)^2 + \Delta x^2 + \Delta y^2 + \Delta z^2$

Every one of these results is experimentally confirmed to extraordinary precision. GPS satellites correct for time dilation every day. Particle accelerators routinely observe relativistic momentum. Nuclear reactors convert mass to energy via $E = mc^2$.

Special Relativity tells us what happens in flat spacetime (no gravity). General Relativity — the subject of the companion document — asks: what happens when spacetime is curved?