Einstein-Hilbert action and the boundary terms
The Einstein–Hilbert action looks deceptively simple,
but it is not functionally differentiable on a manifold with boundary under the usual Dirichlet boundary condition “hold the induced metric fixed”. The reason is that contains second derivatives of the metric, so contains boundary terms with normal derivatives of . The GHY term is exactly the boundary functional that cancels those “” terms.
On this page we derive that statement carefully and end with the standard result (for non-null boundaries):
with the sign of the unit normal’s norm.
1. Boundary geometry: , , and
Section titled “1. Boundary geometry: γμν\gamma_{\mu\nu}γμν, nμn^\munμ, and KμνK_{\mu\nu}Kμν”Assume is non-null (time-like or space-like). Let be the outward-pointing unit normal, normalized as
The induced metric (first fundamental form) is the tangential projector
The extrinsic curvature (second fundamental form) is
All boundary indices will be denoted by when we use coordinates intrinsic to .
2. Varying the Einstein–Hilbert action: where the boundary term comes from
Section titled “2. Varying the Einstein–Hilbert action: where the boundary term comes from”Start from
We will use and . Two standard identities are:
- Variation of the determinant:
- The Palatini identity:
with
Using these, one can show that
where
Putting everything together gives the key decomposition:
Therefore,
Using Stokes’ theorem,
so the boundary term from Einstein–Hilbert is
3. Why Dirichlet data on does not kill the Einstein–Hilbert boundary term
Section titled “3. Why Dirichlet data on γab\gamma_{ab}γab does not kill the Einstein–Hilbert boundary term”The usual “Dirichlet” boundary condition in gravity is:
Fix the induced metric on the boundary, i.e. on .
However, the boundary term above contains normal derivatives of , so is not enough.
The cleanest way to see this is to adopt Gaussian normal coordinates near :
In these coordinates,
If we impose , then is still free. One finds that the Einstein–Hilbert boundary variation contains a term of the schematic form
which does not vanish when . This is the precise obstruction: the Einstein–Hilbert action wants you to fix both and its normal derivative if you do not modify the action.
4. The GHY boundary term and its variation
Section titled “4. The GHY boundary term and its variation”To cancel the unwanted normal-derivative piece, add the GHY functional
4.1 Variation of in Gaussian normal coordinates
Section titled “4.1 Variation of ∣γ∣K\sqrt{|\gamma|}K∣γ∣K in Gaussian normal coordinates”In Gaussian normal coordinates,
Vary:
Also,
Therefore
The key point is the first term: it contains exactly the normal derivative that we need to cancel.
Multiplying by the coefficient in gives
which cancels the problematic piece in .
4.2 The combined boundary variation
Section titled “4.2 The combined boundary variation”After the cancellation, the total boundary variation of takes the standard form
So, with Dirichlet boundary conditions , we get on-shell: the variational principle is now well-posed.
5. Final answer (including a cosmological constant)
Section titled “5. Final answer (including a cosmological constant)”With a cosmological constant, the full gravitational action (for non-null boundaries) is
Its variation is
6. Bonus viewpoint: “GHY removes second derivatives” (ADM/Gauss–Codazzi)
Section titled “6. Bonus viewpoint: “GHY removes second derivatives” (ADM/Gauss–Codazzi)”Another way to “see” why the same boundary term must appear is to note that contains second derivatives of the metric. Using a foliation by constant- hypersurfaces, one can rewrite (schematically)
where is the intrinsic Ricci scalar of the hypersurface. Integrating the total divergence produces a boundary integral proportional to . Adding precisely cancels that divergence term, so the bulk Lagrangian becomes “first-derivative” in time (or radial) derivatives, which is what you want for canonical (Hamiltonian/ADM) formulations.
7. Beyond smooth non-null boundaries: joints (corners) and null boundaries
Section titled “7. Beyond smooth non-null boundaries: joints (corners) and null boundaries”The discussion above assumed:
- is smooth, so it has no “boundary of a boundary”, and
- is non-null, so a unit normal exists.
In Lorentzian gravity—especially in holography—these assumptions often fail. The good news is that the needed extensions are known and fit naturally with the GHY logic: add whatever boundary functional cancels the leftover boundary-of-boundary terms in and makes the action additive under gluing.
8. Joint (corner) terms for piecewise smooth non-null boundaries (Hayward term)
Section titled “8. Joint (corner) terms for piecewise smooth non-null boundaries (Hayward term)”8.1 Geometry of a joint
Section titled “8.1 Geometry of a joint”Suppose the boundary is a union of smooth segments,
and two segments and meet along a codimension-2 surface
Let be the induced metric on (often called the “corner metric”), with volume element .
Each segment has its own (outward) unit normal and its own GHY term
When you vary the total action, the cancellation that produced Section 4 happens separately on each segment, but there is still a leftover contribution localized at because the normal (and therefore the adapted Gaussian coordinate) jumps when moving from to .
Concretely, the “” terms in and cancel on each , but in integrating by parts on you produce a boundary term on . For a smooth boundary, is empty; for a piecewise boundary, contains the joints.
8.2 What the leftover variation looks like
Section titled “8.2 What the leftover variation looks like”Under Dirichlet boundary conditions on each (fix ), the remaining joint variation takes the universal form
where is the “angle” (Euclidean) or “boost parameter” (Lorentzian) measuring the relative orientation between the normals and in the 2D normal plane of .
This immediately tells you what to add: a joint term whose variation produces .
8.3 The Hayward joint term
Section titled “8.3 The Hayward joint term”The required joint functional is
How to compute
Section titled “How to compute η\etaη”-
Euclidean signature: and are unit vectors in a Euclidean normal plane, so the dihedral angle is
-
Lorentzian signature: is a rapidity (boost parameter) in the normal plane. The precise “cosh/sinh” relation depends on whether each segment is time-like or space-like. A practical way to record it is case-by-case:
-
If and are both space-like (so are time-like), define
-
If and are both time-like (so are space-like), define
-
If one segment is time-like and the other space-like (the most common “time-slice meets radial wall” corner), define the rapidity by
The joint term depends on the signed (orientation matters). In practice, if you only need the on-shell value (not the detailed variation), choosing a consistent outward/future convention and taking the principal value of is usually sufficient.
-
9. Null boundaries: boundary terms, joint terms, and reparametrization invariance
Section titled “9. Null boundaries: boundary terms, joint terms, and reparametrization invariance”Null boundaries require special care because the normal becomes null and cannot be normalized. Moreover, on a null hypersurface the normal is also tangent, so we must keep track of the choice of null generator.
9.1 Setup for a null boundary
Section titled “9.1 Setup for a null boundary”Let be a null hypersurface ruled by null generators with tangent vector :
where is a parameter along the generators. Choose coordinates on , where label the generators. Each constant- slice has induced (Riemannian) metric and area element .
Define the non-affinity by
If is an affine parameter along the null geodesics, then .
The natural “extrinsic data” on is encoded in the null extrinsic curvature
where is the expansion.
9.2 The null boundary term (analogue of GHY)
Section titled “9.2 The null boundary term (analogue of GHY)”For a region whose boundary includes a null piece , a standard choice of boundary term that yields a well-posed Dirichlet variational principle (fixing the intrinsic geometry on ) is
- If you choose affine, then and this term vanishes.
- For general parametrizations, this term cancels the -type variation that plays the same role as on a non-null boundary.
9.3 Joint terms involving null boundaries
Section titled “9.3 Joint terms involving null boundaries”Just like non-null segments meet at joints, null segments also meet other segments at codimension-2 surfaces. The required joint terms are logarithmic because rescaling a null normal is physical at the level of the action.
Let be a codimension-2 joint with induced metric and area element .
-
Null–non-null joint: if a null boundary with generator meets a non-null boundary with unit normal , then a standard joint term is
-
Null–null joint: if two null boundaries with generators and meet, then a standard choice is
The exact placement of absolute values and additive constants corresponds to conventions (and to the freedom to add local counterterms on ), but the logarithmic dependence is robust.
9.4 A useful counterterm: restoring reparametrization invariance on null boundaries
Section titled “9.4 A useful counterterm: restoring reparametrization invariance on null boundaries”In many holographic applications (notably the “complexity = action” proposal), one wants the action to be independent of how one parametrizes the null generators. A widely used fix is to add the null counterterm
where is an arbitrary length scale. This term:
- is intrinsic to (depends only on and its -derivative),
- does not affect the bulk equations of motion,
- shifts the action by quantities that behave like boundary “scheme choices”, and
- makes the total null-boundary contribution invariant under in the settings where it is used.
10. Applications
Section titled “10. Applications”Lorentzian path integrals and Hamiltonian evolution in a finite region: When a spacetime region is bounded by two space-like “initial/final time” slices together with a time-like wall (a finite box or radial cutoff), codimension-2 corners appear where each slice meets the wall. The Hayward joint term contributes there and is needed for additivity under gluing regions in time, obtaining the correct Hamiltonian/ADM interpretation of the action, and keeping the variational principle well-posed when you fix the induced metric on each boundary segment separately.
Wheeler–DeWitt patches and holographic complexity (CA proposal): A Wheeler–DeWitt patch is typically bounded by null hypersurfaces shot inward from specified boundary times. The gravitational action for such a region generically requires null boundary terms (often evaluated with an affine choice so that ), logarithmic null joint terms where null sheets intersect each other and/or a regulator surface, and frequently the reparametrization-invariance counterterm . The dominant time dependence often comes from the joint terms at the intersections.
These boundary and joint terms also appear in actions of causal diamonds and entanglement wedges bounded partly by null surfaces, gravitational thermodynamics in Lorentzian signature when regulating spacetime regions with mixed (time-like/space-like) cutoffs, and any computation where actions of regions are compared after cutting and gluing along non-smooth hypersurfaces.
Quick reference: the full “good” gravitational action for generic boundaries
Section titled “Quick reference: the full “good” gravitational action for generic boundaries”For a spacetime region in dimensions with bulk metric and (possibly mixed) boundary, a standard “good” gravitational action is
Here:
- are non-null boundary pieces with induced metric and extrinsic curvature (this term is the usual GHY term).
- are null boundary pieces with generator and non-affinity .
- are non-null joints (Hayward term) with “angle/boost” .
- are joints involving at least one null boundary with logarithmic integrand .
- is the common null counterterm used to restore reparametrization invariance (see Section 9.4). Signs and corner conventions vary by author; this page keeps the most common “outward normal” conventions and flags where choices enter.
For Euclidean gravity with smooth boundaries, only the first line matters.