Einstein--Hilbert action
Recall in Newton-Cartan gravity we have
This prompted Einstein to postulate that the relativistic field equations for the Lorentzian metric
However, this equation suffers from a problem: it should be
Hilbert was a variation principle specialist and had the brilliant idea to say "The right-hand side of the gravitational field equations come from an action (see the definition of energy-momentum tensor), so why don’t we try and obtain the left-hand side from an action too?" He decided to work through the simplest actions he could until he obtained one that worked. His final result was the following:
The variation of this action with respect to
In addition to the gravitational action, you also need an action for the matter fields. The specific form of the matter action depends on the nature of the matter or energy you are considering. For a scalar field
The total action
The first term governs the dynamics of the spacetime geometry, while the second term governs the dynamics of the matter field, both of which are coupled through the metric
To derive the equations of motion for both the metric
-
Varying the action with respect to the metric
gives the Einstein field equations: where
is the stress-energy tensor that comes from the matter action. -
Varying the action with respect to the matter field
gives the equations of motion for the matter, such as the Klein-Gordon equation for a scalar field: where
is the d'Alembertian operator in curved spacetime, defined using the metric . See matter in GR#Other examples and energy-momentum tensor#In General relativity.
The Einstein field equations tells me how the Einstein curvature results from a matter distribution. This determines a Riemann curvature for spacetime. But then, matter moves along spacetime, and it gets redistributed, according to the geodesics of the metric. And this new matter distribution creates a new curvature.