# Ricci Tensor and Scalar Curvature calculations using Symbolic module


```python
import sympy
from einsteinpy.symbolic import RicciTensor, RicciScalar
from einsteinpy.symbolic.predefined import AntiDeSitter

sympy.init_printing()
```

### Defining the Anti-de Sitter spacetime Metric


```python
metric = AntiDeSitter()
metric.tensor()
```

### Calculating the Ricci Tensor(with both indices covariant)


```python
Ric = RicciTensor.from_metric(metric)
Ric.tensor()
```

### Calculating the Ricci Scalar(Scalar Curvature) from the Ricci Tensor


```python
R = RicciScalar.from_riccitensor(Ric)
R.simplify()
R.expr
```

The curavture is -12 which is in-line with the theoretical results

e9fa66012cf275f189a7ea890ab0490c1a18f6a7
ipynb
Jupyter Notebook
docs/source/examples/Ricci Tensor and Scalar Curvature symbolic calculation.ipynb
iamhardikat11/einsteinpy
7bf0ca0020b273e616b6e7c19aed7a5e13925444
MIT
2019-02-04T09:15:22.000Z
2022-03-19T13:50:17.000Z
docs/source/examples/Ricci Tensor and Scalar Curvature symbolic calculation.ipynb
iamhardikat11/einsteinpy
7bf0ca0020b273e616b6e7c19aed7a5e13925444
MIT
2019-02-02T10:57:27.000Z
2022-02-26T16:37:05.000Z
docs/source/examples/Ricci Tensor and Scalar Curvature symbolic calculation.ipynb
iamhardikat11/einsteinpy
7bf0ca0020b273e616b6e7c19aed7a5e13925444
MIT
2019-01-30T14:14:14.000Z
2022-02-28T21:18:18.000Z
Qwen/Qwen-72B
1. YES
2. YES