Christoffel Symbols and Geodesic Equations in 2D

Ready-to-use formulas for geodesics on any surface given a metric.

Lots of computations start with the dreaded task of computing christoffel symbols. This short note does the calculation once and for all for 2-dimensional Riemannian metrics, so I don’t have to keep repeating it.

General Christoffel Symbols in 2 Dimensions

For the metric ds2=Edx2+2Fdxdy+Gdy2ds^2=Edx^2+2Fdxdy+Gdy^2 with determinant D=EGF2D=EG-F^2, the Christoffel symbols are Γxxx=GExF(2FxEy)2DΓxxy=E(2FxEy)FEx2D\Gamma_{xx}^x=\frac{G E_x - F \left( 2 F_x - E_y \right)}{2D}\hspace{1cm}\Gamma_{xx}^y= \frac{E\left( 2 F_x - E_y \right)-FE_x}{2D} Γyyx=G(2FyGx)FGy2DΓyyy=EGyF(2FyGx)2D\Gamma_{yy}^x=\frac{G\left( 2 F_y - G_x \right)-FG_y}{2D}\hspace{1cm}\Gamma_{yy}^y=\frac{E G_y - F \left( 2 F_y - G_x \right)}{2D} Γxyx=Γyxx=GEyFGx2DΓxyy=Γyxy=EGxFEy2D\Gamma_{xy}^x=\Gamma_{yx}^x=\frac{G E_y -F G_x}{2D}\hspace{1cm}\Gamma_{xy}^y=\Gamma_{yx}^y=\frac{E G_x -F E_y}{2D}

Using these one can directly compute the geodesic equations, by expanding out the definition γ˙γ˙\nabla_{\dot{\gamma}}\dot{\gamma} for a curve γ(t)=(u(t),v(t))\gamma(t)=(u(t),v(t)).

Geodesics

A curve γ(t)=(x(t),y(t))\gamma(t)=(x(t),y(t)) is a geodesic if it satisfies the following ODEs:

{x¨+x˙2Γxxx+2x˙y˙Γxyx+y˙2Γyyx=0y¨+x˙2Γxxy+2x˙y˙Γxyy+y˙2Γyyy=0}\left\{\begin{matrix} \ddot{x} + \dot{x}^2 \Gamma_{xx}^x + 2\dot{x} \dot{y} \Gamma_{xy}^x + \dot{y}^2 \Gamma_{yy}^x=0\\ \ddot{y} + \dot{x}^2 \Gamma_{xx}^y + 2\dot{x} \dot{y} \Gamma_{xy}^y + \dot{y}^2 \Gamma_{yy}^y =0 \end{matrix}\right\}

In general plugging in the Christoffel symbols here is quite messy, and its best to rather wait until you’ve computed them and do it indivdually in each special case. We record two common and useful special cases here:

Geodesics of Diagonal Metrics

The geodesics of a diagonal metric ds2=Edx2+Gdy2ds^2=Edx^2+Gdy^2 satisfy x¨+Exx˙2+2Eyx˙y˙Gxy˙22E=0\ddot{x}+\frac{E_x\dot{x}^2+2E_y\dot{x}\dot{y}-G_x\dot{y}^2}{2E}=0 y¨+Gyy˙2+2Gxx˙y˙Eyx˙22G=0\ddot{y}+\frac{G_y\dot{y}^2+2G_x\dot{x}\dot{y}-E_y\dot{x}^2}{2G}=0

Geodesics of Conformally Flat Metrics

The geodesics of the conformally flat metric ds2=e2ψ(dx2+dy2)ds^2=e^{2\psi}(dx^2+dy^2) satisfy x¨+ψx(x˙2y˙2)+2ψyx˙y˙=0\ddot{x}+\psi_x(\dot{x}^2-\dot{y}^2)+2\psi_y\dot{x}\dot{y}=0 y¨+ψy(y˙2x˙2)+2ψxx˙y˙=0\ddot{y}+\psi_y(\dot{y}^2-\dot{x}^2)+2\psi_x\dot{x}\dot{y}=0

Notation

Setting some notation, we will use coordinates named x,yx,y in which our metric can be written as

g=(EFFG)g=\begin{pmatrix}E&F\\ F&G\end{pmatrix}

or as a line element, ds2=Edx2+2Fdxdy+Gdy2ds^2=Edx^2+2Fdxdy+Gdy^2. We will often have use to discuss the inverse of the metric tensor, and so it will be useful to have a nice notation for working with it mid-computation. Here, we will use script letters to represent the components of the inverse

g1=(EFFG)g^{-1}=\begin{pmatrix}\mathcal{E}&\mathcal{F}\\ \mathcal{F}&\mathcal{G}\end{pmatrix}

To expand this out in terms of the original E,F,GE,F,G it is useful to give a name to the metric determinant:

D=EGF2D=EG-F^2

in which case we can write

E=GDF=FDG=ED\mathcal{E}=\frac{G}{D}\hspace{1cm}\mathcal{F}=\frac{-F}{D}\hspace{1cm}\mathcal{G}=\frac{E}{D}

General Christoffel Symbols

General christoffel symbols can be computed as functions of the metric tensor via the identity

Γki=12mgim(gmk+kgmmgk)\Gamma_{k\ell}^i=\frac{1}{2}\sum_m g^{im}\left(\partial_\ell g_{mk}+\partial_kg_{m\ell}-\partial_mg_{k\ell}\right)

Our goal here is to expand this out in two dimensions (where i,k,,m{x,y}i,k,\ell, m\in\{x,y\}). A priori there are eight possible Christoffel symbols here (three choices of x,yx,y), but the symbols enjoy a symmetry in their lower indices Γxy=Γyx\Gamma_{xy}^\ast = \Gamma_{yx}^\ast which reduces the number of independent possibilites to six. By the notational symmetry swapping all xx‘s and yy‘s, it then suffices to compute three Christoffel symbols directly from the definition: we choose Γxxx,Γxxy\Gamma_{xx}^x,\Gamma_{xx}^y and Γxyx\Gamma_{xy}^x.

Γxxx\Gamma_{xx}^x Computation

Γxxx=12mgxm(xgmx+xgmxmgxx)=12mgxm(2xgmxmgxx)=12[gxx(2xgxxxgxx)+gxy(2xgyxygxx)]=12[gxxxgxx+gxy(2xgxyygxx)]=12[ExE+F(2xFyE)]=12[EEx+F(2FxEy)]\begin{align*} \Gamma_{xx}^x &= \frac{1}{2} \sum_m g^{xm} \left( \partial_x g_{mx} + \partial_x g_{mx} - \partial_m g_{xx} \right) \\ &= \frac{1}{2} \sum_m g^{xm} \left( 2 \partial_x g_{mx} - \partial_m g_{xx} \right) \\ &= \frac{1}{2} \left[ g^{xx} \left( 2 \partial_x g_{xx} - \partial_x g_{xx} \right) + g^{xy} \left( 2 \partial_x g_{yx} - \partial_y g_{xx} \right) \right] \\ &= \frac{1}{2} \left[ g^{xx} \partial_x g_{xx} + g^{xy} \left( 2 \partial_x g_{xy} - \partial_y g_{xx} \right) \right] \\ &= \frac{1}{2} \left[ \mathcal{E} \partial_x E + \mathcal{F} \left( 2 \partial_x F - \partial_y E \right) \right] \\ &= \frac{1}{2} \left[ \mathcal{E} E_x + \mathcal{F} \left( 2 F_x - E_y \right) \right] \end{align*}

Rewriting in terms of E,F,GE,F,G and D=EGF2D=EG-F^2:

Γxxx=GExF(2FxEy)2D\Gamma_{xx}^x=\frac{G E_x - F \left( 2 F_x - E_y \right)}{2D}

Swapping all instances xx and yy (which also swaps EE and GG) gives the Christoffel symbol Γyyy\Gamma_{yy}^y:

Γyyy=EGyF(2FyGx)2D\Gamma_{yy}^y=\frac{E G_y - F \left( 2 F_y - G_x \right)}{2D}

Γxxy\Gamma_{xx}^y Computation

Γxxy=12mgym(xgmx+xgmxmgxx)=12mgym(2xgmxmgxx)=12[gyx(2xgxxxgyx)+gyy(2xgyxygxx)]=12[gyx(xgxx)+gyy(2xgyxygxx)]=12[FxE+G(2xFyE)]=12[FEx+G(2FxEy)]\begin{align*} \Gamma_{xx}^y &= \frac{1}{2} \sum_m g^{ym} \left( \partial_x g_{mx} + \partial_x g_{mx} - \partial_m g_{xx} \right) \\ &= \frac{1}{2} \sum_m g^{ym} \left( 2 \partial_x g_{mx} - \partial_m g_{xx} \right) \\ &= \frac{1}{2} \left[ g^{yx} \left( 2 \partial_x g_{xx} - \partial_x g_{yx} \right) + g^{yy} \left( 2 \partial_x g_{yx} - \partial_y g_{xx} \right) \right] \\ &= \frac{1}{2} \left[ g^{yx} \left( \partial_x g_{xx} \right) + g^{yy} \left( 2 \partial_x g_{yx} - \partial_y g_{xx} \right) \right] \\ &= \frac{1}{2} \left[ \mathcal{F} \partial_x E + \mathcal{G} \left( 2 \partial_x F - \partial_y E \right) \right] \\ &= \frac{1}{2} \left[ \mathcal{F} E_x + \mathcal{G} \left( 2 F_x - E_y \right) \right] \end{align*}

Rewriting in terms of E,F,GE,F,G and D=EGF2D=EG-F^2:

Γxxy=E(2FxEy)FEx2D\Gamma_{xx}^y=\frac{E\left( 2 F_x - E_y \right)-FE_x}{2D}

Swapping all instances xx and yy gives the Christoffel symbol Γyyx\Gamma_{yy}^x:

Γyyx=G(2FyGx)FGy2D\Gamma_{yy}^x=\frac{G\left( 2 F_y - G_x \right)-FG_y}{2D}

Γxyx\Gamma_{xy}^x Computation

Γxyx=12mgxm(ygmx+xgmymgxy)=12[gxx(ygxx+xgxyxgxy)+gxy(ygyx+xgyyygxy)]=12[gxx(ygxx)+gxy(xgyy)]=12[EyE+FxG]=12[EEy+FGx]\begin{align*} \Gamma_{xy}^x &= \frac{1}{2} \sum_m g^{xm} \left( \partial_y g_{mx} + \partial_x g_{my} - \partial_m g_{xy} \right) \\ &= \frac{1}{2} \left[ g^{xx} \left( \partial_y g_{xx} + \partial_x g_{xy} - \partial_x g_{xy} \right) + g^{xy} \left( \partial_y g_{yx} + \partial_x g_{yy} - \partial_y g_{xy} \right) \right] \\ &= \frac{1}{2} \left[ g^{xx} \left( \partial_y g_{xx} \right) + g^{xy} \left( \partial_x g_{yy} \right) \right] \\ &= \frac{1}{2} \left[ \mathcal{E} \partial_y E + \mathcal{F} \partial_x G \right] \\ &= \frac{1}{2} \left[ \mathcal{E} E_y + \mathcal{F} G_x \right] \end{align*}

Rewriting in terms of E,F,GE,F,G and D=EGF2D=EG-F^2:

Γxyx=GEyFGx2D\Gamma_{xy}^x=\frac{G E_y -F G_x}{2D}

Swapping all instances xx and yy gives the Christoffel symbol Γyxy\Gamma_{yx}^y:

Γyxy=EGxFEy2D\Gamma_{yx}^y=\frac{E G_x -F E_y}{2D}

Expanding the Geodesic Equation

The geodesic equation stipulates that the acceleration along the curve is zero. Given a curve γ(t)=(x(t),y(t))\gamma(t)=(x(t),y(t)) its first derivative is calculable by usual differentiation

γ˙=x˙x+y˙y\dot{\gamma}= \dot{x}\partial_x+\dot{y}\partial_y

But the second derivative is now a derivative not of a function, but of a vector field along a curve. This requires covariant differentiation - specifically the generalization D/dtD/dt of the usual covariant derivative \nabla of vector fields to fields along curves. Computing

Dγ˙dt=Ddt(x˙x+y˙y)=Ddtx˙x+Ddty˙y=(Dx˙dtx+x˙Ddtx)+(Dy˙dty+y˙Ddty)=x¨x+x˙(γ˙x)+y¨y+y˙(γ˙y)\begin{align*} \frac{D \dot{\gamma}}{dt} &= \frac{D}{dt} \left( \dot{x} \partial_x + \dot{y} \partial_y \right) \\ &= \frac{D}{dt} \dot{x} \partial_x + \frac{D}{dt} \dot{y} \partial_y \\ &= \left( \frac{D\dot{x}}{dt} \partial_x + \dot{x} \frac{D}{dt} \partial_x \right) + \left( \frac{D\dot{y}}{dt} \partial_y + \dot{y} \frac{D}{dt} \partial_y \right) \\ &= \ddot{x} \partial_x + \dot{x} \left( \nabla_{\dot{\gamma}} \partial_x \right) + \ddot{y} \partial_y + \dot{y} \left( \nabla_{\dot{\gamma}} \partial_y \right) \end{align*}

where we have used linearity and the Leibniz rule, together with the fact that D/dtD/dt agrees with the time derivative along coordinate functions and the covariant derivative in direction γ\gamma along vector fields. Continuing we expand occurances of γ˙\nabla_{\dot{\gamma}} using the tensorality of the covariant derivative: for any vector field VV,

γ˙V=x˙x+y˙yV=x˙x+y˙yV=x˙Vx+y˙Vy=x˙xV+y˙yV\begin{align*} \nabla_{\dot{\gamma}} V &= \nabla_{\dot{x}\partial_x+\dot{y}\partial_y}V\\ &= \nabla_{\dot{x}} \partial_x + \nabla_{\dot{y}} \partial_y V \\ &= \nabla_{\dot{x}} V \partial_x + \nabla_{\dot{y}} V \partial_y \\ &= \dot{x} \nabla_{\partial_x} V + \dot{y} \nabla_{\partial_y} V \end{align*}

Plugging this in for both V=xV=\partial_x and V=yV=\partial_y, yields the following, where in the second line we have used the symmetry that xy=yx\nabla_{\partial_x}\partial_y=\nabla_{\partial_y}\partial_x for coordinate vector fields.

Dγ˙dt=x¨x+x˙(x˙xx+y˙yx)+y¨y+y˙(x˙xy+y˙yy)=x¨x+y¨y+x˙2xx+2x˙y˙yx+y˙2yy\begin{align*} \frac{D\dot{\gamma}}{dt} &= \ddot{x} \partial_x + \dot{x} \left( \dot{x} \nabla_{\partial_x} \partial_x + \dot{y} \nabla_{\partial_y} \partial_x \right) + \ddot{y} \partial_y + \dot{y} \left( \dot{x} \nabla_{\partial_x} \partial_y + \dot{y} \nabla_{\partial_y} \partial_y \right) \\ &= \ddot{x} \partial_x + \ddot{y} \partial_y + \dot{x}^2 \nabla_{\partial_x} \partial_x + 2 \dot{x} \dot{y} \nabla_{\partial_y} \partial_x + \dot{y}^2 \nabla_{\partial_y} \partial_y \end{align*}

Finally, it has come time for the Christoffel symbols to make their appearance, as the the coefficients of covariantly differentiating coordinate fields:

xx=Γxxxx+Γxxyyxy=Γxyxx+Γxyyyyy=Γyyxx+Γyyyy\begin{align*} \nabla_{\partial_x} \partial_{x} &= \Gamma_{xx}^x \partial_{x} + \Gamma_{xx}^y \partial_{y} \\ \nabla_{\partial_x} \partial_{y} &= \Gamma_{xy}^x \partial_{x} + \Gamma_{xy}^y \partial_{y} \\ \nabla_{\partial_y} \partial_{y} &= \Gamma_{yy}^x \partial_{x} + \Gamma_{yy}^y \partial_{y} \end{align*}

Plugging these in,

Dγ˙dt=x¨x+y¨y+x˙2(Γxxxx+Γxxyy)+2x˙y˙(Γxyxx+Γxyyy)+y˙2(Γyyxx+Γyyyy)\begin{align*} \frac{D\dot{\gamma}}{dt} &= \ddot{x} \partial_x + \ddot{y} \partial_y \\ &\quad + \dot{x}^2 \left( \Gamma_{xx}^x \partial_x + \Gamma_{xx}^y \partial_y \right) \\ &\quad + 2 \dot{x} \dot{y} \left( \Gamma_{xy}^x \partial_x + \Gamma_{xy}^y \partial_y \right) \\ &\quad + \dot{y}^2 \left( \Gamma_{yy}^x \partial_x + \Gamma_{yy}^y \partial_y \right) \end{align*}

and re-grouping terms by basis vector,

Dγ˙dt=(x¨+x˙2Γxxx+2x˙y˙Γxyx+y˙2Γyyx)x+(y¨+x˙2Γxxy+2x˙y˙Γxyy+y˙2Γyyy)y\begin{align*} \frac{D\dot{\gamma}}{dt} &= \left( \ddot{x} + \dot{x}^2 \Gamma_{xx}^x + 2\dot{x} \dot{y} \Gamma_{xy}^x + \dot{y}^2 \Gamma_{yy}^x \right) \partial_x \\ &\quad + \left( \ddot{y} + \dot{x}^2 \Gamma_{xx}^y + 2\dot{x} \dot{y} \Gamma_{xy}^y + \dot{y}^2 \Gamma_{yy}^y \right) \partial_y \end{align*}

This gives a full expression for the acceleration along a curve γ\gamma. Because geodesics have vanishing acceleration, setting both components to zero gives a pair of coupled nonlinear differential equations specifying geodesics:

{x¨+x˙2Γxxx+2x˙y˙Γxyx+y˙2Γyyx=0y¨+x˙2Γxxy+2x˙y˙Γxyy+y˙2Γyyy=0}\left\{\begin{matrix} \ddot{x} + \dot{x}^2 \Gamma_{xx}^x + 2\dot{x} \dot{y} \Gamma_{xy}^x + \dot{y}^2 \Gamma_{yy}^x=0\\ \ddot{y} + \dot{x}^2 \Gamma_{xx}^y + 2\dot{x} \dot{y} \Gamma_{xy}^y + \dot{y}^2 \Gamma_{yy}^y =0 \end{matrix}\right\}

Diagonal Metrics

A diagonal metric has F=0F=0, which simplfies many of the Christoffel symbols. We compute three such simplifications here:

Γxxx=GExF(2FxEy)2(EGF2)=GEx2EG=Ex2EΓxxy=E(2FxEy)FEx2(EGF2)=EEy2EG=Ey2GΓxyx=GEyFGx2(EGF2)=GEy2EG=Ey2E\begin{align} \Gamma_{xx}^x&=\frac{G E_x - F \left( 2 F_x - E_y \right)}{2(EG-F^2)}=\frac{G E_x}{2EG}=\frac{E_x}{2E}\\ \Gamma_{xx}^y&=\frac{E\left( 2 F_x - E_y \right)-FE_x}{2(EG-F^2)}=\frac{-EE_y}{2EG}=-\frac{E_y}{2G}\\ \Gamma_{xy}^x&=\frac{G E_y -F G_x}{2(EG-F^2)}=\frac{GE_y}{2EG}=\frac{E_y}{2E} \end{align}

Switching xx and yy as previously gives the other three. We summarize all in the table below

Γxxx=Ex2EΓxxy=Ey2G\Gamma_{xx}^x=\frac{E_x}{2E}\hspace{1cm}\Gamma_{xx}^y= -\frac{E_y}{2G} Γyyx=Gx2EΓyyy=Gy2G\Gamma_{yy}^x=-\frac{G_x}{2E}\hspace{1cm}\Gamma_{yy}^y=\frac{G_y}{2G} Γxyx=Ey2EΓxyy=Gx2G\Gamma_{xy}^x=\frac{E_y}{2E}\hspace{1cm}\Gamma_{xy}^y=\frac{G_x}{2G}

To get the geodesic equations, we simply plug these in and simplify. Note that all with a superscript xx (which occur in the x¨\ddot{x} equation) have denominator 2E2E and all terms for the y¨\ddot{y} equation share denominator 2G2G.

The geodesics of a diagonal metric ds2=Edx2+Gdy2ds^2=Edx^2+Gdy^2 satisfy x¨+Exx˙2+2Eyx˙y˙Gxy˙22E=0\ddot{x}+\frac{E_x\dot{x}^2+2E_y\dot{x}\dot{y}-G_x\dot{y}^2}{2E}=0 y¨+Gyy˙2+2Gxx˙y˙Eyx˙22G=0\ddot{y}+\frac{G_y\dot{y}^2+2G_x\dot{x}\dot{y}-E_y\dot{x}^2}{2G}=0

Conformally Flat Metrics

A conformally flat metric is a positive scalar multiple of the Euclidean metric ds2=Ψ(dx2+dy2)ds^2=\Psi (dx^2+dy^2). In the terminology above this is F=0F=0 and E=GE=G. This makes the Christoffel symbols easy to compute from the diagonal metric case

Γxxx=Ψx2ΨΓxxy=Ψy2Ψ\Gamma_{xx}^x=\frac{\Psi_x}{2\Psi}\hspace{1cm}\Gamma_{xx}^y= -\frac{\Psi_y}{2\Psi} Γyyx=Ψx2ΨΓyyy=Ψy2Ψ\Gamma_{yy}^x=-\frac{\Psi_x}{2\Psi}\hspace{1cm}\Gamma_{yy}^y=\frac{\Psi_y}{2\Psi} Γxyx=Ψy2ΨΓxyy=Ψx2Ψ\Gamma_{xy}^x=\frac{\Psi_y}{2\Psi}\hspace{1cm}\Gamma_{xy}^y=\frac{\Psi_x}{2\Psi}

Plugging these in and simplifying gives the geodesic equations

x¨+Ψx(x˙2y˙2)+2Ψyx˙y˙2Ψ=0\ddot{x}+\frac{\Psi_x(\dot{x}^2-\dot{y}^2)+2\Psi_y\dot{x}\dot{y}}{2\Psi}=0 y¨+Ψy(y˙2x˙2)+2Ψxx˙y˙2Ψ=0\ddot{y}+\frac{\Psi_y(\dot{y}^2-\dot{x}^2)+2\Psi_x\dot{x}\dot{y}}{2\Psi}=0

Since the function Ψ\Psi is always positive, it is often convenient to express it as an exponential, indeed as Ψ=e2ψ\Psi=e^{2\psi} for some lowercase ψ\psi. ds2=e2ψ(dx2+dy2)ds^2=e^{2\psi}(dx^2+dy^2)

This notation results in particularly simple forms of the Christoffel symbols: for instance

Γxxx=Ψx2Ψ=xe2ψ2e2ψ=e2ψ2ψx2e2ψ=ψx\Gamma_{xx}^x=\frac{\Psi_x}{2\Psi}=\frac{\partial_x e^{2\psi}}{2e^{2\psi}}=\frac{e^{2\psi}2\psi_x}{2e^{2\psi}}=\psi_x

The result of all such Christoffel symbols are summarized below:

Γxxx=ψxΓxxy=ψy\Gamma_{xx}^x=\psi_x \hspace{1cm}\Gamma_{xx}^y= -\psi_y Γyyx=ψxΓyyy=ψy\Gamma_{yy}^x=-\psi_x\hspace{1cm}\Gamma_{yy}^y=\psi_y Γxyx=ψyΓxyy=ψx\Gamma_{xy}^x=\psi_y\hspace{1cm}\Gamma_{xy}^y=\psi_x

The geodesic equations in this case become

x¨+ψx(x˙2y˙2)+2ψyx˙y˙=0\ddot{x}+\psi_x(\dot{x}^2-\dot{y}^2)+2\psi_y\dot{x}\dot{y}=0 y¨+ψy(y˙2x˙2)+2ψxx˙y˙=0\ddot{y}+\psi_y(\dot{y}^2-\dot{x}^2)+2\psi_x\dot{x}\dot{y}=0

← All posts