Theory of Relativity
Prerequisites & Foundations
Math, classical mechanics & electromagnetism basicsCrisis of Classical Physics
Why relativity was neededSpecial Relativity
Physics at high speedsSpacetime & Geometry
Minkowski spacetime and diagramsGeneral Relativity
Gravity as curved spacetimeCosmology
Relativity at universe scaleExperimental Verification
Evidence and real-world testsMathematical Relativity
Tensors and differential geometryAdvanced Topics & Frontiers
Quantum gravity, wormholes & beyondApplications of Relativity
GPS, astrophysics & technologyMinkowski Spacetime
In 1908, Hermann Minkowski — Einstein's former mathematics professor — delivered a famous lecture that began: "Henceforth space by itself, and time by itself, are doomed to fade away into mere shadows, and only a kind of union of the two will preserve an independent reality."
This was not poetry — it was a precise mathematical statement. Minkowski realized that the Lorentz transformations of special relativity are simply rotations in a 4-dimensional space, just as ordinary rotations mix x and y coordinates in 2D. The "rotation" in spacetime mixes space and time coordinates.
Minkowski's Geometric Insight
Think about how a regular rotation works. If you rotate your coordinate axes by an angle θ, the x and y values of a point change, but the distance from the origin doesn't:
Minkowski's breakthrough was recognizing that the Lorentz transformation preserves an analogous quantity — not a sum of squares, but a difference:
This minus sign is everything. It's what makes spacetime fundamentally different from ordinary 4D Euclidean space, and it encodes all the strange effects of special relativity — time dilation, length contraction, and the impossibility of exceeding light speed.
The Four Dimensions
In Minkowski spacetime, every event is specified by four coordinates:
We use ct rather than just t so that all four coordinates have dimensions of length. The index μ runs from 0 to 3 — a convention in relativity where 0 is always the time component.
The geometry of this space is defined by the Minkowski metric:
This metric tells us how to compute "distances" (intervals) in spacetime. The signature (+, −, −, −) is called the mostly-minus convention (some textbooks use the opposite sign convention — both are valid).
flowchart LR
subgraph Newton["Newtonian View"]
A["3D Space
(x, y, z)"]
B["Absolute Time
(t)"]
end
subgraph Minkowski["Minkowski View"]
C["4D Spacetime
(ct, x, y, z)"]
D["Metric η_μν
(+1, -1, -1, -1)"]
C --> D
end
Newton -->|"Unification
via Lorentz
symmetry"| Minkowski
D --> E["Invariant Interval
ds² = c²dt² - dx² - dy² - dz²"]
E --> F["All of Special
Relativity follows"]
Spacetime Diagrams
A spacetime diagram is the physicist's map of reality. Instead of plotting position vs. position (like a road map), we plot time vs. position — specifically, ct on the vertical axis and x on the horizontal axis. Every point on this diagram represents an event — something happening at a specific place and time.
Worldlines
A particle's history through spacetime traces out a curve called its worldline. Different types of motion produce different worldlines:
- At rest: a vertical line (time passes, position doesn't change)
- Constant velocity: a straight line tilted from vertical (the faster the motion, the more tilted toward horizontal)
- Accelerating: a curved line
- Light: a line at exactly 45° (since the axes are ct and x, light travels 1 unit of x per 1 unit of ct)
import numpy as np
import matplotlib.pyplot as plt
# Create a spacetime diagram showing different worldlines
fig, ax = plt.subplots(1, 1, figsize=(8, 8))
# Time axis (ct)
t = np.linspace(0, 5, 100)
# Light rays (45-degree lines) - the light cone
ax.plot(t, t, 'y--', linewidth=2, label='Light ray (v=c)')
ax.plot(-t, t, 'y--', linewidth=2)
# Fill light cone regions
ax.fill_between(t, t, 5, alpha=0.05, color='yellow')
ax.fill_between(-t, t, 5, alpha=0.05, color='yellow')
# Worldline 1: Object at rest (vertical line)
ax.plot([0]*100, t, 'b-', linewidth=2.5, label='At rest (v=0)')
# Worldline 2: Object moving at 0.3c
ax.plot(0.3*t, t, 'g-', linewidth=2.5, label='v = 0.3c')
# Worldline 3: Object moving at 0.7c
ax.plot(0.7*t, t, 'r-', linewidth=2.5, label='v = 0.7c')
# Worldline 4: Accelerating object (hyperbolic motion)
a = 0.5 # proper acceleration parameter
t_acc = np.linspace(0, 5, 100)
x_acc = (1/a) * (np.sqrt(1 + (a*t_acc)**2) - 1)
ax.plot(x_acc, t_acc, 'm-', linewidth=2.5, label='Accelerating')
# Formatting
ax.set_xlabel('Position x (light-units)', fontsize=12)
ax.set_ylabel('Time ct (light-units)', fontsize=12)
ax.set_title('Spacetime Diagram: Worldlines', fontsize=14, fontweight='bold')
ax.set_xlim(-5, 5)
ax.set_ylim(0, 5)
ax.legend(loc='upper left', fontsize=10)
ax.set_aspect('equal')
ax.grid(True, alpha=0.3)
ax.axhline(y=0, color='k', linewidth=0.5)
ax.axvline(x=0, color='k', linewidth=0.5)
# Annotate
ax.annotate('FUTURE\nlight cone', xy=(2.5, 3.5), fontsize=9, ha='center', color='orange')
ax.annotate('Forbidden\n(v > c)', xy=(4, 1.5), fontsize=9, ha='center', color='red', style='italic')
plt.tight_layout()
plt.show()
Light Cones
The 45° lines traced by light rays form the light cone at every event. In full 3+1 dimensions, these are actual cones (a circle of light expanding outward in 2D space, sweeping out a cone shape as time advances). On our 1+1 diagram, they appear as crossed diagonal lines.
The light cone divides spacetime into three fundamental regions for any given event:
flowchart TD
E["Event E
(here and now)"]
E --> F["FUTURE Light Cone
Events E can influence
(timelike separated)"]
E --> P["PAST Light Cone
Events that can influence E
(timelike separated)"]
E --> EL["ELSEWHERE
Events with no causal connection to E
(spacelike separated)"]
F --> F1["Reachable by signals
traveling at v ≤ c"]
P --> P1["Could have sent
signals to E at v ≤ c"]
EL --> EL1["No signal can connect
these to E — too far apart
in space, too close in time"]
Causal Structure: Why This Matters
The light cone is not just a mathematical construct — it defines the causal structure of the universe:
- Future light cone: All events that you could possibly influence (by sending a signal at or below the speed of light)
- Past light cone: All events that could have influenced you
- Elsewhere (spacelike): Events that are absolutely disconnected from you — no signal can travel between them. These events happen "too far away" to be causally connected to you.
Adjust worldline velocity to see different causal regions. Use the Lorentz boost slider to see how the diagram transforms to a different reference frame — note the light cone (45° lines) remains invariant!
The Supernova and the Concert
Suppose a supernova explodes in the Andromeda galaxy (2.5 million light-years away) right "now" in your frame. Can it affect your life today? No! The event is in your "elsewhere" — spacelike separated from you. Its light cone doesn't intersect yours for another 2.5 million years.
This is why faster-than-light communication would violate causality — it would allow you to communicate with events in your "elsewhere," potentially sending messages backward in time in some reference frame.
Proper Time
In special relativity, different observers disagree about the time between two events. So what's the "true" time? The answer is proper time — the time measured by a clock that is present at both events (i.e., traveling along the worldline connecting them).
The Proper Time Formula
For an infinitesimal segment of a worldline, the proper time is:
For a particle moving with velocity v:
The total proper time along a worldline from event A to event B is the integral:
This immediately explains the twin paradox: the twin who travels (has higher velocity) accumulates less proper time. The straight worldline (staying at rest) gives the maximum proper time between two events — a counterintuitive "longest path" principle that is the spacetime analog of "a straight line is the shortest distance."
The Clock Hypothesis
The clock hypothesis states that the rate of a clock depends only on its instantaneous velocity, not on its acceleration. This means the proper time formula above applies even to accelerating clocks — you just integrate along the worldline. This hypothesis has been experimentally verified with particle accelerators (where particles experience enormous accelerations) and is a foundation for general relativity.
import numpy as np
# Proper time calculation: Compare different paths through spacetime
# Twin A stays home, Twin B takes a round trip at constant speed
c = 1 # natural units
distance = 4.0 # light-years to destination
print("Proper Time Along Different Worldlines")
print("=" * 55)
print(f"Trip: Earth → Star ({distance} ly away) → Earth")
print()
# For different travel speeds
speeds = [0.3, 0.5, 0.7, 0.8, 0.9, 0.95, 0.99]
print(f"{'Speed (v/c)':<12} {'Earth time':<14} {'Proper time τ':<16} {'τ/t_Earth':<10}")
print("-" * 52)
for v in speeds:
# Earth frame: total time for round trip
t_earth = 2 * distance / v
# Proper time: time experienced by traveler
gamma = 1 / np.sqrt(1 - v**2)
tau = t_earth / gamma # equivalently: t_earth * sqrt(1 - v^2)
ratio = tau / t_earth
print(f"{v:<12.2f} {t_earth:<14.2f} {tau:<16.2f} {ratio:<10.4f}")
print()
print("The faster you go, the LESS proper time you experience.")
print("Proper time is ALWAYS less than or equal to coordinate time.")
print("Equality holds only when v = 0 (staying at rest).")
# Now: what about a more complex path (accelerating)?
print("\n\n--- Comparing Straight vs. Curved Worldlines ---")
print("Both paths connect the same two events (depart & arrive).")
# Event: depart at t=0, arrive back at t=10 years, x=0
T = 10.0 # total coordinate time
# Path 1: Stay at rest (x=0 the whole time)
tau_rest = T # proper time = coordinate time when v=0
print(f"\nPath 1 (stay home): τ = {tau_rest:.2f} years")
# Path 2: Travel out at 0.8c for 5 years, return at 0.8c
v2 = 0.8
tau_travel = T * np.sqrt(1 - v2**2)
print(f"Path 2 (v=0.8c trip): τ = {tau_travel:.2f} years")
# Path 3: Travel out at 0.95c for 5 years, return at 0.95c
v3 = 0.95
tau_fast = T * np.sqrt(1 - v3**2)
print(f"Path 3 (v=0.95c trip): τ = {tau_fast:.2f} years")
print(f"\nThe straight worldline (rest) gives MAXIMUM proper time: {tau_rest:.2f} years")
The Spacetime Interval
The spacetime interval is the fundamental invariant quantity in special relativity — the "distance" in spacetime that all observers agree upon, regardless of their relative motion. It plays the same role that distance plays in Euclidean geometry.
For two events separated by coordinate differences \Delta t, \Delta x, \Delta y, \Delta z:
In differential form (for infinitesimally close events):
The remarkable property: if you compute \Delta s^2 in any inertial frame, you get the same number. An observer moving at 0.9c relative to you will measure different \Delta t and \Delta x, but when they combine them into \Delta s^2, they get exactly what you got.
Three Types of Intervals
Unlike ordinary distance (which is always positive), the spacetime interval can be positive, negative, or zero:
Why the Interval Is Invariant
We can verify invariance directly using the Lorentz transformations. In frame S, two events are separated by (\Delta t, \Delta x). In frame S' moving at velocity v:
Computing \Delta s'^2:
After expanding and simplifying (using \gamma^2 = 1/(1-v^2/c^2)), all cross terms cancel and you recover:
The interval is unchanged! This is analogous to how x^2 + y^2 is invariant under rotations — the Lorentz transformation is a "hyperbolic rotation" in spacetime.
import numpy as np
# Demonstrate spacetime interval invariance under Lorentz transformation
c = 1 # natural units
def lorentz_transform(dt, dx, v):
"""Apply Lorentz transformation for frame moving at velocity v."""
gamma = 1 / np.sqrt(1 - v**2 / c**2)
dt_prime = gamma * (dt - v * dx / c**2)
dx_prime = gamma * (dx - v * dt)
return dt_prime, dx_prime
def spacetime_interval(dt, dx):
"""Compute spacetime interval ds² = c²dt² - dx²."""
return c**2 * dt**2 - dx**2
# Define three events relative to origin
events = [
("Timelike (ds²>0)", 5.0, 3.0), # ct separation > x separation
("Spacelike (ds²<0)", 2.0, 4.0), # x separation > ct separation
("Lightlike (ds²=0)", 3.0, 3.0), # on the light cone
]
# Check interval in multiple frames
frame_velocities = [0, 0.3, 0.6, 0.9, -0.5]
print("Spacetime Interval Invariance Demonstration")
print("=" * 65)
for name, dt, dx in events:
s2_original = spacetime_interval(dt, dx)
print(f"\nEvent: {name}")
print(f" Original frame: Δt={dt:.1f}, Δx={dx:.1f}, Δs²={s2_original:.4f}")
print(f" {'Frame v/c':<12} {'Δt\\':<10} {'Δx\\':<10} {'Δs\\'²':<12} {'Match?'}")
print(f" {'-'*50}")
for v in frame_velocities:
dt_p, dx_p = lorentz_transform(dt, dx, v)
s2_prime = spacetime_interval(dt_p, dx_p)
match = "✓" if abs(s2_prime - s2_original) < 1e-10 else "✗"
print(f" {v:<12.1f} {dt_p:<10.4f} {dx_p:<10.4f} {s2_prime:<12.4f} {match}")
print("\n\nAll intervals match — ds² is INVARIANT under Lorentz boosts!")
print("This is the geometric foundation of special relativity.")
Four-Vectors
Just as 3D physics uses vectors (with three components that transform together under rotations), relativistic physics uses four-vectors — objects with four components that transform together under Lorentz transformations. Four-vectors are the natural "language" of spacetime.
Four-Position
The simplest four-vector is the four-position (or event coordinates):
Under a Lorentz boost along x with velocity v, this transforms as:
where \Lambda is the Lorentz transformation matrix:
where \beta = v/c. The key property of four-vectors: the Minkowski inner product of any two four-vectors is Lorentz-invariant:
Four-Velocity & Four-Momentum
The four-velocity is the derivative of four-position with respect to proper time (not coordinate time!):
Notice that its "magnitude" (Minkowski norm) is always:
Every massive particle moves through spacetime at "speed" c — even when sitting still (it's moving through time!). The four-velocity simply describes how this motion is partitioned between space and time.
The four-momentum is:
Its norm gives the energy-momentum relation:
which rearranges to the famous:
Everything Moves at Speed c Through Spacetime
Here's a profound reframing: every object moves through spacetime at the speed of light. When you're at rest in space, all your "motion" is through time (you age at the maximum rate). As you move faster through space, some of your spacetime "velocity" is redirected from the time direction to the space direction — so time passes more slowly for you.
At v = c (photons), ALL motion is through space and NONE through time. This is why photons don't age — they experience zero proper time!
import numpy as np
# Four-vectors: compute and verify invariant properties
c = 3e8 # m/s
def four_velocity(vx, vy, vz):
"""Compute four-velocity given 3-velocity components."""
v_squared = vx**2 + vy**2 + vz**2
gamma = 1 / np.sqrt(1 - v_squared / c**2)
return np.array([gamma * c, gamma * vx, gamma * vy, gamma * vz])
def minkowski_dot(A, B):
"""Compute Minkowski inner product: A·B = A⁰B⁰ - A¹B¹ - A²B² - A³B³."""
return A[0]*B[0] - A[1]*B[1] - A[2]*B[2] - A[3]*B[3]
def four_momentum(mass, vx, vy, vz):
"""Compute four-momentum p^μ = m * U^μ."""
U = four_velocity(vx, vy, vz)
return mass * U
# Example 1: Verify |U|² = c² for different velocities
print("Four-Velocity: Verifying U·U = c² for all speeds")
print("=" * 55)
print(f"c = {c:.2e} m/s, c² = {c**2:.4e} m²/s²")
print()
velocities = [
("At rest", 0, 0, 0),
("Walking (1.5 m/s)", 1.5, 0, 0),
("Car (30 m/s)", 30, 0, 0),
("Rocket (0.1c)", 0.1*c, 0, 0),
("Fast (0.5c)", 0.5*c, 0, 0),
("Very fast (0.9c)", 0.9*c, 0, 0),
("Diagonal (0.5c, 0.3c, 0)", 0.5*c, 0.3*c, 0),
]
print(f"{'Object':<25} {'γ':<10} {'U·U':<16} {'= c²?'}")
print("-" * 55)
for name, vx, vy, vz in velocities:
U = four_velocity(vx, vy, vz)
UdotU = minkowski_dot(U, U)
gamma = U[0] / c
match = "✓" if abs(UdotU - c**2) < 1e-4 else "✗"
print(f"{name:<25} {gamma:<10.6f} {UdotU:.4e} {match}")
# Example 2: Four-momentum and energy-momentum relation
print("\n\nFour-Momentum: Energy-Momentum Relation")
print("=" * 55)
m_proton = 1.67e-27 # kg
proton_speeds = [0.1*c, 0.5*c, 0.9*c, 0.99*c]
print(f"Proton mass: {m_proton:.2e} kg")
print(f"Rest energy mc² = {m_proton * c**2:.4e} J = {m_proton*c**2/1.6e-13:.1f} MeV")
print()
print(f"{'Speed':<10} {'E (MeV)':<12} {'|p|c (MeV)':<14} {'E²-(pc)²':<16} {'= (mc²)²?'}")
print("-" * 60)
mc2 = m_proton * c**2
mc2_MeV = mc2 / 1.6e-13 # convert to MeV
for v in proton_speeds:
p = four_momentum(m_proton, v, 0, 0)
E = p[0] * c # Energy = p⁰ * c
px = p[1] # spatial momentum
E_MeV = E / 1.6e-13
pc_MeV = px * c / 1.6e-13
invariant = E**2 - (px*c)**2
expected = (mc2)**2
match = "✓" if abs(invariant - expected)/expected < 1e-6 else "✗"
print(f"{v/c:<10.2f} {E_MeV:<12.1f} {pc_MeV:<14.1f} {invariant/1.6e-13**2:<16.1f} {match}")
print(f"\nAll satisfy E² = (pc)² + (mc²)² ✓")
Practice Exercises
Exercises: Spacetime & Geometry
1. Two events occur at (ct₁=0, x₁=0) and (ct₂=5 m, x₂=3 m). Compute the spacetime interval. Is it timelike, spacelike, or lightlike? What is the proper time between them?
2. Event A occurs at the origin. Event B occurs at (ct=2, x=4) in light-years. Show that there is no frame in which A and B are simultaneous, but there IS a frame in which they occur at the same place. (Hint: check the interval type.)
3. A particle has four-momentum p^\mu = (5, 3, 0, 4) GeV/c. Calculate its rest mass and speed.
4. Draw a spacetime diagram showing: (a) a stationary observer, (b) an observer moving at 0.6c, (c) a light pulse, and (d) the light cone from the origin. Label the "future," "past," and "elsewhere" regions.
5. Prove that if \Delta s^2 > 0 (timelike), there exists a Lorentz transformation such that \Delta x' = 0 (same location). Find the velocity of this frame in terms of \Delta x and \Delta t.
6. A clock moves along the worldline x(t) = \frac{c^2}{a}(\sqrt{1 + (at/c)^2} - 1) (hyperbolic motion with proper acceleration a). Compute the proper time elapsed when the coordinate time is T = 10 years and a = 9.8 m/s² (1g acceleration).
Conclusion & Next Steps
Minkowski's geometric reformulation transformed special relativity from a collection of strange effects into an elegant geometric theory:
- Spacetime is a 4D manifold with events as points and worldlines as curves
- The metric \eta_{\mu\nu} = \text{diag}(+1,-1,-1,-1) defines the geometry
- Light cones divide spacetime into causally connected and disconnected regions
- Proper time is the invariant time measured along a worldline — straight worldlines maximize it
- The spacetime interval ds^2 is the fundamental invariant, agreed upon by all observers
- Four-vectors are the natural objects in spacetime — they transform covariantly under Lorentz boosts
This geometric viewpoint is not merely aesthetic — it's essential for the next step. Einstein's general relativity replaces the flat Minkowski metric with a curved metric g_{\mu\nu} that varies from point to point, encoding gravity as geometry.
Next in the Series
In Part 5: General Relativity, we'll see how Einstein extended the flat spacetime of Minkowski into curved spacetime — where gravity is not a force but the curvature of the fabric itself, described by the Einstein field equations G_{\mu\nu} = 8\pi G T_{\mu\nu}/c^4.