Stress-energy tensor as functional derivative of the matter action
Anchor (Master): Sternberg, Curvature in Mathematics and Physics (2012), Ch. 20; Misner, Thorne & Wheeler, Gravitation (1973), §21.3; Wald, General Relativity (1984), Appendix E
Intuition Beginner
Einstein's equation has two sides. The left side measures how spacetime is curved. The right side measures what is doing the curving: the energy and momentum carried by matter and fields. For the equation to make sense, you need a single object that packages all of that source information -- energy density, momentum, pressure, internal stresses -- into one tidy bundle. That object is the stress-energy tensor.
Where does it come from? Every kind of matter is described by its own action, a single number assigned to each possible history of the matter. A remarkable fact is that you do not have to invent the stress-energy tensor separately. It is already hidden inside the matter action. You read it off by asking a precise question: if I gently change the shape of spacetime, by how much does the matter action change? The answer, suitably arranged, is exactly the stress-energy tensor.
This is a clean and economical idea. The same metric that appears in the curvature side also appears inside the matter action, because matter feels the geometry it lives in. Probing the matter action with a small change of metric extracts the source term, and it does so automatically with the right symmetries built in. David Hilbert used this route in 1915 to write gravity and matter as one variational system.
Visual Beginner
The picture shows the extraction. The matter action depends on the spacetime shape. Nudging the shape and watching the response returns a four-by-four table whose entries are energy density, momentum, pressure, and shear. That table is the stress-energy tensor.
Worked example Beginner
Take the simplest field: a single number defined at every point of spacetime, a scalar field. Think of it as a temperature-like quantity stored everywhere. Its energy comes from two sources: how fast it changes from place to place, and how large it is (a mass-like cost for the field to be nonzero at all).
When you carry out the extraction -- nudge the spacetime shape and read off the response -- the energy density that comes out is a sum of these contributions. In a region where the field is changing rapidly in time, the energy density is large. In a region where the field is uniform and small, the energy density is small. The momentum entries record how energy flows from one place to another, which happens whenever the field changes in both time and space at once.
Here is the takeaway worth holding onto. You did not have to guess the energy density of the scalar field or postulate a formula for its pressure. Both fell out of one computation applied to the field's action. The stress-energy tensor is not an extra ingredient bolted onto the theory. It is the matter action, viewed through the lens of "how does this respond to a change of geometry." The same procedure works for the electromagnetic field, for a fluid, for any matter whose action you can write down.
Check your understanding Beginner
Formal definition Intermediate+
Fix an oriented four-dimensional manifold carrying a Lorentzian metric of signature , with Levi-Civita connection , and write , so that is the invariant volume element. Matter is described by fields (collectively denoting scalars, vectors, tensors, or spinors) and a matter action
a diffeomorphism-invariant scalar functional of the metric and the matter fields. The symbol denotes covariant differentiation; denotes a first-order field variation; is integration against ; denotes partial differentiation.
The Hilbert (metric) stress-energy tensor is defined by the metric variation of the matter action:
Carrying the variation of the volume density through with from 13.04.02 gives the equivalent working form
valid when depends on the metric only algebraically (no derivatives of ); the functional-derivative form is the general definition. The factor and the sign are fixed so that appears as the source on the right of the Einstein equation with , and so that the energy density is positive for ordinary matter.
Sign and convention notes
The signature is . With this signature and the definition above, a scalar field with positive kinetic and potential energy has . Texts using the opposite signature absorb the change into the overall sign of and of the definition, so the physical tensor is unchanged. The functional derivative is the coefficient of in after every total-divergence term has been integrated away, on the matter fields' equations of motion.
Counterexamples to common slips
- The Hilbert tensor is defined by varying with respect to the inverse metric , not ; the two differ by a sign through , and confusing them flips the sign of .
- The Hilbert tensor is not in general equal to the canonical (Noether) stress tensor . They agree only up to a Belinfante-Rosenfeld improvement term that is itself identically conserved. The Hilbert tensor is symmetric by construction; the canonical tensor need not be.
- Tracelessness is a property of conformally invariant matter (such as the electromagnetic field in four dimensions), not a general feature. A massive scalar field has .
Key theorem with proof Intermediate+
Theorem (symmetry and on-shell conservation of the Hilbert tensor). Let be a diffeomorphism-invariant matter action on a four-dimensional Lorentzian manifold, and let . Then (i) is symmetric, , and (ii) on solutions of the matter field equations , it is covariantly conserved, . [Wald Appendix E.1]
Proof. Symmetry. The inverse metric is a symmetric tensor: . The functional derivative of a scalar with respect to a symmetric tensor is itself symmetric, because only the symmetric part of contributes to . Concretely, write ; since is symmetric, replacing by its symmetric part leaves unchanged, so the functional derivative is well-defined only as a symmetric tensor. Hence , being read as a symmetric object, satisfies . The symmetry is built into the definition; it requires no improvement term.
Conservation. Consider an infinitesimal diffeomorphism generated by a compactly supported vector field . Under its flow the dynamical fields change by their Lie derivatives: the metric by , and the matter fields by . Because is a diffeomorphism-invariant scalar, its value is unchanged by this active transformation of all fields: identically. Splitting the variation into its metric and matter parts,
On solutions of the matter field equations, , so the second integral vanishes and the first must vanish on its own. Insert the definition and the variation (obtained by raising both indices on with a sign, since ):
where the factor of two from the symmetric combination is absorbed using the symmetry established in part (i). Integrate by parts with the covariant divergence theorem; the boundary term vanishes because has compact support:
Since is an arbitrary compactly supported vector field, the fundamental lemma of the calculus of variations forces pointwise.
Bridge. This result builds toward 13.04.01, where covariant conservation is the consistency condition that lets the Einstein equation be solved, since the left side is divergence-free by the contracted Bianchi identity. It appears again in 13.08.01, where the conservation law applied to the perfect-fluid tensor yields the continuity equation governing the energy density of the expanding universe, and in 13.05.01, where the vanishing of outside a star defines the vacuum region whose Schwarzschild geometry is then determined. The diffeomorphism-invariance argument used here is the matter-side counterpart of the contracted Bianchi identity of 05.05.08: the same Noether-identity mechanism that makes the geometric side automatically conserved makes the matter source conserved on-shell, and the two halves must match for the field equation to be consistent.
Exercises Intermediate+
Lean formalization Intermediate+
The definition and properties of the Hilbert stress-energy tensor rest on a tower of structures Mathlib does not provide, so this unit ships with lean_status: none. From the bottom:
Lorentzian metrics and the volume density. Mathlib has positive-definite Riemannian metrics but no indefinite Lorentzian metric as a first-class object. The density and its variation , which carry the term of the tensor, are unavailable.
The functional derivative on the space of metrics. The definition is a Gateaux derivative of a functional on the infinite-dimensional space of metrics. Mathlib's variational-calculus and variational-bicomplex coverage for fields on manifolds is essentially absent.
Covariant divergence and the Lie derivative of the metric. The conservation theorem uses and an integration by parts with the covariant divergence. Neither the Levi-Civita connection of a Lorentzian metric nor the Lie derivative of the metric tensor is present as a named object.
A realistic first target is purely tensor-algebraic and frame-independent: given , , and the matter fields as data, define by the working form and prove its symmetry from the symmetry of , then verify tracelessness for the Maxwell Lagrangian as a finite linear-algebra identity in four dimensions. The conservation statement waits on items 1-3.
Advanced results Master
The canonical tensor and the Belinfante-Rosenfeld improvement. Noether's first theorem applied to spacetime translation symmetry in flat space produces the canonical stress-energy tensor
derived in the Noether framework of 05.05.08. This tensor is conserved, , but for fields carrying spin it is generally not symmetric: . The electromagnetic canonical tensor is neither symmetric nor gauge-invariant. The Belinfante-Rosenfeld construction repairs both defects by adding an improvement term built from the spin current :
with antisymmetric in , so that and conservation is preserved by the improvement. The resulting is symmetric and gauge-invariant, and for the electromagnetic field it reproduces exactly [Belinfante 1940] [Rosenfeld 1940].
The Hilbert tensor equals the improved tensor. The deep fact is that the metric variation performs the Belinfante-Rosenfeld improvement automatically. Coupling the matter to a general metric and varying it tests the response of the action to the symmetric deformation , which is exactly the combination that the symmetrized improvement extracts. One proves that for any matter whose action is diffeomorphism-invariant and minimally coupled: the curved-space covariantization supplies the spin-connection terms whose variation generates precisely the improvement . The Hilbert prescription thus delivers the symmetric, gauge-invariant, conserved tensor in one step, with no need to identify and add the improvement term by hand. This is the technical content of the statement that the metric stress-energy tensor is "the right one."
The trace and conformal invariance. Under a Weyl rescaling , the matter action changes by , and with at first order this is . Hence the action is invariant under all Weyl rescalings if and only if the stress-energy tensor is traceless, . The massless, conformally coupled scalar and the four-dimensional electromagnetic field are conformally invariant and have traceless ; a mass scale or a dimensionful coupling breaks the symmetry and gives . In the quantum theory this classical statement acquires the conformal (trace) anomaly: even a classically traceless tensor develops built from the Weyl tensor squared and the Euler density, a one-loop effect with no classical analogue.
Synthesis. The Hilbert prescription resolves several classical difficulties at once and reorganizes the source side of gravity around a single definition. First, the stress-energy tensor is no longer postulated case by case; it is the metric functional derivative of whatever matter action one writes, and the same formula serves scalars, gauge fields, fluids, and spinors. Second, symmetry is automatic, not engineered: the tensor is built from the symmetric pair , so it inherits symmetry without a Belinfante-Rosenfeld step, and in fact equals the improved canonical tensor for minimally coupled diffeomorphism-invariant matter. Third, conservation is automatic on-shell, following from diffeomorphism invariance of the matter action by the same Noether-identity mechanism of 05.05.08 that makes the geometric side divergence-free, so the two sides of the Einstein equation are conserved in lockstep. Fourth, the trace encodes conformal structure: classical Weyl invariance is exactly tracelessness, and its quantum breaking is the conformal anomaly. These four facts -- universality of the definition, automatic symmetry, automatic conservation, and the conformal trace -- are the structural content of treating the matter source as a functional derivative rather than a separate input.
Full proof set Master
Proposition (symmetry of the Hilbert tensor). For any scalar matter action , the tensor is symmetric in .
Proof. The metric variation is a symmetric -tensor, since and the space of metrics is the space of symmetric nondegenerate tensors. Write for some coefficient . Decompose into symmetric and antisymmetric parts. The contraction of an antisymmetric tensor with the symmetric vanishes identically: . Hence , and only the symmetric part is determined by the functional derivative. The functional derivative is therefore well-defined only as a symmetric tensor, and satisfies . No improvement term, gauge choice, or field-dependent correction is needed; symmetry is a property of varying with respect to a symmetric object.
Proposition (tracelessness of Maxwell theory in four dimensions). The Maxwell stress-energy tensor is traceless in spacetime dimension , and only then.
Proof. Contract with . The first term gives , writing . The second term gives , using in dimension . Therefore
For generic field configurations , so requires , i.e. . In any other dimension the trace is nonzero. The coefficient is the obstruction to Weyl invariance of Maxwell theory away from four dimensions, matching the fact that the gauge field has conformal weight zero precisely in .
Proposition (conservation implies the geometric consistency of the Einstein equation). If holds, then it is consistent to set , since the left side is identically divergence-free.
Proof. The contracted second Bianchi identity gives for every metric, as an identity of the Levi-Civita connection (the geometric Noether identity of 05.05.08). Taking the covariant divergence of the proposed field equation yields . This is satisfied automatically because was established from diffeomorphism invariance of the matter action. The two divergence laws are independent in origin -- one geometric, one from matter symmetry -- yet they must agree for the field equation to admit solutions, and the variational framework guarantees that they do: both are instances of the same diffeomorphism-Noether identity, one for the gravitational action and one for the matter action.
Connections Master
The stress-energy tensor developed here is the source on the right of the Einstein field equations 13.04.01; covariant conservation is the consistency condition matching the contracted Bianchi identity of the geometric side, without which the equation could not be solved.
The definition is exactly the source term that emerged from the matter variation in the variational derivation of 13.04.02; this unit develops the properties of that term, where the prior unit established only its definition in passing.
Covariant conservation of the Hilbert tensor is the matter-side instance of Noether's second theorem for the diffeomorphism gauge group 05.05.08; the same local-symmetry mechanism that forces the geometric Euler-Lagrange tensor to be divergence-free forces the matter source to be conserved on-shell.
The perfect-fluid form , together with its continuity equation, supplies the matter content of the Friedmann equations of 13.08.01, where the equation of state controls the expansion history of the universe.
The vanishing of outside a static star defines the vacuum region whose spherically symmetric solution is the Schwarzschild geometry of 13.05.01; the interior solution requires the fluid tensor matched across the stellar surface.
Historical & philosophical context Master
David Hilbert, in his November 1915 communication to the Göttingen Academy, obtained the gravitational field equations from a variational principle and identified the matter source through the metric variation of the matter action, the construction now bearing his name [Hilbert 1915]. The prescription gives a symmetric, gauge-invariant tensor directly, in contrast to the canonical tensor that Noether's first theorem produces from translation invariance, which for fields with spin is asymmetric and, for gauge fields, gauge-dependent. The problem of symmetrizing the canonical tensor was resolved independently in 1940 by Frederik Belinfante and by Léon Rosenfeld, who constructed the improvement term built from the spin current that converts the canonical tensor into a symmetric one while preserving its conservation [Belinfante 1940] [Rosenfeld 1940]. Rosenfeld's analysis established that the symmetrized canonical tensor coincides with the Hilbert tensor obtained by coupling the field to a metric and varying, which is why the curved-space construction is regarded as the physically primary definition.
Sternberg's treatment situates the energy-momentum tensor within the geometry of invariant variational problems, deriving its conservation as a Noether identity of the diffeomorphism symmetry [Sternberg Ch. 20]. The perfect-fluid form as a phenomenological stress-energy tensor predates general relativity, entering the relativistic literature through the early work on relativistic hydrodynamics and codified in the textbook treatments of Misner, Thorne, and Wheeler [MTW §21.3]. The conformal trace condition, classical at the level treated here, becomes the conformal anomaly in the quantum theory, a result of the 1970s that remains central to the study of conformal field theory and the renormalization of fields in curved spacetime.
Bibliography Master
@article{Hilbert1915,
author = {Hilbert, David},
title = {Die Grundlagen der Physik (Erste Mitteilung)},
journal = {Nachrichten von der K\"oniglichen Gesellschaft der Wissenschaften zu G\"ottingen, Mathematisch-Physikalische Klasse},
year = {1915},
pages = {395--407}
}
@article{Rosenfeld1940,
author = {Rosenfeld, L\'eon},
title = {Sur le tenseur d'impulsion-\'energie},
journal = {M\'emoires de l'Acad\'emie Royale de Belgique, Classe des Sciences},
volume = {18},
number = {6},
year = {1940},
pages = {1--30}
}
@article{Belinfante1940,
author = {Belinfante, Frederik J.},
title = {On the current and the density of the electric charge, the energy, the linear momentum and the angular momentum of arbitrary fields},
journal = {Physica},
volume = {7},
number = {5},
year = {1940},
pages = {449--474}
}
@book{Wald1984,
author = {Wald, Robert M.},
title = {General Relativity},
publisher = {University of Chicago Press},
year = {1984}
}
@book{MTW1973,
author = {Misner, Charles W. and Thorne, Kip S. and Wheeler, John A.},
title = {Gravitation},
publisher = {W. H. Freeman},
year = {1973}
}
@book{Sternberg2012,
author = {Sternberg, Shlomo},
title = {Curvature in Mathematics and Physics},
publisher = {Dover Publications},
year = {2012}
}
@book{Carroll2004,
author = {Carroll, Sean M.},
title = {Spacetime and Geometry: An Introduction to General Relativity},
publisher = {Addison-Wesley},
year = {2004}
}