# Ngô Quốc Anh

## June 2, 2011

### Variation of the Riemann tensor, the Ricci tensor, and the Ricci scalar

Filed under: Riemannian geometry — Ngô Quốc Anh @ 5:24

As an application of the principle of least action to the Einstein-Hilbert action, in this short note, we discuss a question:  the variation with respect to metric of the scalar curvature.

To calculate the variation of the scalar curvature we calculate first the variation of the Riemann curvature tensor, and then the variation of the Ricci tensor.

The variation of the Riemann curvature tensor. So, the Riemann curvature tensor is defined as, $\displaystyle {R^\rho}_{\sigma\mu\nu} = \partial_\mu\Gamma^\rho_{\nu\sigma} - \partial_\nu\Gamma^\rho_{\mu\sigma} + \Gamma^\rho_{\mu\lambda}\Gamma^\lambda_{\nu\sigma} - \Gamma^\rho_{\nu\lambda}\Gamma^\lambda_{\mu\sigma},$

Since the Riemann curvature depends only on the Levi-Civita connection $\Gamma^\lambda_{\mu\nu}$, the variation of the Riemann tensor can be calculated as, $\displaystyle \delta{R^\rho}_{\sigma\mu\nu} = \partial_\mu\delta\Gamma^\rho_{\nu\sigma} - \partial_\nu\delta\Gamma^\rho_{\mu\sigma} + \delta\Gamma^\rho_{\mu\lambda} \Gamma^\lambda_{\nu\sigma} + \Gamma^\rho_{\mu\lambda} \delta\Gamma^\lambda_{\nu\sigma} - \delta\Gamma^\rho_{\nu\lambda} \Gamma^\lambda_{\mu\sigma} - \Gamma^\rho_{\nu\lambda} \delta\Gamma^\lambda_{\mu\sigma}.$

Now, since $\delta\Gamma^\rho_{\nu\mu}$ is the difference of two connections, it is a tensor and we can thus calculate its covariant derivative, $\displaystyle \nabla_\lambda (\delta \Gamma^\rho_{\nu\mu} ) = \partial_\lambda (\delta \Gamma^\rho_{\nu\mu} ) + \Gamma^\rho_{\sigma\lambda} \delta\Gamma^\sigma_{\nu\mu} - \Gamma^\sigma_{\nu\lambda} \delta \Gamma^\rho_{\sigma\mu} - \Gamma^\sigma_{\mu\lambda} \delta \Gamma^\rho_{\nu\sigma}.$

We can now cleverly observe that the expression for the variation of Riemann curvature tensor above is equal to the difference of two such terms, $\displaystyle\boxed{\delta R^\rho{}_{\sigma\mu\nu} = \nabla_\mu (\delta \Gamma^\rho_{\nu\sigma}) - \nabla_\nu (\delta \Gamma^\rho_{\mu\sigma})}.$

The variation of the Ricci tensor. We may now obtain the variation of the Ricci curvature tensor simply by contracting two indices of the variation of the Riemann tensor, that is, $\displaystyle\delta R_{\mu\nu} \equiv \delta R^\rho{}_{\mu\rho\nu}$,

in other words, $\displaystyle\boxed{\delta R_{\mu\nu} = \nabla_\rho (\delta \Gamma^\rho_{\nu\mu}) - \nabla_\nu (\delta \Gamma^\rho_{\rho\mu})}.$

The variation of the scalar curvature. The scalar curvature, known as the trace of the Ricci curvature, is defined as $\displaystyle R = g^{\mu\nu} R_{\mu\nu}.$

Therefore, its variation with respect to the inverse metric $g^{\mu\nu}$ is given by $\displaystyle \delta R = {R_{\mu \nu }}\delta {g^{\mu \nu }} + {g^{\mu \nu }}\delta {R_{\mu \nu }} = {R_{\mu \nu }}\delta {g^{\mu \nu }} + {\nabla _\sigma }\left( {{g^{\mu \nu }}\delta \Gamma _{\nu \mu }^\sigma - {g^{\mu \sigma }}\delta \Gamma _{\rho \mu }^\rho } \right).$

Here we have used the previously obtained result for the variation of the Ricci curvature and the metric compatibility of the covariant derivative, $\nabla_\sigma g^{\mu\nu} = 0$, to push metric into the round brackets. The last term $\nabla_\sigma ( g^{\mu\nu} \delta\Gamma^\sigma_{\nu\mu} - g^{\mu\sigma}\delta\Gamma^\rho_{\rho\mu} )$

is a total derivative and thus by Stokes’ theorem only yields a boundary term when integrated. Hence when the variation of the metric $\delta g^{\mu\nu}$ vanishes at infinity, this term does not contribute to the variation of the action. And we thus obtain, $\displaystyle\boxed{\delta R = {R_{\mu \nu }}\delta {g^{\mu \nu }}}.$

Source: Wiki.

## 8 Comments »

1. Two comments…

One, it would be good if you added variation of $\sqrt{-g}$ also and then showed how the full Einstein-Hilbert action $\sqrt{-g}R$ is varied…

Second, the surface term derived above does not vanish if only the variations of the metric vanish at infinity. You need to fix the first derivatives of the metric as well. This is an important point. There are problems with fixing both the metric and the derivative at the boundary. For more on this, you can read up on Gibbons-Hawking-York counterterm.

Comment by Krishnamohan — September 7, 2013 @ 11:36

• Dear Krishnamohan,

Thanks for your interest in my post. For the first comment, I have done something in the link below

https://anhngq.wordpress.com/2011/06/05/variation-of-the-determinant/

which basically says that $\displaystyle\delta \sqrt {\det (g)} = - \frac{1}{{2\sqrt {\det (g)} }}\delta g = \frac{1}{2}\sqrt {\det (g)} ({g^{\mu \nu }}\delta {g_{\mu \nu }}) = - \frac{1}{2}\sqrt {\det (g)} ({g_{\mu \nu }}\delta {g^{\mu \nu }}).$

I just ignored the minus sign in front of the determinant of the metric $g$. Then the vanishing of the variation of the Einstein-Hilbert action yields the Einstein field equation.

For the second comment, I will check this. Thanks for letting me know about the Gibbons-Hawking-York counterterm.

Comment by Ngô Quốc Anh — September 10, 2013 @ 19:17

2. Could you compute the variation formula for the largest eigenvalue of Ricci curvature? Thank you.

Comment by xiaoshur — June 20, 2014 @ 3:50

• Hi, what do you mean eigenvalues of Ricci curvature?

Comment by Ngô Quốc Anh — June 20, 2014 @ 9:18

3. Hey. Could you calculate the variation of action with respect to Riemann tensor? I am currently trying to compute the entropy of a black hole by using Wald’s formula. Thank you.

Comment by Marija Tomasevic — January 3, 2017 @ 0:36

• Could you give me your action?

Comment by Ngô Quốc Anh — January 3, 2017 @ 0:40

• Of course. $\displaystyle I = \frac{1}{16\pi G}\int d^3x \sqrt[]{-g}\bigg(R - R^{\mu \nu}R_{\mu \nu} - \frac{3}{8}R^2 \bigg)$
Thank you very much.

Comment by Marija Tomasevic — January 3, 2017 @ 0:47

• Thanks, I will try if possible. I have not done such a calculation before :(.

Comment by Ngô Quốc Anh — January 3, 2017 @ 0:53

This site uses Akismet to reduce spam. Learn how your comment data is processed.