Variational Definition of Stress-Energy

Every field theory has to answer one blunt question before it can be coupled to gravity: given a bag of matter — a scalar field, an electromagnetic field, a fluid — what, exactly, is its energy and momentum? In flat space one can grope toward an answer through Noether's theorem for spacetime translations, but the object it produces, the canonical stress tensor, is a disappointment: it is generally not symmetric, not gauge invariant, and not obviously the thing that should curve spacetime. General relativity demands better — the right-hand side of Gμν=8πG TμνG_{\mu\nu}=8\pi G\,T_{\mu\nu} is a symmetric, conserved, two-index tensor, and the source that feeds it must be built to match. The variational — or Hilbert — definition supplies that source with a single, unambiguous prescription: the stress-energy tensor is the response of the matter action to a deformation of the spacetime metric, Tμν=−2−g δ(−g Lm)/δgμνT_{\mu\nu}=-\tfrac{2}{\sqrt{-g}}\,\delta(\sqrt{-g}\,\mathcal{L}_{\mathrm m})/\delta g^{\mu\nu}. This is not a definition of convenience; it is forced by the logic of the action principle, because the same variation δgμν\delta g^{\mu\nu} that turns the Einstein-Hilbert action into the Einstein tensor turns the matter action into TμνT_{\mu\nu} — the two sides of the field equations are born from one operation. And it comes with a bonus no bookkeeping could have guaranteed: because the recipe differentiates with respect to the symmetric tensor gμνg^{\mu\nu}, the result is automatically symmetric, and because the matter action is a coordinate scalar, its diffeomorphism invariance forces ∇μTμν=0\nabla^\mu T_{\mu\nu}=0 as a Noether identity. Conservation is not an extra postulate here — it is the shadow general covariance casts on the matter sector, mirroring the contracted Bianchi identity ∇μGμν=0\nabla^\mu G_{\mu\nu}=0 on the geometry side.

Key takeaways
  • The matter stress-energy tensor is the functional derivative of the matter action with respect to the inverse metric, Tμν=−2−g δ(−g Lm)/δgμν=−2 ∂Lm/∂gμν+gμνLmT_{\mu\nu}=-\tfrac{2}{\sqrt{-g}}\,\delta(\sqrt{-g}\,\mathcal{L}_{\mathrm m})/\delta g^{\mu\nu}=-2\,\partial\mathcal{L}_{\mathrm m}/\partial g^{\mu\nu}+g_{\mu\nu}\mathcal{L}_{\mathrm m}.
  • This Hilbert tensor is automatically symmetric and gauge covariant, unlike the canonical Noether tensor from translation invariance — no Belinfante–Rosenfeld repair is needed.
  • Varying the total action SEH+SmS_{\mathrm{EH}}+S_{\mathrm m} with respect to gμνg^{\mu\nu} yields the Einstein field equations Gμν=8πG TμνG_{\mu\nu}=8\pi G\,T_{\mu\nu} with this TμνT_{\mu\nu} as the source.
  • Diffeomorphism invariance of SmS_{\mathrm m} forces ∇μTμν=0\nabla^\mu T_{\mu\nu}=0 automatically — local energy-momentum conservation is a symmetry identity, not a separate law.
  • A constant Lagrangian Lm=−ρΛ\mathcal{L}_{\mathrm m}=-\rho_\Lambda gives Tμν=−ρΛgμνT_{\mu\nu}=-\rho_\Lambda g_{\mu\nu}: a perfect fluid with p=−ρΛp=-\rho_\Lambda, the cosmological constant / vacuum energy.
  • The recipe reproduces the familiar tensors for scalars, electromagnetism, point particles, and perfect fluids, and defines ⟨Tμν⟩\langle T_{\mu\nu}\rangle in curved-space quantum field theory.
  • Key idea: Stress-energy is the gravitational current — the object that measures how strongly a matter action resists a change of the metric, Tμν=−2−g δ(−gLm)/δgμνT_{\mu\nu}=-\tfrac{2}{\sqrt{-g}}\,\delta(\sqrt{-g}\mathcal{L}_{\mathrm m})/\delta g^{\mu\nu} — and its conservation is the Noether identity of diffeomorphism invariance.
The core insight

Stress-energy is the gravitational current: it is precisely the object that measures how strongly a matter action resists a change of the metric, Tμν=−2−g δ(−gLm)/δgμνT_{\mu\nu}=-\tfrac{2}{\sqrt{-g}}\,\delta(\sqrt{-g}\mathcal{L}_{\mathrm m})/\delta g^{\mu\nu}, and its conservation is the Noether identity of diffeomorphism invariance.

Where this lives today

The variational stress-energy tensor is not a museum piece; it is the daily working definition wherever matter meets curved spacetime. In numerical relativity — the simulations that produced the waveform templates LIGO and Virgo match against merging black holes and neutron stars — the matter source is coded as the Hilbert TμνT_{\mu\nu} of a relativistic fluid or magnetofluid, and its automatic conservation ∇μTμν=0\nabla^\mu T_{\mu\nu}=0 is what the evolution schemes enforce to stay stable. In cosmology the entire dark-energy programme is a debate about the constant term in the matter action: is the observed w≈−1w\approx-1 (measured by DESI, Planck, and Type Ia supernovae to a few percent) a true cosmological constant, or a slowly-rolling quintessence scalar whose TμνT_{\mu\nu} only approximates −ρΛgμν-\rho_\Lambda g_{\mu\nu}? The variational definition is the common language in which those alternatives are even stated. In quantum field theory on curved spacetime, the renormalized ⟨Tμν⟩\langle T_{\mu\nu}\rangle — defined by varying the effective action with respect to the metric — drives Hawking radiation and the conformal (trace) anomaly, where ⟨Tμμ⟩≠0\langle T^\mu{}_\mu\rangle\neq0 even for a classically traceless field because regularization smuggles in a scale. And in the effective-field-theory formulation of relativistic hydrodynamics, TμνT_{\mu\nu} is derived order by order from an action for the comoving matter variables, guaranteeing thermodynamic consistency and conservation at every order — the systematic descendant of Hilbert's single scalar functional.

The physical picture

Picture the matter action SmS_{\mathrm m} not as a number but as a machine that eats a spacetime geometry and returns a single real number. Feed it flat Minkowski space and it returns one value; feed it a slightly bumped metric and it returns another. The stress-energy tensor is the sensitivity of that machine to the bump — the gradient of the action in the abstract space of all metrics. Where matter is dense and energetic, the action changes steeply as you deform the metric there: the matter "pushes back" hard against the geometry, and that push-back, component by component, is exactly the local energy density, momentum flux, and stress. Where spacetime is empty, the machine does not care how you wiggle the metric, and Tμν=0T_{\mu\nu}=0. The prefactor −2/−g-2/\sqrt{-g} is only a change of units — it strips off the volume-element density and fixes the sign so that ordinary matter has positive energy density — but the geometry of "action as a landscape over metrics, stress-energy as its slope" is the whole physical content.

Figure
Stress-energy as the gradient of the matter action over the space of metrics: deforming the inverse metric by δg^μν changes S_m by δS_m = −½ ∫ √(−g) T_μν δg^μν d⁴x, so the local slope of the action landscape is exactly −½√(−g) T_μν
The matter action S_m is a landscape over metrics; T_μν is its slope deformation of the metric g^μν(t) matter action S_m operating point g^μν δg^μν δS_m slope = δS_m ⁄ δg^μν = −½ √(−g) T_μν

Two further ideas sit inside this one picture, and they are what make the variational definition indispensable rather than merely elegant. The first is self-symmetrization. Because the variable you differentiate with respect to, gμνg^{\mu\nu}, is a symmetric tensor, the derivative δ/δgμν\delta/\delta g^{\mu\nu} cannot help but produce something symmetric in μν\mu\nu — the improvement terms that the canonical Noether tensor needs for spinning fields are performed for free. The second is conservation from covariance. A pure relabelling of coordinates cannot change a scalar; but a coordinate change acts on the metric as a Lie derivative, δξgμν=−(∇μξν+∇νξμ)\delta_\xi g^{\mu\nu}=-(\nabla^\mu\xi^\nu+\nabla^\nu\xi^\mu), and demanding that this particular deformation leaves the on-shell action unchanged is, term by term, the statement ∇μTμν=0\nabla^\mu T_{\mu\nu}=0. Energy-momentum conservation is thus the gravitational analogue of charge conservation from gauge invariance. The second figure shows why one prescription is worth so much: a single operation, applied to three different matter Lagrangians, returns three different stress-energy tensors — and reads off their traces, which encode whether the matter has an intrinsic scale.

Figure
One operation δ⁄δg^μν, three matter models, three stress-energy tensors: the scalar field has nonzero trace T = −(∂φ)² − 4V, source-free electromagnetism is traceless T = 0, and a constant Lagrangian gives the vacuum fluid T_μν = −ρ_Λ g_μν with equation of state w = p⁄ρ = −1 and measured ρ_Λ ≈ 6×10⁻²⁷ kg m⁻³
The same variation, three Lagrangians, three stress-energy tensors matter Lagrangian L_m apply T_μν = −2 ∂L⁄∂g^μν + g_μν L trace T = g^μν T_μν scalar L = −½(∂φ)² − V T_μν = ∂_μφ ∂_νφ − g_μν(½(∂φ)² + V) T = −(∂φ)² − 4V ≠ 0 Maxwell L = −¼ F_αβ F^αβ T_μν = F_μα F_ν^α − ¼ g_μν F_αβ F^αβ T = 0 (conformal) vacuum L = −ρ_Λ (constant) T_μν = −ρ_Λ g_μν T = −4ρ_Λ The vacuum fluid, with real numbers equation of state w = p ⁄ ρ = −1 ρ_Λ ≈ 6×10⁻²⁷ kg m⁻³ ≈ 5.3×10⁻¹⁰ J m⁻³ cosmological constant Λ = 8πG ρ_Λ ⁄ c² ≈ 1.1×10⁻⁵² m⁻² (from Planck 2018)

The core equations

The definition itself is the anchor of the whole article: it says how to manufacture TμνT_{\mu\nu} from any matter Lagrangian by varying the metric. The second equality — obtained by expanding the variation of the volume element −g\sqrt{-g} — is the working form used in every calculation, because it isolates the explicit gμνg^{\mu\nu} dependence of Lm\mathcal{L}_{\mathrm m} and adds a universal trace piece.

Tμν=−2−gδ ⁣(−g Lm)δgμν=−2 ∂Lm∂gμν+gμν Lm(1)T_{\mu\nu}=-\frac{2}{\sqrt{-g}}\frac{\delta\!\left(\sqrt{-g}\,\mathcal{L}_{\mathrm{m}}\right)}{\delta g^{\mu\nu}}=-2\,\frac{\partial \mathcal{L}_{\mathrm{m}}}{\partial g^{\mu\nu}}+g_{\mu\nu}\,\mathcal{L}_{\mathrm{m}} \qquad (1)

where: TμνT_{\mu\nu} — Hilbert (metric) stress-energy tensor; gg — determinant of gμνg_{\mu\nu}; Lm\mathcal{L}_{\mathrm{m}} — matter Lagrangian scalar; gμνg^{\mu\nu} — inverse metric, the variational variable. Reading it: differentiate the Lagrangian with respect to the inverse metric, double it with a minus sign, and add gμνLmg_{\mu\nu}\mathcal{L}_{\mathrm m} for the volume-element contribution. The universal trace piece comes entirely from how the invariant volume −g d4x\sqrt{-g}\,\mathrm{d}^4x responds to a metric deformation. This identity, from Jacobi's formula for the derivative of a determinant, is the single most reused line in variational relativity.

δ−g=−12−g gμν δgμν=+12−g gμν δgμν(2)\delta\sqrt{-g}=-\tfrac12\sqrt{-g}\,g_{\mu\nu}\,\delta g^{\mu\nu}=+\tfrac12\sqrt{-g}\,g^{\mu\nu}\,\delta g_{\mu\nu} \qquad (2)

where: δgμν\delta g^{\mu\nu} — variation of the inverse metric; δgμν=−gμαgνβ δgαβ\delta g_{\mu\nu}=-g_{\mu\alpha}g_{\nu\beta}\,\delta g^{\alpha\beta} — variation of the metric. The two forms differ by a sign because raising the indices on the variation flips it; this is the root of every "which sign?" convention headache. Gravity and matter meet in one functional. The total action is the Einstein-Hilbert term plus the matter term, each integrated against the same invariant volume, and the field equations are what you get by holding the whole thing stationary against δgμν\delta g^{\mu\nu}.

S=116πG∫d4x −g R+∫d4x −g Lm(3)S=\frac{1}{16\pi G}\int \mathrm{d}^4x\,\sqrt{-g}\,R+\int \mathrm{d}^4x\,\sqrt{-g}\,\mathcal{L}_{\mathrm m} \qquad (3)

where: RR — Ricci scalar; GG — Newton's constant; SS — total gravity-plus-matter action. Reading it: the coefficient 1/16πG1/16\pi G is fixed by demanding the Newtonian limit; the matter piece carries all the fields ψ\psi hidden inside Lm\mathcal{L}_{\mathrm m}. Setting δS/δgμν=0\delta S/\delta g^{\mu\nu}=0 makes the geometric variation of the first term cancel the matter variation of the second. The Einstein-Hilbert variation supplies GμνG_{\mu\nu}; the matter variation supplies precisely −12−g Tμν-\tfrac12\sqrt{-g}\,T_{\mu\nu}, and the two balance.

116πG(Rμν−12R gμν)=12 Tμν    ⟹    Gμν=8πG Tμν(4)\frac{1}{16\pi G}\left(R_{\mu\nu}-\tfrac12 R\,g_{\mu\nu}\right)=\tfrac12\, T_{\mu\nu}\;\;\Longrightarrow\;\;G_{\mu\nu}=8\pi G\,T_{\mu\nu} \qquad (4)

where: RμνR_{\mu\nu} — Ricci tensor; Gμν=Rμν−12RgμνG_{\mu\nu}=R_{\mu\nu}-\tfrac12 R g_{\mu\nu} — Einstein tensor. Reading it: the very variation that defines TμνT_{\mu\nu} is the variation that sources the field equations, so the definition and the coupling are one and the same operation. Conservation enters not as a new equation but as a consequence of invariance. Under an infinitesimal diffeomorphism generated by ξμ\xi^\mu, the inverse metric shifts by minus its Lie derivative; demanding that a coordinate-scalar action be blind to this shift, on-shell, forces the covariant divergence of TμνT_{\mu\nu} to vanish.

δξgμν=−(∇μξν+∇νξμ)=−Lξgμν    ⟹    ∇μTμν=0(5)\delta_\xi g^{\mu\nu}=-(\nabla^\mu\xi^\nu+\nabla^\nu\xi^\mu)=-\mathcal{L}_\xi g^{\mu\nu}\;\;\Longrightarrow\;\;\nabla^\mu T_{\mu\nu}=0 \qquad (5)

where: ξμ\xi^\mu — generator of the diffeomorphism; Lξ\mathcal{L}_\xi — Lie derivative along ξ\xi; ∇μ\nabla_\mu — metric-compatible covariant derivative. Reading it: general covariance of SmS_{\mathrm m} is the symmetry, and ∇μTμν=0\nabla^\mu T_{\mu\nu}=0 is its Noether identity — the exact mirror of ∇μGμν=0\nabla^\mu G_{\mu\nu}=0. The trace of TμνT_{\mu\nu} is a physically loaded scalar: it measures whether the matter carries an intrinsic scale. It contrasts sharply with the flat-space canonical tensor, which the Hilbert construction quietly repairs.

T=gμνTμν,Tμνcan=∂L∂(∂μϕ) ∂νϕ−ημνL(6)T=g^{\mu\nu}T_{\mu\nu},\qquad T_{\mu\nu}^{\mathrm{can}}=\frac{\partial\mathcal{L}}{\partial(\partial^\mu\phi)}\,\partial_\nu\phi-\eta_{\mu\nu}\mathcal{L} \qquad (6)

where: TT — trace of stress-energy, zero for conformally invariant matter (e.g. source-free electromagnetism in four dimensions); TμνcanT_{\mu\nu}^{\mathrm{can}} — canonical Noether tensor from spacetime translations, generally neither symmetric nor gauge invariant; ημν\eta_{\mu\nu} — flat metric. Reading it: the Hilbert tensor is what the canonical tensor becomes once you add the Belinfante–Rosenfeld improvement, packaged automatically.

Derivation AFrom a nudge of the metric to the stress-energy tensor

The goal is to derive the working second form of the Hilbert definition, Tμν=−2 ∂Lm/∂gμν+gμνLmT_{\mu\nu}=-2\,\partial\mathcal{L}_{\mathrm m}/\partial g^{\mu\nu}+g_{\mu\nu}\mathcal{L}_{\mathrm m}, starting only from the statement that TμνT_{\mu\nu} is minus twice the metric-variation of the matter action per unit invariant volume. The one nontrivial ingredient is how the volume element −g\sqrt{-g} itself responds to a metric deformation; everything else is the product rule. Getting the −g\sqrt{-g} term right is what separates a correct TμνT_{\mu\nu} — with its pressure and its cosmological-constant piece — from a truncated one that silently drops the entire trace contribution.

Step 1. Write the matter action as Sm=∫d4x −g LmS_{\mathrm m}=\int\mathrm{d}^4x\,\sqrt{-g}\,\mathcal{L}_{\mathrm m} and vary only the metric, holding the matter fields ψ\psi at their on-shell values so that δSm/δψ=0\delta S_{\mathrm m}/\delta\psi=0. The integrand's variation is then δ(−g Lm)=−g (∂Lm/∂gμν) δgμν+Lm δ−g\delta(\sqrt{-g}\,\mathcal{L}_{\mathrm m})=\sqrt{-g}\,(\partial\mathcal{L}_{\mathrm m}/\partial g^{\mu\nu})\,\delta g^{\mu\nu}+\mathcal{L}_{\mathrm m}\,\delta\sqrt{-g}. Why: on-shell the field-equation terms vanish, so the entire response of the action is carried by the explicit metric dependence — the definition of stress-energy is exactly this leftover.

Step 2. Evaluate δ−g\delta\sqrt{-g} from Jacobi's formula δg=g gμνδgμν\delta g=g\,g^{\mu\nu}\delta g_{\mu\nu}. Using gμνδgμν=−gμνδgμνg_{\mu\nu}\delta g^{\mu\nu}=-g^{\mu\nu}\delta g_{\mu\nu} (from varying gμαgαν=δμνg^{\mu\alpha}g_{\alpha\nu}=\delta^\mu{}_\nu) gives δ−g=−12−g gμν δgμν\delta\sqrt{-g}=-\tfrac12\sqrt{-g}\,g_{\mu\nu}\,\delta g^{\mu\nu}. Why: this factor is universal — it multiplies whatever Lm\mathcal{L}_{\mathrm m} happens to be, which is why every stress-energy tensor carries a +gμνLm+g_{\mu\nu}\mathcal{L}_{\mathrm m} term regardless of the matter content.

Step 3. Substitute Step 2 into Step 1: δ(−g Lm)=−g[∂Lm/∂gμν−12gμνLm]δgμν\delta(\sqrt{-g}\,\mathcal{L}_{\mathrm m})=\sqrt{-g}\big[\partial\mathcal{L}_{\mathrm m}/\partial g^{\mu\nu}-\tfrac12 g_{\mu\nu}\mathcal{L}_{\mathrm m}\big]\delta g^{\mu\nu}. Dividing by −g\sqrt{-g} and multiplying by the calibration factor −2-2 collapses the bracket into Tμν=−2 ∂Lm/∂gμν+gμνLmT_{\mu\nu}=-2\,\partial\mathcal{L}_{\mathrm m}/\partial g^{\mu\nu}+g_{\mu\nu}\mathcal{L}_{\mathrm m}. Why: the −2-2 is chosen once and for all so that ordinary matter has T00>0T_{00}>0; with it fixed, the recipe is a turnkey machine — hand it any Lm\mathcal{L}_{\mathrm m} and it returns a symmetric tensor.

Step 4. Confirm the symmetry and the trace. Because gμν=gνμg^{\mu\nu}=g^{\nu\mu}, the derivative ∂Lm/∂gμν\partial\mathcal{L}_{\mathrm m}/\partial g^{\mu\nu} is automatically symmetric, and gμνg_{\mu\nu} is symmetric, so Tμν=TνμT_{\mu\nu}=T_{\nu\mu} with no extra work; contracting with gμνg^{\mu\nu} gives T=−2 gμν∂Lm/∂gμν+4LmT=-2\,g^{\mu\nu}\partial\mathcal{L}_{\mathrm m}/\partial g^{\mu\nu}+4\mathcal{L}_{\mathrm m} in four dimensions. Why: symmetry is the property the canonical tensor lacks and the Einstein equations require, and here it is free — a direct consequence of differentiating with respect to a symmetric object.

Go deeper · Derivation B · 1 minConservation as the Noether identity of diffeomorphism invariance
Derivation BConservation as the Noether identity of diffeomorphism invariance

The goal is to show that ∇μTμν=0\nabla^\mu T_{\mu\nu}=0 is not an independent physical law but an automatic consequence of the matter action being a coordinate scalar. The argument uses only three facts: that a diffeomorphism acts on the metric as a Lie derivative, that TμνT_{\mu\nu} is symmetric, and that a scalar action cannot change under a mere relabelling of coordinates. Assembling them shows that covariant conservation is to diffeomorphism invariance what electric-charge conservation is to gauge invariance — a symmetry identity, valid on-shell for the matter fields regardless of what the matter is.

Step 1. Vary the metric alone, with matter on-shell, so that δSm=−12∫d4x −g Tμν δgμν\delta S_{\mathrm m}=-\tfrac12\int\mathrm{d}^4x\,\sqrt{-g}\,T_{\mu\nu}\,\delta g^{\mu\nu} directly from the Hilbert definition. Why: on-shell the only surviving response of the action is the metric one, and it is packaged precisely by TμνT_{\mu\nu} — so this expression is exact, not an approximation.

Step 2. Choose the metric variation to be an infinitesimal diffeomorphism, δgμν=−(∇μξν+∇νξμ)\delta g^{\mu\nu}=-(\nabla^\mu\xi^\nu+\nabla^\nu\xi^\mu), the Lie derivative of gμνg^{\mu\nu} along an arbitrary compactly supported vector field ξμ\xi^\mu. Why: a diffeomorphism is a pure coordinate relabelling, and a coordinate-scalar action must be exactly invariant under it — this is the symmetry we will cash in.

Step 3. Insert Step 2 into Step 1 and use the symmetry Tμν=TνμT_{\mu\nu}=T_{\nu\mu} to combine the two terms, giving δξSm=∫d4x −g Tμν ∇μξν\delta_\xi S_{\mathrm m}=\int\mathrm{d}^4x\,\sqrt{-g}\,T_{\mu\nu}\,\nabla^\mu\xi^\nu. Why: symmetry lets the two symmetrized derivative terms collapse into one, which is why the whole argument would fail for the non-symmetric canonical tensor.

Step 4. Integrate by parts with the covariant divergence theorem, discarding the boundary term because ξ\xi has compact support: δξSm=−∫d4x −g (∇μTμν) ξν\delta_\xi S_{\mathrm m}=-\int\mathrm{d}^4x\,\sqrt{-g}\,(\nabla^\mu T_{\mu\nu})\,\xi^\nu. Why: moving the derivative off ξ\xi and onto TμνT_{\mu\nu} isolates the divergence, turning an invariance statement into a pointwise condition.

Step 5. Demand invariance, δξSm=0\delta_\xi S_{\mathrm m}=0 for every ξν\xi^\nu. The arbitrariness of ξ\xi forces ∇μTμν=0\nabla^\mu T_{\mu\nu}=0 everywhere. Why: this is the Noether identity of general covariance, and it must agree with the geometry side — indeed the contracted Bianchi identity ∇μGμν=0\nabla^\mu G_{\mu\nu}=0 is exact and geometric, so Gμν=8πG TμνG_{\mu\nu}=8\pi G\,T_{\mu\nu} independently forces the same conservation, a consistency check the two derivations pass together.

Go deeper · Derivation C · 1 minThe electromagnetic stress-energy and why its trace vanishes
Derivation CThe electromagnetic stress-energy and why its trace vanishes

The goal is to run the Hilbert recipe on the Maxwell Lagrangian Lm=−14FαβFαβ\mathcal{L}_{\mathrm m}=-\tfrac14 F_{\alpha\beta}F^{\alpha\beta} and recover the symmetric, gauge-invariant, traceless electromagnetic stress-energy tensor Tμν=FμαFνα−14gμνFαβFαβT_{\mu\nu}=F_{\mu\alpha}F_\nu{}^{\alpha}-\tfrac14 g_{\mu\nu}F_{\alpha\beta}F^{\alpha\beta} — the same object that, in flat space, needed a Belinfante correction to symmetrize the canonical tensor. Along the way the tracelessness falls out as a clean four-dimensional accident that encodes the conformal invariance of source-free electromagnetism, and hence the masslessness and scale-freedom of the photon.

Step 1. Write the Lagrangian with all metric dependence explicit, Lm=−14gαγgβδFαβFγδ\mathcal{L}_{\mathrm m}=-\tfrac14 g^{\alpha\gamma}g^{\beta\delta}F_{\alpha\beta}F_{\gamma\delta}, treating Fαβ=∂αAβ−∂βAαF_{\alpha\beta}=\partial_\alpha A_\beta-\partial_\beta A_\alpha as metric-independent (it is built from the connection-free curl of AA). Why: only the raised-index contractions carry the metric, so the variation acts on the two factors of gμνg^{\mu\nu} and nothing else — the gauge field itself is inert.

Step 2. Differentiate: each of the two inverse metrics contributes equally, so ∂Lm/∂gμν=−12FμαFνβgαβ=−12FμαFνα\partial\mathcal{L}_{\mathrm m}/\partial g^{\mu\nu}=-\tfrac12 F_{\mu\alpha}F_{\nu\beta}g^{\alpha\beta}=-\tfrac12 F_{\mu\alpha}F_\nu{}^{\alpha}. Why: the factor of two from the two identical metric factors exactly cancels the 14\tfrac14, leaving the clean bilinear in FF that becomes the Poynting/Maxwell-stress part of TμνT_{\mu\nu}.

Step 3. Apply the definition Tμν=−2 ∂Lm/∂gμν+gμνLmT_{\mu\nu}=-2\,\partial\mathcal{L}_{\mathrm m}/\partial g^{\mu\nu}+g_{\mu\nu}\mathcal{L}_{\mathrm m} to get Tμν=FμαFνα−14gμνFαβFαβT_{\mu\nu}=F_{\mu\alpha}F_\nu{}^{\alpha}-\tfrac14 g_{\mu\nu}F_{\alpha\beta}F^{\alpha\beta}, manifestly symmetric and gauge invariant since it depends only on FF. Why: no improvement term is needed — the curved-metric variation has performed the Belinfante–Rosenfeld symmetrization automatically, which is the practical payoff of the whole construction.

Step 4. Take the trace in four dimensions: gμνFμαFνα=FναFναg^{\mu\nu}F_{\mu\alpha}F_\nu{}^{\alpha}=F^{\nu\alpha}F_{\nu\alpha} while gμνgμν=4g^{\mu\nu}g_{\mu\nu}=4, so T=F2−14⋅4 F2=0T=F^2-\tfrac14\cdot 4\,F^2=0. Why: the 14\tfrac14 is dimension-dependent — in dd dimensions the trace is −d−44F2-\tfrac{d-4}{4}F^2, so tracelessness is special to d=4d=4 and is the fingerprint of the classical conformal invariance that a massless, scale-free field enjoys only there.

Limiting cases

The single definition specializes to every standard matter model; each row is the output of the same δ/δgμν\delta/\delta g^{\mu\nu} machine fed a different Lagrangian.

CaseResultMeaning
Scalar fieldTμν=∂μϕ ∂νϕ−gμν ⁣(12(∂ϕ)2+V)T_{\mu\nu}=\partial_\mu\phi\,\partial_\nu\phi-g_{\mu\nu}\!\left(\tfrac12(\partial\phi)^2+V\right)From L=−12(∂ϕ)2−V\mathcal{L}=-\tfrac12(\partial\phi)^2-V; the first term is canonical, the gμνLg_{\mu\nu}\mathcal{L} term supplies pressure. Trace T=−(∂ϕ)2−4V≠0T=-(\partial\phi)^2-4V\neq0.
ElectromagnetismTμν=FμαFνα−14gμνFαβFαβT_{\mu\nu}=F_{\mu\alpha}F_\nu{}^{\alpha}-\tfrac14 g_{\mu\nu}F_{\alpha\beta}F^{\alpha\beta}From L=−14F2\mathcal{L}=-\tfrac14 F^2; automatically symmetric, gauge invariant, and traceless in d=4d=4 — no Belinfante repair.
Vacuum energy / Λ\LambdaTμν=−ρΛ gμνT_{\mu\nu}=-\rho_\Lambda\,g_{\mu\nu}From a constant L=−ρΛ\mathcal{L}=-\rho_\Lambda; only the δ−g\delta\sqrt{-g} term survives, a perfect fluid with p=−ρΛp=-\rho_\Lambda, w=−1w=-1.
Perfect fluidTμν=(ρ+p) uμuν+p gμνT_{\mu\nu}=(\rho+p)\,u_\mu u_\nu+p\,g_{\mu\nu}From a comoving-fluid action with ρ(n)\rho(n); pressure emerges as p=n dρ/dn−ρp=n\,\mathrm{d}\rho/\mathrm{d}n-\rho from the metric variation.
Point particleTμν(x)=m−g ⁣∫ ⁣dτ uμuν δ4(x−z(τ))T^{\mu\nu}(x)=\dfrac{m}{\sqrt{-g}}\!\int\! \mathrm{d}\tau\,u^\mu u^\nu\,\delta^4(x-z(\tau))From the worldline action −m ⁣∫ ⁣dτ-m\!\int\!\mathrm{d}\tau; a delta-supported dust element, the pressureless limit of the fluid.

Worked examples

1 · The cosmological constant from a constant Lagrangian (fully worked)

Take the simplest possible matter Lagrangian — a constant, Lm=−ρΛ\mathcal{L}_{\mathrm m}=-\rho_\Lambda, representing a uniform energy density of empty space. Find its stress-energy tensor, its equation of state, and, using the measured dark-energy density ρΛ≈6×10−27 kg m−3\rho_\Lambda\approx 6\times10^{-27}\ \mathrm{kg\,m^{-3}}, the numerical value of the cosmological constant Λ\Lambda.

Step 1. Apply the working definition. A constant has no explicit gμνg^{\mu\nu} dependence, so ∂Lm/∂gμν=0\partial\mathcal{L}_{\mathrm m}/\partial g^{\mu\nu}=0 and the entire result comes from the volume-element term: Tμν=−2(0)+gμν(−ρΛ)=−ρΛ gμνT_{\mu\nu}=-2(0)+g_{\mu\nu}(-\rho_\Lambda)=\mathbf{-\rho_\Lambda\,g_{\mu\nu}}. Every ounce of this tensor is the δ−g\delta\sqrt{-g} contribution — the term a careless calculation would drop.

Step 2. Read off the fluid content. Comparing Tμν=−ρΛgμνT_{\mu\nu}=-\rho_\Lambda g_{\mu\nu} with the perfect-fluid form Tμν=(ρ+p)uμuν+p gμνT_{\mu\nu}=(\rho+p)u_\mu u_\nu+p\,g_{\mu\nu} in the rest frame (where uμuνu_\mu u_\nu contributes only to the time-time slot and gμν=diag(−1,1,1,1)g_{\mu\nu}=\mathrm{diag}(-1,1,1,1)): the energy density is ρ=T00/1=ρΛ\rho=T_{00}/1=\rho_\Lambda and the pressure is p=−ρΛp=-\rho_\Lambda. Hence the equation of state is w≡p/ρ=−1w\equiv p/\rho=\mathbf{-1} — the defining signature of a cosmological constant, and why vacuum energy drives accelerated expansion rather than resisting it.

Step 3. Locate Λ\Lambda in the field equations. Moving −ρΛgμν-\rho_\Lambda g_{\mu\nu} to the geometry side, Gμν+Λgμν=8πG TμνotherG_{\mu\nu}+\Lambda g_{\mu\nu}=8\pi G\,T_{\mu\nu}^{\text{other}} with Λ=8πG ρΛ/c4⋅c2\Lambda=8\pi G\,\rho_\Lambda/c^4\cdot c^2; in the clean relation Λ=8πGρΛ/c2\Lambda=8\pi G\rho_\Lambda/c^2 (energy density) the constant and the vacuum energy are two names for one constant in the action. This is why "is Λ\Lambda geometry or matter?" has no invariant answer — both spring from the same constant term.

Step 4. Put in numbers. With G=6.674×10−11 m3 kg−1 s−2G=6.674\times10^{-11}\ \mathrm{m^3\,kg^{-1}\,s^{-2}}, c=3.00×108 m s−1c=3.00\times10^{8}\ \mathrm{m\,s^{-1}}, and ρΛ=6×10−27 kg m−3\rho_\Lambda=6\times10^{-27}\ \mathrm{kg\,m^{-3}}: Λ=8π(6.674×10−11)(6×10−27)(3.00×108)2=1.006×10−359.0×1016≈1.1×10−52 m−2\Lambda=\dfrac{8\pi(6.674\times10^{-11})(6\times10^{-27})}{(3.00\times10^{8})^2}=\dfrac{1.006\times10^{-35}}{9.0\times10^{16}}\approx\mathbf{1.1\times10^{-52}\ m^{-2}}. The corresponding vacuum energy density is ρΛc2≈(6×10−27)(9×1016)≈5.4×10−10 J m−3\rho_\Lambda c^2\approx(6\times10^{-27})(9\times10^{16})\approx\mathbf{5.4\times10^{-10}\ J\,m^{-3}}. Both match the Planck-2018 concordance values — and both sit about 120120 orders of magnitude below the naive quantum-field-theory estimate of the vacuum energy, the cosmological-constant problem in one line.

2 · A homogeneous scalar field interpolates to the vacuum limit

A spatially uniform scalar field ϕ(t)\phi(t) in a flat cosmology has Lm=−12(∂ϕ)2−V(ϕ)\mathcal{L}_{\mathrm m}=-\tfrac12(\partial\phi)^2-V(\phi). Show that its stress-energy is that of a perfect fluid, find ρ\rho, pp, and ww, and show that when the field rolls slowly it reproduces Example 1.

Step 1. Specialize the scalar tensor. For a homogeneous field only the time derivative survives, ∂μϕ=(ϕ˙,0,0,0)\partial_\mu\phi=(\dot\phi,0,0,0), so (∂ϕ)2=g00ϕ˙2=−ϕ˙2(\partial\phi)^2=g^{00}\dot\phi^2=-\dot\phi^2. The energy density is ρ=T00=ϕ˙2−(−1)(12(−ϕ˙2)+V)\rho=T_{00}=\dot\phi^2-(-1)\big(\tfrac12(-\dot\phi^2)+V\big); carefully, T00=ϕ˙2−g00(12(∂ϕ)2+V)=ϕ˙2+(12(−ϕ˙2)+V)=12ϕ˙2+VT_{00}=\dot\phi^2-g_{00}(\tfrac12(\partial\phi)^2+V)=\dot\phi^2+(\tfrac12(-\dot\phi^2)+V)=\mathbf{\tfrac12\dot\phi^2+V}. The pressure, from any spatial diagonal component, is p=Tii/gii=12ϕ˙2−Vp=T_{ii}/g_{ii}=\mathbf{\tfrac12\dot\phi^2-V}.

Step 2. Form the equation of state. w=pρ=12ϕ˙2−V12ϕ˙2+Vw=\dfrac{p}{\rho}=\dfrac{\tfrac12\dot\phi^2-V}{\tfrac12\dot\phi^2+V}. Kinetic energy pushes ww toward +1+1 (stiff fluid); potential energy pushes it toward −1-1 (vacuum-like). A single field thus spans the entire physically interesting range −1≤w≤+1-1\le w\le +1 depending on how fast it moves.

Step 3. Take the slow-roll limit. When the field rolls slowly, 12ϕ˙2≪V\tfrac12\dot\phi^2\ll V, both ρ→V\rho\to V and p→−Vp\to-V, so w→−1w\to\mathbf{-1} and Tμν→−VgμνT_{\mu\nu}\to-V g_{\mu\nu} — exactly the cosmological-constant fluid of Example 1 with ρΛ=V(ϕ)\rho_\Lambda=V(\phi). This is the engine of cosmic inflation and of quintessence dark energy: a scalar field temporarily trapped high on its potential acts like a cosmological constant, and the variational definition is what tells us precisely how well the approximation holds — the correction is set by the size of 12ϕ˙2/V\tfrac12\dot\phi^2/V.

Physics of the portrait

The variational definition of stress-energy has a precise birthday and a precise author. On the same November days in 1915 that Einstein was completing the field equations by physical reasoning, a mathematician in Göttingen derived them a second way — from a single scalar action, held stationary — and in doing so fixed forever how matter is to be coupled to geometry.

Origins · 1 minDavid Hilbert and how this was discovered
DH
David Hilbert
1862–1943 · the axiomatic and variational foundations of general relativity

David Hilbert was the greatest mathematician of his generation, and in the autumn of 1915 he turned the full force of his axiomatic method on Einstein's still-unfinished theory of gravitation. Where Einstein reasoned his way to the field equations through physical arguments about the equivalence principle and the Newtonian limit, Hilbert sought them as the output of a variational principle: postulate a single scalar action built from the curvature plus the matter fields, demand it be stationary under variations of the metric, and let the calculus of variations hand you the dynamics. His paper Die Grundlagen der Physik, presented to the Göttingen Academy on 20 November 1915 — five days before Einstein's own presentation in Berlin — obtained Gμν=8πG TμνG_{\mu\nu}=8\pi G\,T_{\mu\nu} from δ(SEH+Sm)=0\delta(S_{\mathrm{EH}}+S_{\mathrm m})=0, and in the process defined the matter source as the metric-variation of the matter action, the object we now call the Hilbert stress-energy tensor. This variational route made manifest two things Einstein's path had left implicit: that the source of gravity is automatically symmetric, and that its conservation follows from the invariance of the action rather than as a separate demand. Hilbert was scrupulous about priority, always attributing the physics to Einstein, and the two near-simultaneous results — once a subject of controversy — are now read as complementary. The action he wrote down remains the starting point of every modern formulation of gravity, from the Standard Model in curved space to the effective field theories of cosmology.

History
1915
— Hilbert derives the field equations from the stationary action δ(S_EH + S_m) = 0
1915
— Einstein presents G_μν = 8πG T_μν to the Prussian Academy in Berlin
1918
— Emmy Noether proves the theorems tying diffeomorphism invariance to ∇^μ T_μν = 0
1940
— Belinfante and Rosenfeld construct the terms symmetrizing the canonical stress tensor
1967
— Zel'dovich identifies the vacuum energy of quantum fields with the cosmological constant

Going further

Texts. Misner, Thorne & Wheeler, Gravitation, §21.2–21.3 (variational principle and the source) · Wald, General Relativity, §E.1 and §4.3 (the Hilbert tensor and its conservation) · Carroll, Spacetime and Geometry, §4.3 and Appendix E (variational derivation, worked examples) · Hartle, Gravity, Ch. 22 · Schutz, A First Course in General Relativity, Ch. 7.

Provenance. Signs and factors follow the mostly-plus convention (−,+,+,+)(-,+,+,+) of Wald (§E.1, §4.3) and Carroll (App. E), with cross-checks against MTW §21.3. A verifier should: (1) reproduce δ−g=−12−ggμνδgμν\delta\sqrt{-g}=-\tfrac12\sqrt{-g}g_{\mu\nu}\delta g^{\mu\nu} from Jacobi's formula; (2) recompute the scalar and Maxwell stress-energy tensors and confirm the EM trace vanishes only in d=4d=4; (3) verify the diffeomorphism-invariance derivation of ∇μTμν=0\nabla^\mu T_{\mu\nu}=0 against the contracted Bianchi identity ∇μGμν=0\nabla^\mu G_{\mu\nu}=0; (4) confirm Λ=8πGρΛ/c2≈1.1×10−52 m−2\Lambda=8\pi G\rho_\Lambda/c^2\approx1.1\times10^{-52}\ \mathrm{m^{-2}} and ρΛc2≈5.4×10−10 J m−3\rho_\Lambda c^2\approx5.4\times10^{-10}\ \mathrm{J\,m^{-3}} from ρΛ≈6×10−27 kg m−3\rho_\Lambda\approx6\times10^{-27}\ \mathrm{kg\,m^{-3}} (Planck 2018). All equations are textbook-standard; the only numerical inputs are the measured dark-energy density and fundamental constants.

Prerequisites. The Stress-Energy Tensor · The Einstein-Hilbert Action · Variational Derivation of the Field Equations · Local Conservation of Energy-Momentum. Leads to. The Einstein Field Equations · Perfect Fluid Stress-Energy · The Cosmological Constant · The Energy Conditions.

Ask the tutor: Ask me to vary any matter Lagrangian you like — a non-minimally coupled scalar, a Proca field, a viscous fluid — and watch the same δ/δgμν\delta/\delta g^{\mu\nu} machine hand back its symmetric, conserved stress-energy tensor step by step.

Why define stress-energy by varying the metric instead of using Noether's theorem for translations?

Noether's theorem for spacetime translations does give a stress-energy tensor — the canonical one — but it has three defects that make it unfit as a gravitational source. It is generally not symmetric (for fields with spin, like the electromagnetic field), it is generally not gauge invariant, and it is not unique (you can add improvement terms). The Einstein equations demand a symmetric tensor, because GμνG_{\mu\nu} is symmetric. The Hilbert prescription cures all three defects at once: differentiating with respect to the symmetric metric forces symmetry, coupling gauge fields through the metric preserves gauge invariance, and the recipe is unambiguous. The canonical and Hilbert tensors differ by exactly the Belinfante–Rosenfeld improvement terms, which the metric variation supplies for free.

What physical job does the δ√(−g) term do?

It carries the pressure and the trace. When you vary the matter action, part of the change comes from the explicit metric dependence of Lm\mathcal{L}_{\mathrm m} and part from the change in the invariant volume −g d4x\sqrt{-g}\,\mathrm{d}^4x. The second part contributes the universal term +gμνLm+g_{\mu\nu}\mathcal{L}_{\mathrm m} to TμνT_{\mu\nu}, which is precisely the isotropic-pressure piece. The cleanest demonstration is a constant Lagrangian Lm=−ρΛ\mathcal{L}_{\mathrm m}=-\rho_\Lambda: it has no explicit metric dependence at all, so the entire stress-energy tensor Tμν=−ρΛgμνT_{\mu\nu}=-\rho_\Lambda g_{\mu\nu} comes from the δ−g\delta\sqrt{-g} term — the cosmological-constant fluid with p=−ρp=-\rho. Drop this term and you lose pressure, the trace, and the cosmological constant together.

Is the conservation ∇^μ T_μν = 0 an independent physical law?

No — and that is the deep lesson. In pre-relativistic physics, energy and momentum conservation are separate postulates. In general relativity, once you build the matter action as a coordinate scalar, covariant conservation is forced: it is the Noether identity that follows from demanding invariance under diffeomorphisms. You never have to check it separately for a new matter model; any covariant SmS_{\mathrm m} produces a conserved TμνT_{\mu\nu} automatically. This dovetails with the geometry side, where the contracted Bianchi identity ∇μGμν=0\nabla^\mu G_{\mu\nu}=0 is an exact identity of Riemannian geometry. The field equations Gμν=8πG TμνG_{\mu\nu}=8\pi G\,T_{\mu\nu} are consistent precisely because both sides are automatically divergence-free.

Why is the electromagnetic stress-energy traceless but the scalar field's is not?

Tracelessness is the fingerprint of conformal (scale) invariance. Source-free Maxwell theory in four dimensions has no intrinsic length or mass scale, and it is invariant under conformal rescalings of the metric — that symmetry forces T=gμνTμν=0T=g^{\mu\nu}T_{\mu\nu}=0. The result is special to d=4d=4: in dd dimensions the Maxwell trace is −d−44F2-\tfrac{d-4}{4}F^2, nonzero away from four. A scalar field with a mass or a potential V(ϕ)V(\phi) does have a scale, so it is not conformally invariant, and its trace T=−(∂ϕ)2−4VT=-(\partial\phi)^2-4V is nonzero. Only a massless scalar with a specific non-minimal curvature coupling can be made conformally invariant and traceless. Quantum mechanically, even classically traceless theories acquire a nonzero ⟨Tμμ⟩\langle T^\mu{}_\mu\rangle — the trace anomaly — because regularization introduces a scale.

How does the recipe give a perfect fluid, with pressure appearing from nowhere?

Start from a fluid action in terms of the comoving particle-number density nn and an energy-density function ρ(n)\rho(n): Sm=−∫d4x −g ρ(n)S_{\mathrm m}=-\int\mathrm{d}^4x\,\sqrt{-g}\,\rho(n), where nn itself depends on the metric through the normalization of the four-velocity. Varying the metric does two things: the explicit −g\sqrt{-g} gives the usual gμνLg_{\mu\nu}\mathcal{L} term, and the metric hidden inside nn produces the (ρ+p)uμuν(\rho+p)u_\mu u_\nu term. The pressure emerges as p=n dρ/dn−ρp=n\,\mathrm{d}\rho/\mathrm{d}n-\rho — a thermodynamic relation, not an input. So "pressure from nowhere" is really pressure from the equation of state ρ(n)\rho(n) you chose, extracted automatically by the variation. This is why the method is prized in relativistic hydrodynamics: thermodynamic consistency is built in.

Does the cosmological constant belong to geometry or to matter?

There is no invariant answer, and the variational definition is what makes that precise. A constant term in the action can be written on the geometry side as Λgμν\Lambda g_{\mu\nu} added to GμνG_{\mu\nu}, or on the matter side as a vacuum stress-energy Tμν=−ρΛgμνT_{\mu\nu}=-\rho_\Lambda g_{\mu\nu} with ρΛ=Λ/(8πG)\rho_\Lambda=\Lambda/(8\pi G). The two are related by moving one term across the equals sign, and no measurement can tell them apart because both produce the identical −ρΛgμν-\rho_\Lambda g_{\mu\nu}. This is why the cosmological-constant problem is so stubborn: quantum field theory predicts an enormous vacuum energy on the matter side, and only an almost-perfect cancellation against a bare geometric Λ\Lambda leaves the tiny observed ∼6×10−27 kg m−3\sim6\times10^{-27}\ \mathrm{kg\,m^{-3}}. The variational bookkeeping shows both contributions are the same kind of object — which is why they must be compared, not kept separate.

Before this

Where this leads