General Relativity

Einstein's Masterpiece: Gravity is the curvature of spacetime. Mass-energy tells spacetime how to curve, and spacetime tells mass-energy how to move.

Chapter 3: The Metric Tensor

The metric tensor is the fundamental object in general relativity. It encodes all information about spacetime geometry: distances, angles, volumes, and ultimately gravity itself.

Definition and Properties

The metric tensor gฮผฮฝ is a symmetric (0,2) tensor that defines the infinitesimal spacetime interval:

\( ds^2 = g_{\mu\nu} dx^\mu dx^\nu \)

The line element โ€” fundamental invariant of spacetime

Symmetry

\( g_{\mu\nu} = g_{\nu\mu} \)

10 independent components in 4D

Non-degeneracy

\( \det(g_{\mu\nu}) \neq 0 \)

Invertible everywhere

Signature

(-,+,+,+) or (+,-,-,-)

One time, three space dimensions

Inverse Metric

\( g^{\mu\nu} g_{\nu\rho} = \delta^\mu_\rho \)

Raises indices

Important Spacetime Metrics

Minkowski (Flat Spacetime)

\( ds^2 = -c^2dt^2 + dx^2 + dy^2 + dz^2 \)

Special relativity, no gravity

Schwarzschild (Spherical Mass)

\( ds^2 = -\left(1 - \frac{2GM}{rc^2}\right)c^2dt^2 + \frac{dr^2}{1 - \frac{2GM}{rc^2}} + r^2 d\Omega^2 \)

Black holes, stars, planets

FLRW (Expanding Universe)

\( ds^2 = -c^2dt^2 + a(t)^2\left[\frac{dr^2}{1-kr^2} + r^2 d\Omega^2\right] \)

Cosmology, Big Bang

Physical Interpretation

Proper Time

For timelike intervals: \( d\tau^2 = -ds^2/c^2 \) โ€” time measured by a moving clock

Proper Length

For spacelike intervals: \( dl^2 = ds^2 \) โ€” distance measured by a ruler

Null Intervals

\( ds^2 = 0 \) โ€” light rays, photon worldlines

Python: Schwarzschild Metric Analysis

Python
schwarzschild_metric.py118 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server

Fortran: Metric Determinant and Inverse

Fortran
metric_inverse.f9083 lines

Click Run to execute the Fortran code

Code will be compiled with gfortran and executed on the server