Function Repository Resource:

# RiemannTensor (1.0.0)current version: 2.0.0 »

Compute the components of the Riemann tensor for a metric

Contributed by: Wolfram Staff (original content by Alfred Gray)
 ResourceFunction["RiemannTensor"][M,{u,v}] computes the Riemann tensor Rijkl for the metric M.

## Details and Options

A Riemann tensor is a four-index tensor that is used commonly in general relativity.
The Ricci curvature tensor and scalar curvature can be defined in terms of Rijkl.
The Riemann tensor can be constructed from the metric tensor and its first and second derivatives via where the s are Christoffel symbols of the first kind.

## Examples

### Basic Examples (6)

 In[1]:=
 Out[2]=

Plot the surface:

 In[3]:=
 Out[3]=

The covariant basis:

 In[4]:=
 Out[4]=

The metric tensor:

 In[5]:=
 Out[5]=

All the components of the Riemann tensor with one upper index:

 In[6]:=
 Out[6]=

Using TensorIndexJuggling to lower the first index to get Rijkl:

 In[7]:=
 Out[7]=

### Properties and Relations (3)

The metric tensor for the monkey saddle:

 In[8]:=

The Ricci curvature:

 In[9]:=
 Out[9]=

The Ricci scalar:

 In[10]:=
 Out[10]=

Enrique Zeleny

## Version History

• 2.0.0 – 01 May 2023
• 1.0.0 – 06 October 2020