Chapter 15: Einstein-Hilbert Action

The Einstein-Hilbert action provides the variational foundation of general relativity. Einstein's field equations emerge naturally as the Euler-Lagrange equations for spacetime geometry, unifying gravity with the action principle of classical mechanics.

The Gravitational Action

\(S_{EH} = \frac{c^4}{16\pi G} \int R \sqrt{-g} \, d^4x\)

$R$ = Ricci scalar, $g = \det(g_{\mu\nu})$

This is the simplest diffeomorphism-invariant action built from the metric and its derivatives. The factor √(-g) d⁴x is the invariant volume element.

With Cosmological Constant

\(S = \frac{c^4}{16\pi G} \int (R - 2\Lambda) \sqrt{-g} \, d^4x\)

Variational Principle: Space of All Metricsgμν(physical metric)g + δgg + δg'S[g]metricsδS = 0S[g] = ∫ R √(-g) d⁴xThe physical metric extremizes the action among all possible metrics

Deriving Field Equations

Varying the action with respect to the metric gμν:

\(\delta S_{EH} = \frac{c^4}{16\pi G} \int \left( R_{\mu\nu} - \frac{1}{2}g_{\mu\nu}R \right) \delta g^{\mu\nu} \sqrt{-g} \, d^4x\)

Key Variations

\(\delta\sqrt{-g} = -\frac{1}{2}\sqrt{-g} g_{\mu\nu} \delta g^{\mu\nu}\)

\(\delta R = R_{\mu\nu} \delta g^{\mu\nu} + g^{\mu\nu} \delta R_{\mu\nu}\)

Palatini Identity

The term gμνδRμν becomes a total derivative and vanishes with appropriate boundary conditions.

Total Action with Matter

\(S = S_{EH} + S_{matter} = \frac{c^4}{16\pi G} \int R \sqrt{-g} \, d^4x + \int \mathcal{L}_m \sqrt{-g} \, d^4x\)

The stress-energy tensor is defined by variation with respect to the metric:

\(T_{\mu\nu} = -\frac{2}{\sqrt{-g}} \frac{\delta S_m}{\delta g^{\mu\nu}}\)

Setting δS/δgμν = 0 gives Einstein's equations!

Gibbons-Hawking-York Boundary Term

For a well-defined variational problem with boundaries:

\(S_{GHY} = \frac{c^4}{8\pi G} \int_\partial K \sqrt{|h|} \, d^3x\)

$K$ = trace of extrinsic curvature, $h$ = induced metric

This boundary term ensures the variational problem is well-posed when δgμν = 0 on the boundary (Dirichlet conditions).

Interactive Simulation: Action Principle

Run this Python code to explore the Einstein-Hilbert action, calculate Planck units, and visualize scalar field dynamics. The simulation shows how different equation of state values arise from the potential/kinetic energy ratio.

Einstein-Hilbert Action Analysis

Python

Explore the variational foundation of general relativity

einstein_hilbert_action.py134 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server

Fortran: Action Integration

This Fortran code demonstrates that the bulk Einstein-Hilbert action vanishes for vacuum solutions like Schwarzschild spacetime. The mass is encoded in boundary terms!

Schwarzschild Volume & Action

Python

Volume element and proper volume integration for vacuum spacetime

action_plot.py112 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server

Rate this chapter: