The Einstein-Hilbert Action
Every other field theory in physics is handed to us as an action, its equations of motion following by stationary action. General relativity is no exception — but for a long time it looked like one. Einstein reached his field equations in November 1915 by a hard climb through tensor calculus, physical reasoning, and the demand that the theory reduce to Newton's in the weak field. Almost simultaneously David Hilbert reached the same equations from a single line: write down the simplest generally covariant scalar built from the metric, integrate it over spacetime, and demand the result be stationary. That functional is the Einstein-Hilbert action, and the scalar is the Ricci curvature . The economy is startling. The metric is the dynamical field; its first derivatives live in the Christoffel symbols and its second derivatives in . A Lagrangian with second derivatives should naively give fourth-order equations — yet the second-derivative part of collapses into a total divergence, and the surviving equations are only second order in , exactly what a sensible Cauchy problem needs. Out of falls the Einstein tensor, and a matter action sources it: . This article is the variational keystone of the chapter. It takes the Einstein tensor from aq-gr-einstein-tensor-gr4 and the stress-energy tensor from aq-gr-stress-energy-tensor and aq-gr-variational-stress-energy-tensor, and shows that both — and the conservation law binding them — descend from one scalar and one symmetry. The boundary term, cosmological constant, and full sourced equations belong to the articles that follow.
- The Einstein-Hilbert action is the simplest diffeomorphism-invariant functional of the metric whose stationary points are the vacuum Einstein equations.
- Varying with respect to and discarding a total divergence gives — the vanishing of the Einstein tensor.
- A matter action sources curvature: the full equations appear with defined variationally.
- The dropped divergence is not innocuous: a well-posed variational principle with the metric fixed on the boundary needs the Gibbons-Hawking-York term to cancel it.
- Diffeomorphism invariance of forces automatically — local conservation is a Noether consequence, not a separate postulate.
- The coupling is fixed by the Newtonian limit to , the tiny number that makes spacetime stiff.
- Key idea: gravity is the principle of stationary action applied to the simplest generally covariant scalar, the integrated Ricci scalar; the field equations are not assumed but are the condition that be stationary under metric variations.
Gravity is the principle of stationary action applied to the simplest generally covariant scalar — the integrated Ricci scalar. The field equations are not postulated; they are the statement that is stationary under variations of the metric.
Where this lives today
The action is the working language of every modern programme in gravity. In quantum gravity, the path integral underlies both covariant and non-perturbative (loop, spin-foam) approaches, and the boundary term is indispensable: the Euclidean action of a black hole reproduces the Bekenstein-Hawking entropy . In cosmology, the cosmological-constant term is the leading dark-energy model, and the gap between its measured value () and quantum-field-theory estimates ( times larger) is the notorious cosmological-constant problem. In gravitational-wave astronomy the graviton and wave equation come from expanding to quadratic order, and LIGO-Virgo-KAGRA now test general relativity against and other modified-action theories. And in effective field theory, is the lowest-order term of a curvature expansion with calculable quantum corrections — Einstein gravity as the infrared limit of some deeper theory.
The physical picture
Think of the metric as a field spread over the spacetime manifold, the way an elastic displacement field is spread over a solid. At each point the Ricci scalar measures how sharply the geometry departs from flatness — a local "curvature density." The action sums it over the manifold, weighted by , and stationary action selects the geometry for which no infinitesimal reshaping changes the total to first order. Vacuum solutions — Schwarzschild, a passing gravitational wave — are exactly the geometries that make stationary.
Why the Ricci scalar and not or ? The filter is the demand for second-order field equations. contains the second derivatives of only linearly, and they gather into a total divergence that integrates away; every higher-curvature scalar leaves fourth-order terms and extra, often ghost-like, degrees of freedom. So is the unique leading choice. The variation itself is worth previewing: the integrand has three factors, and varying each sends it to bulk equations or a boundary term. The second figure is that anatomy, carrying the number that sets gravity's coupling.
The factor is not decoration: is the coordinate-invariant four-volume, what makes a true scalar — the same number in any coordinates. That diffeomorphism invariance is, through Noether's theorem, the source of the contracted Bianchi identity and of energy-momentum conservation.
The core equations
Among all scalars you could integrate against , the Ricci scalar is the lowest in derivatives that curves.
where: — Ricci scalar, ; — determinant of , negative for Lorentzian signature; — invariant four-volume; — Newton's constant (geometrized units set ); — the region of integration. The prefactor is a convention repaid when the Newtonian limit fixes the coupling to . Matter enters through its own action; the total is the sum, and additivity lets each field define its own curvature source.
where: — matter action; — the matter fields (scalars, spinors, gauge fields). The metric appears in because every field must be told how to measure lengths and times — and that dependence defines . Two identities do the heavy lifting. The first — how the volume element responds to a metric nudge — gives the half of the Einstein tensor.
where: — variation of the inverse metric, the independent field variation. It follows from Jacobi's formula, established in the first derivation. The second handles the curvature factor: varying the Ricci tensor gives not a new algebraic term but a total covariant divergence — why the highest derivatives never reach the equations.
where: — Christoffel symbols; — connection variation, a genuine -tensor (difference of two connections); — metric-compatible covariant derivative. The point of this Palatini identity: is a divergence, so under the integral it becomes a surface term. Assembling (3) and (4) gives the functional derivative of the action — the Einstein tensor.
where: — the Einstein tensor, automatically symmetric and, by the contracted Bianchi identity, divergence-free. In vacuum it gives , i.e. . The matter side is the mirror image: how responds to the same variation defines the stress-energy tensor.
where: — the symmetric (Hilbert) stress-energy tensor. This definition makes its symmetry manifest and, as the second derivation shows, guarantees conservation for free. Demanding stationarity of the total action combines (5) and (6) into the field equations.
where: — the coupling, fixed by matching the weak-field limit to Newton's law (third derivation). Restoring , the source is with — why it takes a planet's worth of energy to bend spacetime. Finally, the boundary term dropped in the variation is not optional: a variational principle with the metric fixed on needs an explicit surface term to be well posed.
where: — trace of the extrinsic curvature of the boundary; — determinant of the induced metric on ; — boundary coordinates. This Gibbons-Hawking-York term, owned by aq-gr-gibbons-hawking-york-term, is the cure for the surface piece.
The goal is to carry out explicitly and watch the Einstein tensor precipitate out of the bulk while the highest-derivative piece drains away as a surface integral. We write the integrand as three metric-dependent factors, vary each with the determinant and Palatini identities, and collect the terms multiplying — those, and only those, become the field equations.
Step 1. Write and apply the product rule: . Why: separating the three factors lets each be handled by its own identity.
Step 2. Establish the determinant identity. Jacobi's formula gives , so ; then varying gives , hence . Why: this makes the volume-factor variation proportional to , supplying the trace term.
Step 3. Feed Step 2 into the third term: , using . Why: it now sits beside the first term, both multiplying , ready to combine.
Step 4. Attack the middle term with the Palatini identity. Metric compatibility lets the metric slide inside, so , a pure divergence. Why: a total divergence is fixed entirely by the boundary and cannot contribute to the local equations.
Step 5. Apply the divergence theorem: , a surface integral over . Why: this is the boundary term the figure tracked; on a finite boundary it must be cancelled by the Gibbons-Hawking-York term.
Step 6. Collect the bulk coefficient of : . Stationarity for arbitrary forces the bracket to vanish, giving . Why: the fundamental lemma of variations turns " for all variations" into the pointwise vacuum equation.
Go deeper · Derivation B · 1 minDiffeomorphism invariance forces energy-momentum conservation
The aim is to show that covariant conservation is not an extra assumption but a rigid consequence of the matter action being a scalar under smooth coordinate changes. The argument never touches the field equations; it uses only that is invariant when the metric flows along an arbitrary vector field, the definition of , and one integration by parts. This is the deepest reason the two sides of Einstein's equation are consistent — the geometry side is divergence-free by Bianchi, so the matter side must be too.
Step 1. Under an infinitesimal diffeomorphism generated by , the metric changes by its Lie derivative, , while . Why: a covariant scalar cannot depend on the labelling of points, so relabelling via leaves it invariant.
Step 2. Evaluate that variation through the definition of : . Why: on shell for the matter fields, only the explicit metric dependence contributes — equation (6).
Step 3. Insert the Lie derivative, use the symmetry of to write , and integrate by parts (dropping the surface term for compact ): . Why: moving the derivative onto exposes its divergence as the coefficient of an arbitrary field.
Step 4. Because is arbitrary, the integrand must vanish pointwise: . This is exactly consistent with the contracted Bianchi identity that the geometry obeys identically. Why: symmetry of the action ⇒ conservation of the associated current — Noether's theorem, with diffeomorphisms as the symmetry and energy-momentum as the current.
Go deeper · Derivation C · 1 minFixing the coupling by the Newtonian limit
The goal is to pin the pure number in front of — to show it must be . The variational construction gives the form and the relative normalization, but the scale can only come from experiment: we demand that a weak, static field around slow, cold matter reproduce Newton's Poisson equation , which fixes the coupling once and for all.
Step 1. Trace the trial equation . In four dimensions , so , giving the trace-reversed form . Why: this isolates the Ricci tensor, which connects most directly to the Newtonian potential.
Step 2. Adopt a weak static metric , nearly flat spatially, and pressureless dust at rest: , trace . Why: this is the regime where gravity is a small potential and Newton should hold.
Step 3. The source component is , while to leading order . Why: trace reversal turns raw energy density into the effective active gravitational mass, and the geometry reduces to the Laplacian of .
Step 4. Equate: , i.e. . Matching Poisson's equation forces ( with ). Why: only this value makes general relativity contain Newtonian gravity in the weak field — the single experimental input that scales the theory. *The result is , confirming that the field equations reproduce Poisson's equation in the Newtonian limit.*
Limiting cases
The single action generates a family of theories as pieces are toggled.
| Case | Result | Meaning |
|---|---|---|
| Vacuum | With no matter the equations reduce to Ricci-flatness; Schwarzschild, Kerr, and gravitational waves have but . | |
| Cosmological constant | The unique extra term with no metric derivatives; adds to the field equations and drives accelerated expansion. | |
| Weak field / linearized | Expanding to quadratic order in gives the Fierz-Pauli action of a massless spin-2 field — the graviton. | |
| Higher curvature / | Replacing by a nonlinear yields fourth-order equations and an extra propagating scalar degree of freedom. |
Worked examples
1 · How stiff is spacetime? The coupling constant (fully worked)
The field equations read in SI units. Evaluate the coupling and estimate the curvature an everyday energy density — a tank of water — produces.
Step 1. Assemble the coupling. With and , and , so .
Step 2. Estimate the source. Water has ; at rest its dominant stress-energy component is the rest-energy density — huge, because mass is concentrated energy.
Step 3. Multiply through: , so the radius of curvature is — about 1.5 astronomical units, larger than Mars's orbit.
Step 4. A cubic metre of water bends spacetime on the scale of an astronomical unit — the geometry is almost perfectly flat. The tiny coupling is why gravity is the weakest interaction and why laboratory curvature is unmeasurable; only stellar or cosmological energies make macroscopic. The coupling makes spacetime enormously stiff; ordinary matter barely curves it.
2 · The cosmological-constant term as dark energy (fully worked)
Adding to the Lagrangian sources a vacuum energy. Given the observed , find the equivalent mass density and compare it to ordinary matter.
Step 1. Move to the source side. The term contributes on the left; as an effective source on the right it is a perfect fluid with .
Step 2. With , , and : , an energy density .
Step 3. That is roughly a few hydrogen atoms per cubic metre — negligible locally, yet because it fills all space and does not dilute as the universe expands, it dominates today's cosmic energy budget (about 70 percent) and drives accelerated expansion. A vacuum energy of only , the unique derivative-free term in the action, is the leading candidate for dark energy.
3 · Counting the vacuum equations
In vacuum the action gives . How many independent equations is that, and why does the count leave room for coordinate freedom?
Step 1. The Ricci tensor is symmetric in four dimensions, so is equations for the 10 components of — apparently fully determined. But the contracted Bianchi identity gives four automatic identities, so only are truly independent, the missing four being the freedom to choose the four coordinates. Ten equations minus four Bianchi identities leaves six dynamical equations plus four-fold coordinate freedom — the hallmark of a diffeomorphism-invariant theory.
Physics of the portrait
The action is where a mathematician's instinct for economy met a physicist's decade-long struggle — the two arrived at the same doorway within days.
Origins · 1 minDavid Hilbert and how this was discovered
David Hilbert was the towering mathematician of Göttingen, a founder of modern axiomatics whose 1900 list of 23 problems set the agenda for a century — the sixth calling for the axiomatization of physics. In 1915, following Einstein's summer lectures at Göttingen on the still-incomplete theory, Hilbert set out to derive gravitation from a single variational principle. On 20 November 1915 he submitted "Die Grundlagen der Physik," deriving the field equations by demanding the integral of the Ricci scalar be stationary; Einstein, by a separate and more physical route, presented the equations to the Prussian Academy five days later. A long priority debate followed, but the consensus is clean: the physical theory and the equivalence-principle reasoning are Einstein's alone; Hilbert's lasting contribution is the elegant variational derivation and the recognition that gravity fits the action framework of all physics, and he always said the theory belonged to Einstein. One thread completes the story: Hilbert and Felix Klein, puzzled by how energy behaved in the new theory, invited Emmy Noether to Göttingen, and in working out exactly this question she proved the theorems tying symmetry to conservation — the machinery that shows diffeomorphism invariance forces . Action, symmetry, and conservation law were born in the same room.
Going further
Texts. Misner, Thorne & Wheeler, Gravitation (1973), §21.2 · Wald, General Relativity (1984), §E.1 and Appendix E · Carroll, Spacetime and Geometry (2004), §4.3 · Hartle, Gravity (2003), Ch. 22 · Schutz, A First Course in General Relativity (2009), Ch. 8 · Hilbert, Die Grundlagen der Physik (1915). The key checkpoints in this article are: (1) via Jacobi's formula; (2) the Palatini identity; (3) the bulk integrand is the Einstein tensor; (4) the Noether argument giving ; (5) the coupling and from .
Prerequisites. The Einstein Tensor · The Stress-Energy Tensor · Variational Definition of the Stress-Energy Tensor. Leads to. The Einstein Field Equations · Variational Derivation of the Field Equations · The Gibbons-Hawking-York Boundary Term · The Cosmological Constant · Local Conservation of Energy-Momentum.
Ask the tutor: Ask me to carry out any step — the determinant identity, the Palatini divergence, the Newtonian-limit matching, or how the Gibbons-Hawking-York term cancels the boundary piece — in full index notation.
Why the Ricci scalar and not a higher-curvature invariant like R² or R_μν R^μν?
Because is the unique curvature scalar whose second-derivative content assembles into a total divergence, leaving second-order equations. Higher-curvature invariants leave fourth-order terms, which by Ostrogradsky's theorem introduce ghost degrees of freedom — negative-energy modes that destabilize the theory. So is not merely simplest; it is the leading term of an effective-field-theory expansion, the higher invariants being legitimate but Planck-suppressed corrections — the minimal healthy theory of a massless spin-2 field.
Is the Einstein-Hilbert action Hilbert's or Einstein's discovery?
Both names are deserved, for different things. Hilbert was first, by five days, to write gravity as a variational principle and derive the equations from ; that formulation is his. But the physical theory — the equivalence principle, the geometric interpretation, the decade of reasoning that made curved spacetime physical, and an independent derivation of the same equations — is Einstein's alone. Hilbert always credited the theory to Einstein. The modern verdict, from the surviving proof sheets, is that the two reached the same equations essentially simultaneously by different routes; the hyphenated name honours that.
Why is the metric, and not the connection, the field being varied?
In the standard (metric) formulation the Christoffel symbols are the Levi-Civita connection built from , so the metric is the only independent field. In the alternative Palatini formulation, metric and connection are varied independently — yet for the pure Einstein-Hilbert action the connection variation forces the connection to be Levi-Civita anyway, so the two agree. They diverge once you add matter coupling to the connection (fermions) or move to theories. For plain general relativity, varying the metric is simplest and sufficient.
What exactly goes wrong if I forget the Gibbons-Hawking-York term?
The bulk field equations still come out correct — which is what makes the omission easy to miss. What breaks is the variational principle on a region with a boundary: the variation leaves a surface integral depending on the normal derivative of , not fixed even when the metric is held fixed there, so at a solution and the action is not truly stationary. Adding cancels it. This matters concretely: black-hole entropy, on-shell actions in AdS/CFT, and any Euclidean path integral all need the boundary term for finite answers.
Where does the cosmological constant come from in the action?
It is the unique generally covariant term with no metric derivatives: a constant times . Written as , varying it adds to the field equations. Having no derivatives it cannot affect the graviton but it shifts the vacuum. Quantum field theory insists it be there — vacuum fluctuations generate exactly such a term — which is why is unnatural and the tiny observed value poses the cosmological-constant problem. It is the zeroth-order term of the curvature expansion, below .
How can varying an action reproduce a theory Einstein built from physical principles?
This is the recurring miracle of the action principle: a symmetry-respecting scalar, made stationary, reproduces equations found originally by other means. For gravity those means were Einstein's physical reasoning — equivalence principle, covariance, Newtonian limit — and the action encodes the same requirements compactly: covariance from a scalar and , second-order equations from , the coupling from the Newtonian limit. It is not a coincidence but the most economical repackaging of the same physics, which is why it, not the component equations, generalizes to quantum gravity and cosmology.