General Relativity

Einstein's Masterpiece: Gravity is the curvature of spacetime. Mass-energy tells spacetime how to curve, and spacetime tells mass-energy how to move.

Chapter 8: Ricci Tensor and Scalar

The Ricci tensor is a contraction of the Riemann tensor that directly appears in Einstein's field equations. It encodes how volumes change under geodesic flow, connecting curvature to matter content.

The Ricci Tensor

The Ricci tensor is the trace of the Riemann tensor over the first and third indices:

\( R_{\mu\nu} = R^\rho_{\;\mu\rho\nu} = g^{\rho\sigma} R_{\rho\mu\sigma\nu} \)

Symmetric tensor: Rμν = Rνμ

Components

10 independent components in 4D (symmetric 4Ɨ4 matrix)

In Terms of Christoffels

\( R_{\mu\nu} = \partial_\rho \Gamma^\rho_{\mu\nu} - \partial_\nu \Gamma^\rho_{\mu\rho} + \Gamma^\rho_{\rho\lambda}\Gamma^\lambda_{\mu\nu} - \Gamma^\rho_{\nu\lambda}\Gamma^\lambda_{\mu\rho} \)

The Ricci Scalar

Further contracting the Ricci tensor gives the Ricci scalar (scalar curvature):

\( R = g^{\mu\nu} R_{\mu\nu} = R^\mu_{\;\mu} \)

Single number characterizing "average" curvature at each point

Physical Meaning

R measures how the volume of a small geodesic ball differs from Euclidean:\( V \approx V_{Eucl} \left(1 - \frac{R}{6} r^2 + O(r^4)\right) \)

The Einstein Tensor

The Einstein tensor is the key geometric object in the field equations:

\( G_{\mu\nu} = R_{\mu\nu} - \frac{1}{2} g_{\mu\nu} R \)

Einstein Field Equations: Gμν = 8Ļ€G Tμν

Crucial Property: Automatic Conservation

\( \nabla^\mu G_{\mu\nu} = 0 \) (Contracted Bianchi identity)

This ensures \( \nabla^\mu T_{\mu\nu} = 0 \) — energy-momentum conservation!

Python: Ricci Tensor Computation

Python
ricci_tensor.py121 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server

Fortran: Numerical Ricci Calculation

Fortran
ricci_numerical.f90169 lines

Click Run to execute the Fortran code

Code will be compiled with gfortran and executed on the server