# Ricci tensor given through the metric

This is a request for references, mainly for educational aims. In textbooks about general relativity, it is common to present the Riemann and Ricci tensors using the Christoffel symbols. This is easy to understand because it is a straightforward way to perform practical computations and the formulas one obtains are elegant and easy to grasp. Besides, Christoffel symbols are given through the metric and one can do some algebra to get such kind of expressions. But for my aims, I would need references, rather than do the computations, reporting formulas giving the Ricci tensor using the metric explicitly. Also research papers are fine. Can anybody help?

• I doubt you'll find any text which presents the Ricci tensor in terms of the metric directly, since it's an incredibly nasty mess and not illuminating at all. Your best bet might be Wald. You may also see arxiv.org/pdf/gr-qc/9602015v1.pdf for the Ricci tensor of a diagonal metric. Commented Jan 30, 2017 at 13:51
• Thanks for pointing me out this paper. Yes, I know that algebra is involved and the formula not much enlightening. This is the reason why this formula is never proposed, not even as an exercise. The reason why I need it is because some computations yields powers of the metric and its derivatives and are overall not easy to recognize as familiar.
– Jon
Commented Jan 30, 2017 at 14:05
• Why do you need a reference? Can you not simply plug the formula for the Christoffels in terms of the metric into the formula of the Ricci tensor in terms of the Christoffels? (Yes, it's messy, but you apparently already know that) Commented Jan 30, 2017 at 15:09
• @ACuriousMind I would need some references for my aims even if I know how to do the computation. The reason is that this is needed for a research project. It is anyhow interesting to see how difficult is to find papers or books containing such an equation, even if the derivation should be straightforward.
– Jon
Commented Jan 30, 2017 at 15:17
• I just saw this in the front page, and I gotta say, it's not exactly clear why you would want this, or why the current answer is not useful. And anyway, in a research project it's completely okay to do the math yourself. After all, when you cite something someone had to​actually do it at some point. Commented Jun 6, 2017 at 22:48

Probably the question is already not relevant for the TS, but it might be of interest for others.

\begin{aligned} R_{\mu \nu}=&\frac{1}{2}\, {\partial}_{\rho}{{g}^{\rho \sigma}}\, {\partial}_{\nu}{{g}_{\mu \sigma}}\, + \frac{1}{2}\, {\partial}_{\rho}{{g}^{\rho \sigma}}\, {\partial}_{\mu}{{g}_{\nu \sigma}}\, - \frac{1}{2}\, {\partial}_{\rho}{{g}^{\rho \sigma}}\, {\partial}_{\sigma}{{g}_{\mu \nu}}\, + \frac{1}{2}\, {g}^{\rho \sigma} {\partial}_{\nu \rho}{{g}_{\mu \sigma}}\, + \frac{1}{2}\, {g}^{\rho \sigma} {\partial}_{\mu \rho}{{g}_{\nu \sigma}}\,\\ & - \frac{1}{2}\, {g}^{\rho \sigma} {\partial}_{\rho \sigma}{{g}_{\mu \nu}}\, - \frac{1}{2}\, {\partial}_{\nu}{{g}^{\rho \sigma}}\, {\partial}_{\mu}{{g}_{\rho \sigma}}\, - \frac{1}{2}\, {g}^{\rho \sigma} {\partial}_{\mu \nu}{{g}_{\rho \sigma}}\, + \frac{1}{4}\, {g}^{\kappa \lambda} {\partial}_{\nu}{{g}_{\mu \kappa}}\, {g}^{\rho \sigma} {\partial}_{\lambda}{{g}_{\rho \sigma}}\, + \frac{1}{4}\, {g}^{\kappa \lambda} {\partial}_{\mu}{{g}_{\nu \kappa}}\, {g}^{\rho \sigma} {\partial}_{\lambda}{{g}_{\rho \sigma}}\, \\ & - \frac{1}{4}\, {g}^{\kappa \lambda} {\partial}_{\kappa}{{g}_{\mu \nu}}\, {g}^{\rho \sigma} {\partial}_{\lambda}{{g}_{\rho \sigma}}\, - \frac{1}{4}\, {g}^{\kappa \lambda} {\partial}_{\mu}{{g}_{\kappa \rho}}\, {g}^{\rho \sigma} {\partial}_{\nu}{{g}_{\lambda \sigma}}\, - \frac{1}{2}\, {g}^{\kappa \lambda} {\partial}_{\kappa}{{g}_{\mu \rho}}\, {g}^{\rho \sigma} {\partial}_{\sigma}{{g}_{\nu \lambda}}\, + \frac{1}{2}\, {g}^{\kappa \lambda} {\partial}_{\kappa}{{g}_{\mu \rho}}\, {g}^{\rho \sigma} {\partial}_{\lambda}{{g}_{\nu \sigma}} \end{aligned}

I obtained this using Cadabra computer algebra program. It produces output as a LaTeX file. The notations are as follows \begin{aligned} R^{\rho}{}_{\sigma \mu \nu}& = \partial_{\mu}{\Gamma_{\nu \sigma}{}^{\rho}}- \partial_{\nu}{\Gamma_{\mu \sigma}{}^{\rho}} +\Gamma_{\mu \kappa}{}^{\rho}\Gamma_{\nu \sigma}{}^{\kappa}-\Gamma_{\nu \kappa}{}^{\rho}\Gamma_{\mu \sigma}{}^{\kappa},\\ \Gamma_{\mu \nu}{}^{\rho} &= \frac{1}{2}g^{\rho \sigma}\big(\partial_{\mu}{g_{\sigma \nu}} +\partial_{\nu}{g_{\sigma \mu}} -\partial_{\sigma}{g_{\mu \nu}}\big). \end{aligned} I haven't tried any simplifications of the result using the properties of the metric $$g_{\mu\nu}$$.

As mentioned in the comments calculating algebraic expressions for the Ricci tensor containing the metric, its inverse and its first and second derivatives is straight forward using computer algebra.

The most arbitrary metric $$g_{\alpha\beta}=g_{\beta\alpha}$$ has 10 independent components which are functions of four coordinates $\left\{x_0,x_1,x_2,x_3\right\}$: $$g_{\alpha\beta}(x_0,x_1,x_2,x_3).$$ The metric has an inverse with 10 independent components $$g^{\alpha\beta}=g^{\beta\alpha}.$$

The metric has 40 independent first partial derivatives $$g_{\alpha\beta,\gamma}$$ and 100 independent second partial derivatives (100 and not 160 because of the the symmetry of second derivatives) $$g_{\alpha\beta,\gamma\delta}=g_{\alpha\beta,\delta\gamma}.$$

Using those ingredients ($g_{\alpha\beta}$, $g^{\alpha\beta}$, $g_{\alpha\beta,\gamma}$ and $g_{\alpha\beta,\gamma\delta}$) one can compute 21 components of the Riemann tensor $R_{\alpha\beta\gamma\delta}$. One could eliminate one of those 21 components using the first Bianchi identity.

Just to give one example in this post: $R_{0102}$ has 1510 terms: 4 second derivatives and the rest are contractions of Christoffel symbols:

The Ricci tensor can be constructed from the contraction $$R_{\alpha\beta}=R^\mu_{\,\,\alpha\mu\beta}$$ so it contains the components of the inverse metric an those 21 Riemann tensors:

Writing $R_{\alpha\beta}$ out in terms of $g$ only becomes super messy in case of $R_{01}$ we are talking about 8711 terms. I have no idea how to visualize such an expression here at SE. I have uploaded a PDF (careful it is rather large) of $R_{01}$ here.

I also uploaded .m files containing all 10 independent components of $R_{\alpha\beta}$ Rij.m and the 21 components of $R_{\alpha\beta\gamma\delta}$ Rijkl.m.

As pointed out in the comment of the original question those expressions have only very very limited use. But maybe some conclusions:

1. We see that a tensor notation in sum convention is a very very elegant way to formulate those expressions.
2. This elegant notation masks the general complexity of those expressions.
3. The explicit expressions in terms of $g$ illustrate the utmost importance of symmetries and a good coordinate choice for a given problem.
4. To work with the field equations symmetries and/or advanced methods of Numerical Relativity are necessary because in a naive form the expressions and equations are just to complicated. Such a "brute force" approach of formulating/ printing out the field equations of General Relativity is doomed to fail.
• Nice effort. I appreciate it. But there is something I would like to understand better. The Riemann tensor has the form $\frac{\partial}{\partial x^j} \Gamma^{l}_{ik}-\frac{\partial}{\partial x^k}\Gamma^{l}_{ij}+\Gamma^{l}_{js}\Gamma_{ik}^s-\Gamma^{l}_{ks}\Gamma^s_{ij}$ and each $\Gamma$ has 3 terms. I should expect that you will have a general formula with 18 contribution and a leading term just with partial derivatives of the metric. So, why are your formulas so involved and lengthy?
– Jon
Commented Jan 31, 2017 at 13:20
• I compute $R_{iklm}$ directly not $R^i_{\,\,klm}$, because $R_{iklm}$ has the most symmetries. By lowering $i$ one can get $R_{iklm}$ from $R^i_{\,\,klm}$ and $R_{iklm}$ can be expressed as $R_{iklm}=\frac{1}{2}(g_{im,kl}+g_{kl,im}-g_{il,km}-g_{km,il})+g_{np}(\Gamma^{n}_{\,\,kl}\Gamma^{p}_{\,\,im}-\Gamma^{n}_{\,\,km}\Gamma^{p}_{\,\,il})$. Apart from having more symmetries $R_{iklm}$ does not contain derivatives of the Christoffel symbols, which makes computation much easier since one only needs the "ingredients" I mentioned.
– N0va
Commented Jan 31, 2017 at 14:29
• I agree, but this does not answer to my question. There is no need to exploit component by component when you can get a general formula. I understand that it is easier to use maple to manage tensors but I have already thought about this and encountered your same difficulty. These tools are useful when a metric is already given and, at best, you should write $g_{00}(x),g_{01}(x),\ldots$ and so on. For my aims these tools appear just useless.
– Jon
Commented Jan 31, 2017 at 15:31
• $\Gamma^l_{\,\,j s}$ has by itself $3*4=12$ terms. A contraction of two such Christoffel includes $4$ products of $12*12$ terms. The contractions in $\Gamma^l_{\,\,j s}$ itself and in the product of two $\Gamma^l_{\,\,j s}$ blew up if one multiplies them out. All those definitions are in sum conventions the number of terms in those definitions is no where near the number of real individual terms.
– N0va
Commented Jan 31, 2017 at 18:06
• Maybe I was not clear enough. This computation does not need to exploit any single component out. As you did it is completely useless.
– Jon
Commented Feb 1, 2017 at 7:14