Lesson 12 of 15

Christoffel Symbols

Christoffel Symbols

To differentiate a vector field on a manifold, we need a connection — a rule for comparing vectors at different points. The most natural choice for a Riemannian manifold is the Levi-Civita connection, encoded by the Christoffel symbols Γijk\Gamma^k_{ij}.

From the metric gijg_{ij}, the Christoffel symbols are:

Γijk=12gkl(gljxi+glixjgijxl)\Gamma^k_{ij} = \frac{1}{2} g^{kl}\left(\frac{\partial g_{lj}}{\partial x^i} + \frac{\partial g_{li}}{\partial x^j} - \frac{\partial g_{ij}}{\partial x^l}\right)

where gklg^{kl} is the inverse metric.

Sphere Example

For the unit sphere with metric g=diag(1,sin2θ)g = \text{diag}(1, \sin^2\theta):

Γϕϕθ=sinθcosθ\Gamma^\theta_{\phi\phi} = -\sin\theta\cos\theta Γθϕϕ=Γϕθϕ=cotθ\Gamma^\phi_{\theta\phi} = \Gamma^\phi_{\phi\theta} = \cot\theta

All others vanish. At θ=π/4\theta = \pi/4:

  • Γϕϕθ=sin(π/4)cos(π/4)=0.5\Gamma^\theta_{\phi\phi} = -\sin(\pi/4)\cos(\pi/4) = -0.5
  • Γθϕϕ=cot(π/4)=1.0\Gamma^\phi_{\theta\phi} = \cot(\pi/4) = 1.0

Flat Space

On flat Rn\mathbb{R}^n with gij=δijg_{ij} = \delta_{ij}, all Christoffel symbols vanish: Γijk=0\Gamma^k_{ij} = 0.

Your Task

Implement christoffel(g_fn) that takes a metric function and returns a function at(point) that computes the 2×2×22 \times 2 \times 2 array Gamma[k][i][j] = Γijk\Gamma^k_{ij} at that point.

Python runtime loading...
Loading...
Click "Run" to execute your code.