The Einstein–Hilbert action (also referred to as Hilbert action) in general relativity is the action that yields the Einstein field equations through the principle of least action. With the (− + + +) metric signature, the gravitational part of the action is given as
where is the determinant of the metric tensor matrix, is the Ricci scalar, and is Einstein's constant ( is the gravitational constant and is the speed of light in vacuum). The integral is taken over the whole spacetime if it converges. If it does not converge, is no longer well-defined, but a modified definition where one integrates over arbitrarily large, relatively compact domains, still yields the Einstein equation as the Euler–Lagrange equation of the Einstein–Hilbert action.