Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Space-time: four-vectors, Lorentz boosts and Christoffel symbols

ProblemCompute with events and four-vectors in special relativity, and with the connection coefficients that give free-fall motion in curved space-time
Devised byHendrik Lorentz (1904) and Albert Einstein (1905), the transformations; Hermann Minkowski (1908), space-time geometry; Elwin Christoffel (1869), the symbols; Karl Schwarzschild (1916), the field of a mass
AccuracyBoosts preserve intervals to rounding; Christoffel symbols from finite differences agree with the exact Schwarzschild ones to or better; an orbit integrated with them precesses by the exact amount to five digits (tables below)
Cost per operation; for the symbols at a point
Read firstGeometric types: points, vectors, shapes and shared tables, Runge-Kutta methods
APISpaceTimeVector4D (new, from_time, interval_squared, causality, proper_time, boost_matrix, boosted, four_velocity, gamma, rapidity, add_collinear_velocities), Causality, ChristoffelSymbols4D (from_metric_derivatives, from_metric_function, schwarzschild, minkowski, geodesic_acceleration), invert_4x4

Overview

In relativity, space and time form a single four-dimensional space-time. A point in it is an event, written with time measured in units of length (, so the speed of light is 1). Observers moving relative to each other disagree about times and distances separately. They agree on the interval , as observers related by a rotation agree on lengths. The transformations between moving observers are Lorentz boosts. In general relativity gravity curves space-time. A freely falling body follows a geodesic, the straightest possible path, whose equation contains the Christoffel symbols of the metric.

These are the tools behind GPS clock corrections, particle-accelerator kinematics and the orbits near compact objects.

Where it is used

Special and general relativity are used in engineering more often than one might expect.

  • GPS. Satellite clocks are corrected for both special-relativistic time dilation and gravitational blueshift, or the position error would grow by kilometres a day.
  • Particle accelerators. Beam physics uses Lorentz boosts and four-momentum to relate lab-frame and particle-frame quantities.
  • Astrophysics and cosmology. Christoffel symbols give the geodesics of light and matter in curved space, from lensing to the orbit of Mercury.
  • Teaching. Concrete computation makes the four-vector formalism tangible.

History

Hendrik Lorentz (1904) found the transformations that leave Maxwell’s equations unchanged, and Albert Einstein (1905) derived them from the relativity principle and the constancy of the speed of light. Hermann Minkowski (1908) recast the theory as the geometry of a four-dimensional space with the interval as its “distance”, famously declaring that space and time by themselves would “fade away into mere shadows”. Elwin Christoffel (1869) had introduced his symbols in differential geometry, long before Einstein’s field equations (1915) needed them. Weeks later Karl Schwarzschild, serving on the Russian front, found the exact field outside a spherical mass. General relativity’s first triumph was explaining the 43 arcseconds per century by which Mercury’s perihelion advances beyond what Newtonian perturbations predict.

The idea

Minkowski space and Lorentz boosts

The library uses the signature , so the interval is negative for timelike separations (one event can influence the other), positive for spacelike ones (none can), and zero on the light cone. A boost with velocity (as a fraction of ) and Lorentz factor maps components as

A particle with velocity has four-velocity , whose interval is always . Collinear velocities add as , never reaching 1.

Table 24.7. Special-relativity checks.

checkresult
interval −t² + x² + y² + z² before and after a boost-19.750000000000 and -19.750000000000
four-velocity seen from its own rest frame(1.000, 6.2e-17, -2.4e-17, 5.6e-17)
boosts by 0.6c then 0.7c along x, against one boost by their relativistic sum0.915c; largest component difference 1.8e-15

Christoffel symbols and geodesics

In curved space-time with metric , the geodesic equation is

where is proper time. The library computes the symbols from the metric and its derivatives at a point. It can take the derivatives from the caller, or estimate them by fourth-order central differences of a metric function. It also has the exact symbols of the Schwarzschild metric

the field outside a non-rotating mass (in units ).

Table 24.8. Christoffel symbols against finite differences of the metric.

pointlargest symbolfinite-difference error
r = 10 M, θ = 18.0003.4e-9
r = 3 M, θ = 0.42.3651.1e-10
r = 50 M, θ = 248.0001.5e-6

The finite-difference error is below 4 parts in of the largest symbol, as expected for a fourth-order formula with step .

A bound orbit in the Schwarzschild field does not close: each turn its perihelion advances. Integrating the geodesic equation with the library’s symbols and a fourth-order Runge–Kutta step, for an orbit between and , gives the exact advance:

Figure 24.14. Orbit.

perihelion advance per orbitradiansdegrees
geodesic equation, RK4 with the library’s symbols0.7439242.623
exact (elliptic integral)0.7439242.623
weak-field formula 6πM/p0.6283236.000

Over the three orbits the conserved normalisation drifted by at most 3e-13. The weak-field formula , with the semi-latus rectum, is the one that gives Mercury’s 43″ per century. Here it underestimates by about 16%, because this orbit is deep in the field, at 20 to 60 times the mass’s gravitational radius.

Algorithm

Lorentz boost of a four-vector by velocity : compute ; build the boost matrix, whose entries are those of the two formulas above; multiply the vector by it.

Christoffel symbols at a point, from the metric and its derivatives there.

  1. Invert the metric by Gauss-Jordan elimination with pivoting, to obtain .
  2. For each , and , sum over : .

There are 64 symbols in four dimensions, of which 40 are independent because of the symmetry in and .

Derivatives of a metric given as a function: for each coordinate , evaluate the metric at the four points displaced by and along that coordinate, and combine them by the five-point formula, .

Geodesic acceleration: given a position and a four-velocity , compute the symbols there and return , summed over and . This is the right-hand side of the geodesic equation, written as a first-order system in position and velocity, to be integrated by any ODE solver.

Implementation

    pub fn from_metric_derivatives(g: &Metric4, dg: &[Metric4; 4]) -> Option<Self> {
        let inv = invert_4x4(g)?;
        let mut gamma = [[[0.0; 4]; 4]; 4];
        for (l, plane) in gamma.iter_mut().enumerate() {
            for (m, row) in plane.iter_mut().enumerate() {
                for (n, entry) in row.iter_mut().enumerate() {
                    *entry = 0.5 * (0..4).map(|s| inv[l][s] * (dg[m][s][n] + dg[n][s][m] - dg[s][m][n])).sum::<f64>();
                }
            }
        }
        Some(ChristoffelSymbols4D { gamma })
    }
  • causality classifies a separation as timelike, spacelike or lightlike with a tolerance; proper_time and proper_distance take the square root of the interval of the right sign.
  • schwarzschild returns None inside the horizon or at the poles, where the coordinates are singular.

In practice

//! Four-vectors, Lorentz boosts and the Christoffel symbols of curved space-time.

use lib_jsl_geometry::four_d::{ChristoffelSymbols4D, SpaceTimeVector4D};

fn main() {
    // A flash 5 light-seconds away, 4 seconds later: spacelike, so no signal links the two.
    let event = SpaceTimeVector4D::new(4.0, 5.0, 0.0, 0.0);
    println!("interval {}, {:?}", event.interval_squared(), event.causality(1e-12));
    for beta in [0.5, 0.8] {
        let seen = event.boosted([beta, 0.0, 0.0]).unwrap();
        println!("seen from a frame moving at {beta}c: t = {:.4}, x = {:.4}, interval {:.4}", if seen.t.abs() < 1e-12 { 0.0 } else { seen.t }, seen.x, seen.interval_squared());
    }
    println!("0.8c + 0.8c = {:.4}c, gamma(0.8c) = {:.4}", SpaceTimeVector4D::add_collinear_velocities(0.8, 0.8), SpaceTimeVector4D::gamma([0.8, 0.0, 0.0]).unwrap());

    // Around a mass M = 1, at r = 10 in the equatorial plane: a particle at rest falls inwards.
    let gamma = ChristoffelSymbols4D::schwarzschild(1.0, 10.0, std::f64::consts::FRAC_PI_2).unwrap();
    let at_rest = [1.0 / (1.0f64 - 0.2).sqrt(), 0.0, 0.0, 0.0];
    println!("radial acceleration of a particle at rest: {:.5} (Newton: -1/r² = -0.01)", gamma.geodesic_acceleration(at_rest)[1]);
    println!("torsion free: {}", gamma.is_torsion_free(1e-15));
}
interval 9, Spacelike
seen from a frame moving at 0.5c: t = 1.7321, x = 3.4641, interval 9.0000
seen from a frame moving at 0.8c: t = 0.0000, x = 3.0000, interval 9.0000
0.8c + 0.8c = 0.9756c, gamma(0.8c) = 1.6667
radial acceleration of a particle at rest: -0.01000 (Newton: -1/r² = -0.01)
torsion free: true

The two flashes are spacelike-separated, so their time order depends on the observer. From a frame moving at they are simultaneous, and from faster frames their order reverses. A particle held at rest at has a coordinate acceleration of exactly , Newton’s value, because the factors cancel.

Strengths

  • Lorentz boosts in any direction, with the standard derived quantities.
  • Christoffel symbols for any metric, from a function or from derivatives, with an exact reference case.

Weaknesses

  • No Riemann or Ricci curvature, no geodesic integrator (the caller supplies one), and no Kerr metric for rotating masses.
  • The relativity types use f64 while the rest of the primitive types use f32.

Exercises

  1. Show that a boost preserves the interval.
  2. Derive the velocity-addition formula by composing two boosts along , and show that rapidities add.
  3. Compute the Christoffel symbols of flat space in spherical coordinates and check them with from_metric_function.
  4. Show that is conserved along a geodesic, and use it to test an integrator.
  5. Derive the orbit equation for , and from it the perihelion advance.
Hints and answers
  1. A boost satisfies , which is the statement that the interval is preserved; check it for the block using .
  2. Composing boosts with rapidities gives a boost with (hyperbolic addition formulas); then and .
  3. In spherical coordinates the non-zero symbols are , , , , , .
  4. Along a geodesic the quantity is constant (the affine parameter normalisation); a numerical integrator that does not conserve it shows the error growing with the step size.
  5. Using the conserved and of the Schwarzschild geodesic and , . Differentiating gives ; the term causes the perihelion advance per orbit.

Further reading

  • E. F. Taylor and J. A. Wheeler, Spacetime Physics, 2nd ed., W. H. Freeman, 1992.
  • S. M. Carroll, Spacetime and Geometry: An Introduction to General Relativity, Addison-Wesley, 2004, chapters 3 and 5.
  • B. F. Schutz, A First Course in General Relativity, 2nd ed., Cambridge University Press, 2009.
  • C. W. Misner, K. S. Thorne and J. A. Wheeler, Gravitation, W. H. Freeman, 1973, chapter 25.