Put . Varying gives
The determinant identity gives
Finally, varying the formula for the Christoffel symbols and rewriting partial derivatives covariantly gives the tensor
These are the basic metric variation identities.