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 & technologyThe Expanding Universe
In the early 20th century, most scientists — including Einstein himself — believed the universe was static and eternal. It had always existed and would always exist, unchanging in its large-scale structure. This assumption was so deeply ingrained that when Einstein's own equations of General Relativity predicted a dynamic universe (either expanding or contracting), he introduced a "fudge factor" — the cosmological constant \Lambda — to force a static solution. He later called this his "biggest blunder."
The truth came from observations. In the 1920s, astronomer Edwin Hubble made one of the most profound discoveries in human history: the universe is not static — it is expanding.
Hubble's Discovery
Hubble observed that distant galaxies are moving away from us, and the farther away they are, the faster they recede. He measured this using redshift — the stretching of light waves from receding objects. Just as a siren sounds lower-pitched when an ambulance drives away (Doppler effect), light from a receding galaxy gets stretched to longer (redder) wavelengths.
Hubble's observations revealed a stunningly simple relationship, now known as Hubble's Law:
Where:
- v = recession velocity of the galaxy (km/s)
- H_0 = Hubble constant ≈ 70 km/s/Mpc (kilometers per second per megaparsec)
- d = distance to the galaxy (Mpc)
Critically, the galaxies are not flying through space — space itself is expanding, carrying galaxies along. This distinction is crucial: objects can recede from us faster than light (at great distances) without violating relativity, because it is the fabric of space stretching, not objects moving through space.
Redshift as Cosmic Speedometer
Astronomers quantify the stretching of light using the redshift parameter z:
A galaxy with z = 1 has had its light wavelength doubled — it was emitted when the universe was half its current size. The most distant observed objects have z > 10, meaning we see them as they were when the universe was less than 1/11th its current size.
import numpy as np
import matplotlib.pyplot as plt
# Hubble's Law: recession velocity vs distance
# H0 = 70 km/s/Mpc (Hubble constant)
H0 = 70 # km/s per Megaparsec
# Distances of galaxies in Megaparsecs (Mpc)
distances = np.array([10, 50, 100, 200, 500, 1000, 2000, 4000])
# Calculate recession velocities using v = H0 * d
velocities = H0 * distances
# Calculate redshift z = v/c for non-relativistic case
c = 3e5 # speed of light in km/s
redshifts = velocities / c
print("=" * 60)
print("HUBBLE'S LAW: Galaxy Recession Velocities")
print(f"Hubble Constant H₀ = {H0} km/s/Mpc")
print("=" * 60)
print(f"{'Distance (Mpc)':<18}{'Velocity (km/s)':<18}{'Redshift z':<12}")
print("-" * 48)
for d, v, z in zip(distances, velocities, redshifts):
print(f"{d:<18,.0f}{v:<18,.0f}{z:<12.4f}")
# Plot Hubble's Law
plt.figure(figsize=(10, 6))
plt.plot(distances, velocities / 1000, 'o-', color='#3B9797',
markersize=8, linewidth=2, label="v = H₀ × d")
plt.xlabel("Distance (Mpc)", fontsize=12)
plt.ylabel("Recession Velocity (×10³ km/s)", fontsize=12)
plt.title("Hubble's Law: The Expanding Universe", fontsize=14, fontweight='bold')
plt.grid(True, alpha=0.3)
plt.legend(fontsize=12)
plt.tight_layout()
plt.show()
print(f"\nKey Insight: A galaxy at 4000 Mpc recedes at {4000*H0:,.0f} km/s")
print(f"That's {4000*H0/c*100:.1f}% the speed of light!")
Watch galaxies recede from each other as space expands. There is no center — every galaxy sees all others moving away. Hubble's Law: v = H₀d
The Big Bang Theory
If the universe is expanding today, a natural question arises: what happens if we "rewind the tape"? If galaxies are flying apart now, they must have been closer together in the past. Go far enough back, and all matter and energy in the observable universe was compressed into an inconceivably hot, dense state. This is the Big Bang — not an explosion in space, but the rapid expansion of space itself, beginning approximately 13.8 billion years ago.
Timeline of the Universe
The history of the universe unfolds through distinct epochs, each governed by different physics:
flowchart LR
A["Big Bang
t = 0
T = ∞"] --> B["Inflation
t = 10⁻³⁶ s
Exponential expansion"]
B --> C["Quark Epoch
t = 10⁻¹² s
Quarks & gluons"]
C --> D["Nucleosynthesis
t = 3 min
H, He, Li form"]
D --> E["Recombination
t = 380,000 yr
CMB released"]
E --> F["Dark Ages
t = 380k–200M yr
No stars yet"]
F --> G["First Stars
t = 200M yr
Reionization"]
G --> H["Today
t = 13.8 Gyr
Galaxies, planets, us"]
Three Pillars of Evidence
The Big Bang theory rests on three observational pillars:
- Hubble Expansion: All distant galaxies recede — the universe is getting bigger.
- Cosmic Microwave Background: The universe glows with thermal radiation at 2.725 K — the afterglow of the hot early universe (discussed in detail below).
- Primordial Nucleosynthesis: The observed abundances of hydrogen (~75%), helium (~25%), and trace lithium match predictions from nuclear reactions in the first 3 minutes after the Big Bang.
Penzias & Wilson (1965): Accidental Discovery of the CMB
Arno Penzias and Robert Wilson were testing a sensitive microwave antenna at Bell Labs in New Jersey. They found persistent background "noise" — a uniform microwave signal coming from all directions in the sky at a temperature of about 3 K. They couldn't eliminate it no matter where they pointed the antenna. They even cleaned pigeon droppings from the horn, thinking that was the source!
Meanwhile, at nearby Princeton University, Robert Dicke's group was building a detector specifically to find this radiation — predicted as the cooled remnant of the Big Bang. When Penzias called Dicke for help, Dicke turned to his colleagues and said: "Boys, we've been scooped."
Penzias and Wilson received the 1978 Nobel Prize for this discovery — one of the most important in 20th-century physics.
Friedmann Equations
How does General Relativity describe the expansion of the universe mathematically? The answer comes from the Friedmann equations, derived in 1922 by Russian physicist Alexander Friedmann — who solved Einstein's field equations under the assumption that the universe is homogeneous (the same everywhere) and isotropic (the same in all directions) on large scales.
The Scale Factor
The key variable in cosmology is the scale factor a(t), which describes how distances in the universe change with time. If two galaxies are separated by distance d_0 today (when a = 1), then at time t their separation is d(t) = a(t) \cdot d_0.
The first Friedmann equation relates the expansion rate to the energy content:
Where:
- \dot{a}/a = H(t) — the Hubble parameter (expansion rate)
- \rho — total energy density of the universe (matter + radiation)
- k — spatial curvature (k = −1, 0, or +1 for open, flat, or closed universe)
- \Lambda — the cosmological constant (dark energy)
- G — Newton's gravitational constant
The second Friedmann equation (the acceleration equation) tells us whether expansion is speeding up or slowing down:
Here p is the pressure. Notice: ordinary matter and radiation (positive \rho and p) cause deceleration (gravity pulls things back), but the cosmological constant \Lambda drives acceleration. This tension between gravity's braking and dark energy's acceleration determines the universe's fate.
import numpy as np
import matplotlib.pyplot as plt
# Solving the Friedmann equation for scale factor evolution
# in a flat universe with matter, radiation, and dark energy
# Cosmological parameters (Planck 2018 values)
H0 = 67.4 # Hubble constant in km/s/Mpc
Omega_m = 0.315 # Matter density fraction
Omega_r = 9.1e-5 # Radiation density fraction
Omega_L = 0.685 # Dark energy density fraction
# Convert H0 to 1/seconds
H0_si = H0 * 1e3 / (3.086e22) # km/s/Mpc -> 1/s
# Time array from Big Bang to far future (in units of 1/H0)
# 1/H0 ~ 14.5 billion years (Hubble time)
t_hubble = 1 / H0_si # seconds
t_hubble_gyr = t_hubble / (3.156e7 * 1e9) # convert to Gyr
# Numerical integration: da/dt = a * H(a)
# H(a)^2 = H0^2 * [Omega_r/a^4 + Omega_m/a^3 + Omega_L]
a_values = np.linspace(0.001, 3.0, 1000)
t_values = np.zeros_like(a_values)
for i in range(1, len(a_values)):
# Integrand: dt = da / (a * H(a))
a = a_values[i]
da = a_values[i] - a_values[i-1]
H_a = H0_si * np.sqrt(Omega_r/a**4 + Omega_m/a**3 + Omega_L)
dt = da / (a * H_a)
t_values[i] = t_values[i-1] + dt
# Convert time to billion years
t_gyr = t_values / (3.156e7 * 1e9)
# Find current time (a = 1)
idx_now = np.argmin(np.abs(a_values - 1.0))
t_now = t_gyr[idx_now]
print("=" * 60)
print("SCALE FACTOR EVOLUTION: Friedmann Equation Solution")
print("=" * 60)
print(f"Cosmological Parameters:")
print(f" H₀ = {H0} km/s/Mpc")
print(f" Ω_matter = {Omega_m}")
print(f" Ω_radiation = {Omega_r}")
print(f" Ω_dark energy = {Omega_L}")
print(f"\nAge of universe (a=1): {t_now:.2f} Gyr")
print(f"Hubble time (1/H₀): {t_hubble_gyr:.2f} Gyr")
# Plot scale factor vs time
plt.figure(figsize=(10, 6))
plt.plot(t_gyr, a_values, linewidth=2.5, color='#BF092F', label='Our Universe (Λ > 0)')
plt.axhline(y=1, color='gray', linestyle='--', alpha=0.5, label='a = 1 (today)')
plt.axvline(x=t_now, color='gray', linestyle=':', alpha=0.5, label=f't = {t_now:.1f} Gyr (now)')
plt.xlabel("Time since Big Bang (billion years)", fontsize=12)
plt.ylabel("Scale Factor a(t)", fontsize=12)
plt.title("Evolution of the Universe: Scale Factor vs Time", fontsize=14, fontweight='bold')
plt.xlim(0, 40)
plt.ylim(0, 3)
plt.legend(fontsize=11)
plt.grid(True, alpha=0.3)
plt.tight_layout()
plt.show()
# Print key epochs
print(f"\nKey Epochs:")
idx_half = np.argmin(np.abs(a_values - 0.5))
print(f" a = 0.5 (universe half current size): t = {t_gyr[idx_half]:.2f} Gyr")
print(f" a = 1.0 (today): t = {t_now:.2f} Gyr")
idx_double = np.argmin(np.abs(a_values - 2.0))
print(f" a = 2.0 (universe double current size): t = {t_gyr[idx_double]:.2f} Gyr")
Dark Matter
One of the most profound mysteries in modern physics is that approximately 85% of all matter in the universe is invisible. We cannot see it, touch it, or detect it directly — yet its gravitational effects are unmistakable. This invisible substance is called dark matter.
Galaxy Rotation Curves: The Smoking Gun
The most compelling evidence for dark matter comes from how galaxies rotate. In the 1970s, astronomer Vera Rubin measured the orbital speeds of stars at different distances from the centers of spiral galaxies. According to Newton's gravity (and GR, which agrees in this limit), stars far from the galactic center should orbit more slowly — just as outer planets in our solar system orbit more slowly than inner ones (Kepler's third law).
Expected orbital velocity (Keplerian decline):
If most mass is concentrated in the visible galactic center, then beyond the luminous disk, M(r) should be roughly constant, giving v \propto 1/\sqrt{r} — a declining curve.
Instead, Rubin found that orbital speeds remain flat (roughly constant) far beyond the visible disk. Stars at the galaxy's edge orbit just as fast as those near the center. This means there must be enormous amounts of unseen mass extending far beyond the visible galaxy — a dark matter halo.
Vera Rubin's Galaxy Rotation Curves (1970s)
Rubin and her colleague Kent Ford measured rotation curves for over 60 spiral galaxies. In every single case, the outer stars orbited far too fast to be explained by visible matter alone. The flat rotation curves implied that each galaxy is embedded in a massive, invisible halo of dark matter extending 5-10 times beyond the visible disk.
For a typical galaxy, visible matter accounts for only ~15% of the total mass. The remaining ~85% is dark matter — a substance that interacts gravitationally but does not emit, absorb, or reflect light.
Other Evidence for Dark Matter
Galaxy rotation curves are just one line of evidence. Dark matter's gravitational fingerprints appear everywhere:
- Gravitational lensing: Galaxy clusters bend light from background objects far more than their visible mass can explain.
- Bullet Cluster: Two colliding galaxy clusters where visible matter (gas) was separated from the gravitational center of mass — proving dark matter is a real substance, not a modification of gravity.
- CMB anisotropies: The pattern of temperature fluctuations in the cosmic microwave background matches predictions only if dark matter exists.
- Large-scale structure: The cosmic web of galaxy filaments and voids could only have formed with dark matter providing gravitational scaffolding.
What IS dark matter? We don't know. Leading candidates include WIMPs (Weakly Interacting Massive Particles), axions, and sterile neutrinos. Decades of searches have yet to identify the particle directly — it remains one of physics' greatest open questions.
Dark Energy
If dark matter was the great mystery of the 1970s–80s, dark energy is the bombshell of 1998. Two independent teams — the Supernova Cosmology Project and the High-z Supernova Search Team — discovered that the expansion of the universe is not slowing down (as everyone expected from gravity), but accelerating. Something is pushing the universe apart with ever-increasing vigor.
The Accelerating Expansion
Both teams measured distances to Type Ia supernovae — "standard candles" with known intrinsic brightness. By comparing observed brightness to expected brightness, they determined distances. Combined with redshift measurements, they mapped the expansion history. The shocking result: distant supernovae were fainter than expected, meaning they were farther away than a decelerating universe would predict. The expansion is speeding up.
This discovery won Saul Perlmutter, Brian Schmidt, and Adam Riess the 2011 Nobel Prize in Physics.
The Cosmological Constant Λ
The simplest explanation for dark energy is Einstein's cosmological constant \Lambda — a constant energy density permeating all of space. Its equation of state is:
This negative pressure is the key: while gravity from matter causes deceleration, the negative pressure of dark energy drives accelerating expansion. In the Friedmann equation, \Lambda contributes a term that grows relative to matter as the universe expands (matter dilutes as a^{-3}, but \Lambda stays constant). Eventually dark energy dominates — and it already does today.
pie title Energy Content of the Universe
"Dark Energy (68.3%)" : 68.3
"Dark Matter (26.8%)" : 26.8
"Ordinary Matter (4.9%)" : 4.9
The cosmological constant poses a deep theoretical puzzle: quantum field theory predicts that the vacuum of space should have enormous energy density — roughly 10^{120} times larger than what we observe. This discrepancy between the predicted and observed values of \Lambda is called the "cosmological constant problem" and is arguably the worst prediction in the history of physics.
Cosmic Microwave Background
The Cosmic Microwave Background (CMB) is the oldest light in the universe — a faint glow of microwave radiation filling all of space, emitted approximately 380,000 years after the Big Bang. It is perhaps the single most important observational tool in cosmology, providing a snapshot of the infant universe.
Origin: The Surface of Last Scattering
In the very early universe, temperatures were so extreme that atoms could not exist — matter was a hot plasma of free protons, electrons, and photons, all constantly colliding. Photons could not travel far without scattering off electrons, making the universe opaque (like being inside a dense fog).
As the universe expanded and cooled, it eventually reached about 3,000 K (at age ~380,000 years). At this temperature, electrons combined with protons to form neutral hydrogen atoms — a process called recombination. Suddenly, photons could travel freely without scattering. The universe became transparent.
Those freed photons have been traveling ever since, but the expansion of the universe has stretched their wavelengths by a factor of ~1,100 (redshift z \approx 1100). Originally visible/infrared light, they are now microwaves with a temperature of:
A Perfect Blackbody
The CMB has the most perfect blackbody spectrum ever measured in nature. The COBE satellite (1989) measured it so precisely that the error bars are smaller than the line width on the graph. This perfection confirms that the early universe was in thermal equilibrium — exactly as the Big Bang theory predicts.
Tiny temperature variations (\Delta T / T \sim 10^{-5}) in the CMB reveal the seeds of all cosmic structure — the slight density fluctuations that gravity amplified over billions of years into galaxies, clusters, and the cosmic web we see today.
import numpy as np
import matplotlib.pyplot as plt
# Planck's blackbody radiation law for CMB spectrum
# B(ν, T) = (2hν³/c²) × 1/(exp(hν/kT) - 1)
# Physical constants
h = 6.626e-34 # Planck's constant (J·s)
c = 3e8 # Speed of light (m/s)
k_B = 1.381e-23 # Boltzmann constant (J/K)
# CMB temperature
T_cmb = 2.725 # Kelvin
# Frequency range (GHz)
nu_ghz = np.linspace(1, 900, 1000)
nu = nu_ghz * 1e9 # Convert to Hz
# Planck function: spectral radiance B(ν, T)
def planck_function(nu, T):
"""Blackbody spectral radiance in W/(m² sr Hz)"""
numerator = 2 * h * nu**3 / c**2
denominator = np.exp(h * nu / (k_B * T)) - 1
return numerator / denominator
# Calculate CMB spectrum
intensity = planck_function(nu, T_cmb)
# Convert to more conventional units (MJy/sr)
# 1 Jy = 10^-26 W/(m² Hz), so MJy = 10^-20
intensity_mjy = intensity / 1e-20 # MJy/sr
# Find peak frequency (Wien's displacement law for frequency)
nu_peak = 2.821 * k_B * T_cmb / h
print("=" * 60)
print("COSMIC MICROWAVE BACKGROUND: Blackbody Spectrum")
print("=" * 60)
print(f"CMB Temperature: {T_cmb} K")
print(f"Peak frequency: {nu_peak/1e9:.1f} GHz")
print(f"Peak wavelength: {c/nu_peak*1000:.2f} mm")
print(f"Original temperature at emission: ~3000 K")
print(f"Redshift since emission: z ≈ 1100")
print(f"Age at emission: ~380,000 years after Big Bang")
# Also compute what the CMB looked like at emission
T_emission = 3000 # K (approximate)
intensity_emission = planck_function(nu * 1100, T_emission) # shifted back
# Plot the CMB spectrum
plt.figure(figsize=(10, 6))
plt.plot(nu_ghz, intensity_mjy, linewidth=2.5, color='#BF092F',
label=f'CMB Today (T = {T_cmb} K)')
plt.axvline(x=nu_peak/1e9, color='#3B9797', linestyle='--',
linewidth=1.5, label=f'Peak = {nu_peak/1e9:.0f} GHz')
plt.xlabel("Frequency (GHz)", fontsize=12)
plt.ylabel("Spectral Radiance (MJy/sr)", fontsize=12)
plt.title("CMB Blackbody Spectrum (Planck Function at T = 2.725 K)",
fontsize=14, fontweight='bold')
plt.legend(fontsize=11)
plt.grid(True, alpha=0.3)
plt.xlim(0, 900)
plt.tight_layout()
plt.show()
# Temperature at different redshifts
print(f"\nCMB Temperature at different epochs:")
for z in [0, 1, 10, 100, 1100]:
T = T_cmb * (1 + z)
print(f" z = {z:>5}: T = {T:>10.2f} K")
Practice Exercises
Test your understanding of cosmological concepts with these problems:
Exercise 1: Hubble's Law
A galaxy is observed at a distance of 150 Mpc. Using H_0 = 70 km/s/Mpc:
- What is its recession velocity?
- What is its approximate redshift z?
- If we observe a galaxy with z = 0.1, how far away is it?
Exercise 2: Age of the Universe
A very rough estimate of the age of the universe (ignoring acceleration/deceleration) is the Hubble time:
Calculate t_H in billions of years. (Hint: convert Mpc to km first. 1 Mpc = 3.086 × 10¹⁹ km.)
Exercise 3: Cosmic Energy Budget
Using the Friedmann equation with today's values (\Omega_m = 0.315, \Omega_\Lambda = 0.685):
- At what scale factor a_{eq} did dark energy begin to dominate over matter? (Hint: matter density scales as a^{-3}, dark energy is constant.)
- What redshift does this correspond to?
Exercise 4: CMB Temperature
The CMB temperature today is 2.725 K. It scales with redshift as T(z) = T_0(1+z).
- What was the CMB temperature at z = 9 (when the first galaxies formed)?
- At what redshift was the CMB temperature equal to room temperature (300 K)?
Conclusion & Next Steps
Cosmology represents General Relativity's most ambitious application — describing the entire universe as a single dynamical system. We've seen how Hubble's discovery of expansion, combined with Einstein's field equations, leads to the Friedmann equations that govern cosmic evolution. The universe began in the Big Bang 13.8 billion years ago, and its expansion is now accelerating due to the mysterious dark energy.
The cosmic inventory is humbling: 95% of the universe consists of dark matter and dark energy — substances we can detect gravitationally but cannot yet identify. The remaining 5% of ordinary matter is what makes up everything we know: stars, planets, people, and physics textbooks.
The CMB provides our clearest window into the early universe, confirming the Big Bang model with extraordinary precision and revealing the seeds of all cosmic structure.
In the next part, we'll examine how all of these predictions — from gravitational lensing to gravitational waves to the CMB — have been experimentally verified with ever-increasing precision, confirming Einstein's theory as one of the most thoroughly tested in all of science.
Next in the Series
In Part 7: Experimental Verification, we explore the century of experiments confirming relativity — from Eddington's 1919 eclipse expedition to LIGO's detection of gravitational waves, Gravity Probe B, and precision GPS corrections.