July 16, 2017

Buster

jerem.

I have written a Mathematica package to perform basic computations in Riemannian geometry. In this post, I share an example of computation that this code can be used for and a link to the package containing the instructions to reproduce the computation presented here.

I started a Mathematica package to performs computations of Riemannian geometry. As an exercise in using it, I present here the computation of the curvature of a 2-sphere embedded in the euclidean space. The package is in development and its content is not meant to be exhaustive. This suffices however to perform some of the most basic computations on (pseudo-)Riemannian real manifolds. The package is available in its own git repository.

For something more general, I recommend you take a look at the excellent SageManifolds.

let us start by defining a background 3-dimensional euclidean space by providing a set of coordinates {x,y,z}\{x,y,z\} and a metric in the form of a squared line-element:

ds2=dx2+dy2+dz2 .ds^2=dx^2+dy^2+dz^2~.

g=(100010001) .\begin{aligned} g=\left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right)~. \end{aligned}

One way to embed the 2-sphere in the 3-dimensional euclidean space is to impose that

Φx2+y2+z2R2=0 ,\Phi \equiv x^2+y^2+z^2 - R^2 = 0~,

where R>0R>0 denotes the Radius of the sphere. One parametrisation satisfying this constraint is

x=Rsinθcosϕ ,y=Rsinθsinϕ ,(1)z=Rcosθ ,\begin{aligned} x&=R \sin{\theta}\cos{\phi}~,\\ y&=R \sin{\theta}\sin{\phi}~,& (1)\\ z&=R \cos{\theta}~, \end{aligned}

with {θ,ϕ}\{\theta, \phi\} taking up the role of local ordinates on the 2-sphere which we will denote as S2S^2.

The components of the one-form normal to S2S^2 are obtained as follows

nα=Φxα .n_\alpha = \frac{\partial \Phi}{\partial x^\alpha}~.

Once it has been normalised, this turns out to be

{xx2+y2+z2,yx2+y2+z2,zx2+y2+z2}\{\frac{x}{\sqrt{x^2+y^2+z^2}},\frac{y}{\sqrt{x^2+y^2+z^2}},\frac{z}{\sqrt{x^2+y^2+z^2}}\}

The general expression of the projector onto S2S_2 is

Pαβ=gαβnαnβ .P_{\alpha\beta}=g_{\alpha\beta}-n_\alpha n_\beta~.

Here this gives:

(y2+z2x2+y2+z2xyx2+y2+z2xzx2+y2+z2xyx2+y2+z2x2+z2x2+y2+z2yzx2+y2+z2xzx2+y2+z2yzx2+y2+z2x2+y2x2+y2+z2)\begin{aligned} \left( \begin{array}{ccc} \frac{y^2+z^2}{x^2+y^2+z^2} & -\frac{x y}{x^2+y^2+z^2} & -\frac{x z}{x^2+y^2+z^2} \\ -\frac{x y}{x^2+y^2+z^2} & \frac{x^2+z^2}{x^2+y^2+z^2} & -\frac{y z}{x^2+y^2+z^2} \\ -\frac{x z}{x^2+y^2+z^2} & -\frac{y z}{x^2+y^2+z^2} & \frac{x^2+y^2}{x^2+y^2+z^2} \\ \end{array} \right) \end{aligned}

Finally, the extrinsic curvature is the Lie derivative of this tensor along the normal vector defined above:

Kαβ=12LnPαβ .K_{\alpha\beta}=-\frac{1}{2}L_n P_{\alpha\beta}~.

Here this gives:

(y2+z2(x2+y2+z2)3/2xy(x2+y2+z2)3/2xz(x2+y2+z2)3/2xy(x2+y2+z2)3/2x2+z2(x2+y2+z2)3/2yz(x2+y2+z2)3/2xz(x2+y2+z2)3/2yz(x2+y2+z2)3/2x2+y2(x2+y2+z2)3/2)\begin{aligned} \left( \begin{array}{ccc} -\frac{y^2+z^2}{\left(x^2+y^2+z^2\right)^{3/2}} & \frac{x y}{\left(x^2+y^2+z^2\right)^{3/2}} & \frac{x z}{\left(x^2+y^2+z^2\right)^{3/2}} \\ \frac{x y}{\left(x^2+y^2+z^2\right)^{3/2}} & -\frac{x^2+z^2}{\left(x^2+y^2+z^2\right)^{3/2}} & \frac{y z}{\left(x^2+y^2+z^2\right)^{3/2}} \\ \frac{x z}{\left(x^2+y^2+z^2\right)^{3/2}} & \frac{y z}{\left(x^2+y^2+z^2\right)^{3/2}} & -\frac{x^2+y^2}{\left(x^2+y^2+z^2\right)^{3/2}} \\ \end{array} \right) \end{aligned}

The mean curvature is given by the trace of this tensor. Here, it is found to be

Tr K=2R(2)\begin{aligned} &\text{Tr}~K=-\frac{2}{R} &(2) \end{aligned}

All the above was done using only vectors (and one-forms) belonging to the (co-)tangent bundle of the surrounding euclidean space without any explicit reference to the local coordinates on S2S^2. The extrinsic curvature also has a representation on S2S^2.

From (1), one constructs the vielbein:

eaα=xαya ,e^\alpha_a=\frac{\partial x^\alpha}{\partial y^a}~,

where xαx^\alpha denotes the coordinates on R3\mathbb{R}^3, {x,y,z}\{x,y,z\} and yay^a are the coordinates on S2S^2, {θ,ϕ}\{\theta,\phi\}. In our case, this reads, in the matrix form :

(Rcos(θ)cos(ϕ)Rsin(θ)sin(ϕ)Rcos(θ)sin(ϕ)Rcos(ϕ)sin(θ)Rsin(θ)0)\begin{aligned} \left( \begin{array}{cc} R \cos (\theta ) \cos (\phi ) & -R \sin (\theta ) \sin (\phi ) \\ R \cos (\theta ) \sin (\phi ) & R \cos (\phi ) \sin (\theta ) \\ -R \sin (\theta ) & 0 \\ \end{array} \right) \end{aligned}

The induced metric on Σ\Sigma can then be computed as

γab=eaαebβgαβ ,(3)\begin{aligned} &\gamma_{ab} = e^\alpha_ae^\beta_bg_{\alpha\beta}~,&(3) \end{aligned}

which here gives:

(R200R2sin2(θ))\begin{aligned} \left( \begin{array}{cc} R^2 & 0 \\ 0 & R^2 \sin ^2(\theta ) \\ \end{array} \right) \end{aligned}

Applying a transformation similar to Eq.(3) to the extrinsic curvature gives

(R00Rsin2(θ))\begin{aligned} \left( \begin{array}{cc} -R & 0 \\ 0 & -R \sin ^2(\theta ) \end{array} \right) \end{aligned}

and so we recover Eq.(2) by taking the trace (γabKab\gamma^{ab}K_{ab}).