The Hilbert-Einstein action is:
Einstein equations (the evolution equations of the metrig ) can be found if we set .
Since this must be true for any variation , what’s inside the brackets must be zero, so:
The r.h.s. is defined as the energy-stress tensor:
where we used the result