Back

Arc Length and Metric Tensor

To calculate the (squared) length of a vector, we take the dot product of the vector with it self:

v2=vv=(vμeμ)(vνeν)=vμvν(eμeν). \begin{align*} |\boldsymbol{v}|^2 &= \boldsymbol{v} \cdot \boldsymbol{v} \\ &= (v^{\mu} \boldsymbol{e_{\mu}}) \cdot (v^{\nu} \boldsymbol{e_{\nu}}) \\ &= v^{\mu} v^{\nu} (\boldsymbol{e_{\mu}} \cdot \boldsymbol{e_{\nu}}). \end{align*}

In 2D Cartesian coordinates, the dot products of basis vectors are as follows:

exex=1,exey=0,eyey=1. \begin{align*} \boldsymbol{e_x} \cdot \boldsymbol{e_x} = 1, \\ \boldsymbol{e_x} \cdot \boldsymbol{e_y} = 0, \\ \boldsymbol{e_y} \cdot \boldsymbol{e_y} = 1. \end{align*}

The metric tensor gμνg_{\mu \nu} contains these dot products:

gμν=eμeν.g_{\mu \nu} = \boldsymbol{e_{\mu}} \cdot \boldsymbol{e_{\nu}}.

For the Cartesian coordinate system, the metric tensor is equal to the Kronecker delta:

gμν=δμν={1μ=ν,0μν,g_{\mu \nu} = \delta_{\mu \nu} = \begin{cases} 1 & \mu &= \nu, \\ 0 & \mu &\neq \nu, \end{cases}

Or represented as matrix for 2D Cartesian coordinate system:

gμν=[1001]g_{\mu \nu} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}

This means that the vectors are parallel to each other due to the missing off diagonal components.

The metric tensor has two covariant indices. Consider the coordinate transformation xμx~μx^{\mu} \to \tilde{x}^{\mu}, the bases transform as follows:

e~μ=xνx~μeν,\boldsymbol{\tilde{e}_{\mu}} = \frac{\partial x^{\nu}}{\partial \tilde{x}^{\mu}} \boldsymbol{e}_{\nu},

and the metric:

g~μν=e~μe~ν=xαx~μeαxβx~νeβ=xαx~μxβx~νeαeβ=xαx~μxβx~νgαβ. \begin{align*} \tilde{g}_{\mu \nu} &= \boldsymbol{\tilde{e}_{\mu} \cdot \tilde{e}_{\nu}} \\ &= \frac{\partial x^{\alpha}}{\partial \tilde{x}^{\mu}} \boldsymbol{e}_{\alpha} \cdot \frac{\partial x^{\beta}}{\partial \tilde{x}^{\nu}} \boldsymbol{e}_{\beta} \\ &= \frac{\partial x^{\alpha}}{\partial \tilde{x}^{\mu}} \frac{\partial x^{\beta}}{\partial \tilde{x}^{\nu}} \boldsymbol{e}_{\alpha} \cdot \boldsymbol{e}_{\beta} \\ &= \frac{\partial x^{\alpha}}{\partial \tilde{x}^{\mu}} \frac{\partial x^{\beta}}{\partial \tilde{x}^{\nu}} g_{\alpha \beta}. \end{align*}

The metric tensor is also symmetric:

gμν=eμeν=eνeμ=gνμ. \begin{align*} g_{\mu \nu} &= \boldsymbol{e_{\mu}} \cdot \boldsymbol{e_{\nu}} \\ &= \boldsymbol{e_{\nu}} \cdot \boldsymbol{e_{\mu}} \\ &= g_{\nu \mu}. \end{align*}

Generally, if we want to compute the dot product of two vectors, we use the metric tensor:

vw=(vμeμ)(wνeν)=vμwν(eμeν)=vμwνgμν=vwcosθ, \begin{align*} \boldsymbol{v} \cdot \boldsymbol{w} &= (v^{\mu} \boldsymbol{e_{\mu}}) \cdot (w^{\nu} \boldsymbol{e_{\nu}}) \\ &= v^{\mu} w^{\nu} (\boldsymbol{e_{\mu}} \cdot \boldsymbol{e_{\nu}}) \\ &= v^{\mu} w^{\nu} g_{\mu \nu} = |\boldsymbol{v}| |\boldsymbol{w}| \cos \theta, \end{align*}

where θ\theta is the angle between the two vectors.

The metric tensor is a function g:V×VRg: V \times V \to \mathbb{R}:

g(v,w)=vμwνgμν.g(\boldsymbol{v}, \boldsymbol{w}) = v^{\mu} w^{\nu} g_{\mu \nu}.

We can scale the inputs of the metric tensor:

g(av,w)=g(v,aw)=ag(v,w),a(vμwνgμν)=(avμ)wνgμν=vμ(awν)gμν \begin{align*} g(a \boldsymbol{v}, \boldsymbol{w}) &= g(\boldsymbol{v}, a \boldsymbol{w}) = a g(\boldsymbol{v}, \boldsymbol{w}), \\ a (v^{\mu} w^{\nu} g_{\mu \nu}) &= (a v^{\mu}) w^{\nu} g_{\mu \nu} = v^{\mu} (a w^{\nu}) g_{\mu \nu} \end{align*}

The inputs can also be added:

g(v+u,w)=g(v,w)+g(u,w),(vμ+uμ)wνgμν=vμwνgμν+uμwνgμν,g(v,w+t)=g(v,w)+g(v,t),vμ(wν+tν)gμν=vμwνgμν+vμtνgμν, \begin{align*} g(\boldsymbol{v} + \boldsymbol{u}, \boldsymbol{w}) &= g(\boldsymbol{v}, \boldsymbol{w}) + g(\boldsymbol{u}, \boldsymbol{w}), \\ (v^{\mu} + u^{\mu}) w^{\nu} g_{\mu \nu} &= v^{\mu} w^{\nu} g_{\mu \nu} + u^{\mu} w^{\nu} g_{\mu \nu}, \\ g(\boldsymbol{v}, \boldsymbol{w} + \boldsymbol{t}) &= g(\boldsymbol{v}, \boldsymbol{w}) + g(\boldsymbol{v}, \boldsymbol{t}), \\ v^{\mu} (w^{\nu} + t^{\nu}) g_{\mu \nu} &= v^{\mu} w^{\nu} g_{\mu \nu} + v^{\mu} t^{\nu} g_{\mu \nu}, \end{align*}

however:

g(v+u,w+t)g(v,w)+g(u,t),g(v+u,w+t)=g(v,w+t)+g(u,w+t)=g(v,w)+g(v,t)+g(u,w)+g(u,t). \begin{align*} g(\boldsymbol{v} + \boldsymbol{u}, \boldsymbol{w} + \boldsymbol{t}) &\neq g(\boldsymbol{v}, \boldsymbol{w}) + g(\boldsymbol{u}, \boldsymbol{t}), \\ g(\boldsymbol{v} + \boldsymbol{u}, \boldsymbol{w} + \boldsymbol{t}) &= g(\boldsymbol{v}, \boldsymbol{w} + \boldsymbol{t}) + g(\boldsymbol{u}, \boldsymbol{w} + \boldsymbol{t}) \\ &= g(\boldsymbol{v}, \boldsymbol{w}) + g(\boldsymbol{v}, \boldsymbol{t}) + g(\boldsymbol{u}, \boldsymbol{w}) + g(\boldsymbol{u}, \boldsymbol{t}). \end{align*}

And this is the same definition as bilinear form:

B:V×VR,aB(v,w)=B(av,w)=B(v,aw),B(v+u,w)=B(v,w)+B(u,w),B(v,w+t)=B(v,w)+B(v,t). \begin{gather*} \mathcal{B}: V \times V \to \mathbb{R}, \\ a\mathcal{B}(\boldsymbol{v}, \boldsymbol{w}) = \mathcal{B}(a\boldsymbol{v}, \boldsymbol{w}) = \mathcal{B}(\boldsymbol{v}, a\boldsymbol{w}), \\ \mathcal{B}(\boldsymbol{v} + \boldsymbol{u}, \boldsymbol{w}) = \mathcal{B}(\boldsymbol{v}, \boldsymbol{w}) + \mathcal{B}(\boldsymbol{u}, \boldsymbol{w}), \\ \mathcal{B}(\boldsymbol{v}, \boldsymbol{w} + \boldsymbol{t}) = \mathcal{B}(\boldsymbol{v}, \boldsymbol{w}) + \mathcal{B}(\boldsymbol{v}, \boldsymbol{t}). \end{gather*}

The metric tensor is a bilinear form, but in addition it has two properties:

g(v,w)=g(w,v),g(v,v)0. \begin{align*} g(\boldsymbol{v}, \boldsymbol{w}) &= g(\boldsymbol{w}, \boldsymbol{v}), \tag{symmetricity} \\ g(\boldsymbol{v}, \boldsymbol{v}) &\geq 0. \tag{positive or zero length} \end{align*}

A curve may be broken up into small pieces:

Curve

and if we sum over the lengths these small pieces, we get the arc length LL:

LiR(λ+h)R(λ)L=limh0iR(λ+h)R(λ)hh=dRdλdλ, \begin{align*} L &\approx \sum_i |\boldsymbol{R}(\lambda + h) - \boldsymbol{R}(\lambda)| \\ L &= \lim_{h \to 0} \sum_i \frac{|\boldsymbol{R}(\lambda + h) - \boldsymbol{R}(\lambda)|}{h} h \\ &= \int \left|\frac{d\boldsymbol{R}}{d \lambda}\right| d\lambda, \end{align*}

where dRdλ\frac{d\boldsymbol{R}}{d\lambda} is the vector tangent to the curve. Its length squared is equal to:

dRdλ2=dRdλdRdλ=(RRμdRμdλ)(RRνdRνdλ)=dRμdλdRνdλ(RRμRRν)=dRμdλdRνdλ(eμeν)=dRμdλdRνdλgμν. \begin{align*} \left|\frac{d\boldsymbol{R}}{d \lambda}\right|^2 &= \frac{d \boldsymbol{R}}{d\lambda} \cdot \frac{d \boldsymbol{R}}{d\lambda} \\ &= \left(\frac{\partial \boldsymbol{R}}{\partial R^{\mu}} \frac{d R^{\mu}}{d \lambda}\right) \cdot \left(\frac{\partial \boldsymbol{R}}{\partial R^{\nu}} \frac{d R^{\nu}}{d \lambda}\right) \\ &= \frac{d R^{\mu}}{d \lambda} \frac{d R^{\nu}}{d \lambda} \left(\frac{\partial \boldsymbol{R}}{\partial R^{\mu}} \cdot \frac{\partial \boldsymbol{R}}{\partial R^{\nu}}\right) \\ &= \frac{d R^{\mu}}{d \lambda} \frac{d R^{\nu}}{d \lambda} \left(\boldsymbol{e_{\mu}} \cdot \boldsymbol{e_{\nu}}\right) \\ &= \frac{d R^{\mu}}{d \lambda} \frac{d R^{\nu}}{d \lambda} g_{\mu \nu}. \end{align*}

We would like to find a way to relate the vectors v\boldsymbol{v} from the vector space VV and covectors from the dual space VV^*. For a vector v\boldsymbol{v}, we will introduce its "partner" covector v_\boldsymbol{v} \cdot \_ where _\_ is a "slot" for another vector. This covector really is a member of VV^* by the abstract definition:

v_:VR,v(na)=n(va),v(a+b)=(va)+(vb), \begin{align*} \boldsymbol{v} \cdot \_: V \to \mathbb{R}, \\ \boldsymbol{v} \cdot (n\boldsymbol{a}) = n (\boldsymbol{v} \cdot \boldsymbol{a}), \\ \boldsymbol{v} \cdot (\boldsymbol{a} + \boldsymbol{b}) = (\boldsymbol{v} \cdot \boldsymbol{a}) + (\boldsymbol{v} \cdot \boldsymbol{b}), \end{align*}

and since it lives in the dual space VV^*, we should be able to build it from the dual basis:

v_=vμϵμ\boldsymbol{v} \cdot \_ = v_{\mu} \epsilon^{\mu}

If we substitute w\boldsymbol{w} into v_\boldsymbol{v} \cdot \_:

vw=g(v,w)=gαβϵαϵβ(vγeγ,wδeδ)=gαβϵα(vγeγ)ϵβ(wδeδ)=gαβvγwδϵα(eγ)ϵβ(eδ)=gαβvγwδδγαδδβ=gαβvαwβ \begin{align*} \boldsymbol{v} \cdot \boldsymbol{w} &= g(\boldsymbol{v}, \boldsymbol{w}) \\ &= g_{\alpha \beta} \epsilon^{\alpha} \epsilon^{\beta} (v^{\gamma} \boldsymbol{e_{\gamma}}, w^{\delta} \boldsymbol{e_{\delta}}) \\ &= g_{\alpha \beta} \epsilon^{\alpha} (v^{\gamma} \boldsymbol{e_{\gamma}}) \epsilon^{\beta} (w^{\delta} \boldsymbol{e_{\delta}}) \\ &= g_{\alpha \beta} v^{\gamma} w^{\delta} \epsilon^{\alpha} (\boldsymbol{e_{\gamma}}) \epsilon^{\beta} (\boldsymbol{e_{\delta}}) \\ &= g_{\alpha \beta} v^{\gamma} w^{\delta} \delta^{\alpha}_{\gamma} \delta^{\beta}_{\delta} \\ &= g_{\alpha \beta} v^{\alpha} w^{\beta} \end{align*}

we arrive at the formula for dot product. If we instead not substitute anything and consider just v_\boldsymbol{v} \cdot \_, we arrive at:

v_=g(v,_)=gαβϵαϵβ(vγeγ)=gαβvγϵαϵβ(eγ)=gαβvγϵαδγβ=gαβvβϵα. \begin{align*} \boldsymbol{v} \cdot \_ &= g(\boldsymbol{v}, \_) \\ &= g_{\alpha \beta} \epsilon^{\alpha} \epsilon^{\beta} (v^{\gamma} \boldsymbol{e_{\gamma}}) \\ &= g_{\alpha \beta} v^{\gamma} \epsilon^{\alpha} \epsilon^{\beta} (\boldsymbol{e_{\gamma}}) \\ &= g_{\alpha \beta} v^{\gamma} \epsilon^{\alpha} \delta^{\beta}_{\gamma} \\ &= g_{\alpha \beta} v^{\beta} \epsilon^{\alpha}. \end{align*}

This is the component decomposition of v_\boldsymbol{v} \cdot \_. Instead of writing gαβvβg_{\alpha \beta} v^{\beta}, we can write vαv_{\alpha}:

vα=gαβvβ,v_=vαϵα=gαβvβϵα. \begin{align*} v_{\alpha} &= g_{\alpha \beta} v^{\beta}, \\ \boldsymbol{v} \cdot \_ &= v_{\alpha} \epsilon^{\alpha} = g_{\alpha \beta} v^{\beta} \epsilon^{\alpha}. \end{align*}

Generally vμvμv_{\mu} \neq v^{\mu} except in orthonormal basis.

We can lower an index. Now we need to figure out how to raise an index. For this, we will use the inverse metric gμνg^{\mu \nu} defined as follows:

gαβgβγ=δγα.g^{\alpha \beta} g_{\beta \gamma} = \delta^{\alpha}_{\gamma}.

The equation for covector components vα=gαβvβv_{\alpha} = g_{\alpha \beta} v^{\beta}. We can multiply both sides by gγαg^{\gamma \alpha}:

gγαvα=gγαgαβvβ=δβγvβ=vγ. \begin{align*} g^{\gamma \alpha} v_{\alpha} &= g^{\gamma \alpha} g_{\alpha \beta} v^{\beta} \\ &= \delta^{\gamma}_{\beta} v^{\beta} \\ &= v^{\gamma}. \end{align*}

So to summarize:

vμ=gμνvν,vμ=gμνvν. \begin{align*} v_{\mu} &= g_{\mu \nu} v^{\nu}, \\ v^{\mu} &= g^{\mu \nu} v_{\nu}. \end{align*}

Consider a point parametrized by the distance from the origin rr and the angle θ\theta

Polar coordinates

From the diagram we can see:

x=rcosθ,y=rsinθ. \begin{align*} x &= r \cos \theta, \\ y &= r \sin \theta. \end{align*}

The partial derivatives are:

xr=cosθ,xθ=rsinθ,yr=sinθ,yθ=rcosθ. \begin{align*} \frac{\partial x}{\partial r} &= \cos \theta, & \frac{\partial x}{\partial \theta} &= -r \sin \theta, \\ \frac{\partial y}{\partial r} &= \sin \theta, & \frac{\partial y}{\partial \theta} &= r \cos \theta. \end{align*}

The metric tensor in 2D Cartesian coordinates is the Kronecker delta δμν\delta_{\mu \nu}, the polar metric tensor g~μν\tilde{g}_{\mu \nu} is equal to:

g~μν=xαxμxβxνgαβ=xαxμxβxνδαβ=αxαxμxαxν. \begin{align*} \tilde{g}_{\mu \nu} &= \frac{\partial x^{\alpha}}{\partial x^{\mu}} \frac{\partial x^{\beta}}{\partial x^{\nu}} g_{\alpha \beta} \\ &= \frac{\partial x^{\alpha}}{\partial x^{\mu}} \frac{\partial x^{\beta}}{\partial x^{\nu}} \delta_{\alpha \beta} \\ &= \sum_{\alpha} \frac{\partial x^{\alpha}}{\partial x^{\mu}} \frac{\partial x^{\alpha}}{\partial x^{\nu}}. \end{align*}

The components of the polar metric tensor are equal to:

g~rr=αxαrxαr=cos2θ+sin2θ=1,g~rθ=g~θr=αxαrxαθ=rcosθsinθ+rsinθcosθ=0,g~θθ=αxαθxαθ=(rsinθ)2+(rcosθ)2=r2sin2θ+r2cos2θ=r2, \begin{align*} \tilde{g}_{rr} &= \sum_{\alpha} \frac{\partial x^{\alpha}}{\partial r} \frac{\partial x^{\alpha}}{\partial r} \\ &= \cos^2 \theta + \sin^2 \theta \\ &= 1, \\ \tilde{g}_{r \theta} = \tilde{g}_{\theta r} &= \sum_{\alpha} \frac{\partial x^{\alpha}}{\partial r} \frac{\partial x^{\alpha}}{\partial \theta} \\ &= -r \cos \theta \sin \theta + r \sin \theta \cos \theta \\ &= 0, \\ \tilde{g}_{\theta \theta} &= \sum_{\alpha} \frac{\partial x^{\alpha}}{\partial \theta} \frac{\partial x^{\alpha}}{\partial \theta} \\ &= (-r \sin \theta)^2 + (r \cos \theta)^2 \\ &= r^2 \sin^2 \theta + r^2 \cos^2 \theta \\ &= r^2, \end{align*}

or in matrix notation:

g~μν=[100r2].\tilde{g}_{\mu \nu} = \begin{bmatrix} 1 & 0 \\ 0 & r^2 \end{bmatrix}.

Consider the spherical coordinates where the coordinates are: rr - the distance from the origin, θ\theta - the colatitude and ϕ\phi - the azimuthal angle:

Spherical coordinates

We can start by solving for the cartesian coordinate zz and the projection xyxy onto the x-yx\textrm{-}y plane:

Spherical coordinates 2
z=rcosθ,xy=rsinθ. \begin{align*} z &= r \cos \theta, \\ xy &= r \sin \theta. \end{align*}

And now we can solve fot the Cartesian coordinates xx and yy:

Spherical coordinates 3
x=xycosϕ=rcosϕsinθ,y=xysinϕ=rsinϕsinθ. \begin{align*} x &= xy \cos \phi = r \cos \phi \sin \theta, \\ y &= xy \sin \phi = r \sin \phi \sin \theta. \\ \end{align*}

Putting it all together, the Cartesian coordinates with the cartesian metric tensor gμνg_{\mu \nu} are equal to:

x=rsinθcosϕ,y=rsinθsinϕ,z=rcosθ,gμν=δμν=[100010001]. \begin{align*} x &= r \sin \theta \cos \phi, \\ y &= r \sin \theta \sin \phi, \\ z &= r \cos \theta, \\ g_{\mu \nu} &= \delta_{\mu \nu} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}. \end{align*}

The metric tensor g~μν\tilde{g}_{\mu \nu} for spherical coordinates is equal to:

g~μν=xαx~μxβx~νgαβ=xαx~μxβx~νδαβ=αxαx~μxαx~ν. \begin{align*} \tilde{g}_{\mu \nu} &= \frac{\partial x^{\alpha}}{\partial \tilde{x}^{\mu}} \frac{\partial x^{\beta}}{\partial \tilde{x}^{\nu}} g_{\alpha \beta} \\ &= \frac{\partial x^{\alpha}}{\partial \tilde{x}^{\mu}} \frac{\partial x^{\beta}}{\partial \tilde{x}^{\nu}} \delta_{\alpha \beta} \\ &= \sum_{\alpha} \frac{\partial x^{\alpha}}{\partial \tilde{x}^{\mu}} \frac{\partial x^{\alpha}}{\partial \tilde{x}^{\nu}}. \end{align*}

The partial derivatives in the transformation are equal to:

xr=sinθcosϕ,xθ=rcosθcosϕ,xϕ=rsinθsinϕ,yr=sinθsinϕ,yθ=rcosθsinϕ,yϕ=rsinθcosϕ,zr=cosθ,zθ=rsinθ,zϕ=0. \begin{align*} \frac{\partial x}{\partial r} &= \sin \theta \cos \phi, & \frac{\partial x}{\partial \theta} &= r \cos \theta \cos \phi, & \frac{\partial x}{\partial \phi} &= -r \sin \theta \sin \phi, \\ \frac{\partial y}{\partial r} &= \sin \theta \sin \phi, & \frac{\partial y}{\partial \theta} &= r \cos \theta \sin \phi, & \frac{\partial y}{\partial \phi} &= r \sin \theta \cos \phi, \\ \frac{\partial z}{\partial r} &= \cos \theta, & \frac{\partial z}{\partial \theta} &= -r \sin \theta, & \frac{\partial z}{\partial \phi} &= 0. \end{align*}

Transforming the metric tensor components:

g~rr=αxαrxαr=(sinθcosϕ)2+(sinθsinϕ)2+(cosθ)2=sin2θcos2ϕ+sin2θsin2ϕ+cos2θ=sin2θ+cos2θ=1,g~rθ=g~θr=αxαrxαθ=sinθcosϕ rcosθcosϕ+sinθsinϕ rcosθsinϕcosθ rsinθ=rsinθcosθ(cos2ϕ+sin2ϕ)rsinθcosθ=rsinθcosθrsinθcosθ=0,g~rϕ=g~ϕr=αxαrxαϕ=sinθcosϕ rsinθsinϕ+sinθsinϕ rsinθcosϕ+cosθ 0=sinθcosϕ rsinθsinϕ+sinθsinϕ rsinθcosϕ+cosθ 0=0,g~θθ=αxαθxαθ=(rcosθcosϕ)2+(rcosθsinϕ)2+(rsinθ)2=r2cos2θcos2ϕ+r2cos2θsin2ϕ+r2sin2θ=r2cos2θ(cos2ϕ+sin2ϕ)+r2sin2θ=r2cos2θ+r2sin2θ=r2g~θϕ=g~ϕθ=αxαθxαϕ=rcosθcosϕ rsinθsinϕ+rcosθsinϕ rsinθcosϕrsinθ 0=0,g~ϕϕ=αxαϕxαϕ=(rsinθsinϕ)2+(rsinθcosϕ)2+02=r2sin2θsin2ϕ+r2sin2θcos2ϕ=r2sin2θ(sin2ϕ+cos2ϕ)=r2sin2θ, \begin{align*} \tilde{g}_{r r} &= \sum_{\alpha} \frac{\partial x^{\alpha}}{\partial r} \frac{\partial x^{\alpha}}{\partial r} \\ &= (\sin \theta \cos \phi)^2 + (\sin \theta \sin \phi)^2 + (\cos \theta)^2 \\ &= \sin^2 \theta \cos^2 \phi + \sin^2 \theta \sin^2 \phi + \cos^2 \theta \\ &= \sin^2 \theta + \cos^2 \theta \\ &= 1, \\ \tilde{g}_{r \theta} = \tilde{g}_{\theta r} &= \sum_{\alpha} \frac{\partial x^{\alpha}}{\partial r} \frac{\partial x^{\alpha}}{\partial \theta} \\ &= \sin \theta \cos \phi\ r \cos \theta \cos \phi + \sin \theta \sin \phi\ r \cos \theta \sin \phi - \cos \theta\ r \sin \theta \\ &= r \sin \theta \cos \theta (\cos^2 \phi + \sin^2 \phi) - r \sin \theta \cos \theta \\ &= r \sin \theta \cos \theta - r \sin \theta \cos \theta \\ &= 0, \\ \tilde{g}_{r \phi} = \tilde{g}_{\phi r} &= \sum_{\alpha} \frac{\partial x^{\alpha}}{\partial r} \frac{\partial x^{\alpha}}{\partial \phi} \\ &= -\sin \theta \cos \phi\ r \sin \theta \sin \phi + \sin \theta \sin \phi\ r \sin \theta \cos \phi + \cos \theta\ 0 \\ &= -\sin \theta \cos \phi\ r \sin \theta \sin \phi + \sin \theta \sin \phi\ r \sin \theta \cos \phi + \cos \theta\ 0 \\ &= 0, \\ \tilde{g}_{\theta \theta} &= \sum_{\alpha} \frac{\partial x^{\alpha}}{\partial \theta} \frac{\partial x^{\alpha}}{\partial \theta} \\ &= (r \cos \theta \cos \phi)^2 + (r \cos \theta \sin \phi)^2 + (- r \sin \theta)^2 \\ &= r^2 \cos^2 \theta \cos^2 \phi + r^2 \cos^2 \theta \sin^2 \phi + r^2 \sin^2 \theta \\ &= r^2 \cos^2 \theta (\cos^2 \phi + \sin^2 \phi) + r^2 \sin^2 \theta \\ &= r^2 \cos^2 \theta + r^2 \sin^2 \theta \\ &= r^2 \\ \tilde{g}_{\theta \phi} = \tilde{g}_{\phi \theta} &= \sum_{\alpha} \frac{\partial x^{\alpha}}{\partial \theta} \frac{\partial x^{\alpha}}{\partial \phi} \\ &= -r \cos \theta \cos \phi\ r \sin \theta \sin \phi + r \cos \theta \sin \phi\ r \sin \theta \cos \phi - r \sin \theta\ 0 \\ &= 0, \\ \tilde{g}_{\phi \phi} &= \sum_{\alpha} \frac{\partial x^{\alpha}}{\partial \phi} \frac{\partial x^{\alpha}}{\partial \phi} \\ &= (- r \sin \theta \sin \phi)^2 + (r \sin \theta \cos \phi)^2 + 0^2 \\ &= r^2 \sin^2 \theta \sin^2 \phi + r^2 \sin^2 \theta \cos^2 \phi \\ &= r^2 \sin^2 \theta (\sin^2 \phi + \cos^2 \phi) \\ &= r^2 \sin^2 \theta, \end{align*}

or in matrix notation:

g~μν=[1000r2000r2sin2θ].\tilde{g}_{\mu \nu} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & r^2 & 0 \\ 0 & 0 & r^2 \sin^2 \theta \\ \end{bmatrix}.

In this section, I will refer to the spherical metric tensor as gμνg_{\mu \nu}:

gμν=[1000r2000r2sin2θ].g_{\mu \nu} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & r^2 & 0 \\ 0 & 0 & r^2 \sin^2 \theta \\ \end{bmatrix}.

By keeping rr constant, we get a parametric surface of sphere:

Sphere

To represent coordinates, we choose a 2D θ-ϕ\theta\textrm{-}\phi plane representing the θ\theta and ϕ\phi coordinates respectively:

Coordinate plane of sphere

where 0θπ0 \leq \theta \leq \pi and 0ϕ2π0 \leq \phi \leq 2\pi.

Consider a curve parametrized in the ϕ-θ\phi\textrm{-}\theta plane as follows:

θ(λ)=λ,ϕ(λ)=λ,0λπ. \begin{align*} \theta(\lambda) &= \lambda, \\ \phi(\lambda) &= \lambda, \\ 0 \leq \lambda &\leq \pi. \end{align*}

Rendering, on our plane, the curve looks like this:

Coordinate plane of sphere with curve

However, on the sphere, the curve looks like this:

Sphere with curve

We could naively calculate the length of the curve from the plane using Pythagorean theorem:

s=ϕ2+θ2=π2+π2=π2.s = \sqrt{\phi^2 + \theta^2} = \sqrt{\pi^2 + \pi^2} = \pi \sqrt{2}.

However, we always have to use the metric tensor:

s=0πdRdλdλ=0πgμνdRμdλdRνdλdλ=0πgμμ(dRμdλ)2dλ=0π(drdλ)2+r2(dθdλ)2+r2sin2θ(dϕdλ)2dλ=0πr2+r2sin2θdλ=r20π1+sin2λ dλ3.8202r2π2. \begin{align*} s &= \int_0^{\pi} \left|\frac{d \boldsymbol{R}}{d \lambda}\right| d\lambda \\ &= \int_0^{\pi} \sqrt{g_{\mu \nu} \frac{d R^{\mu}}{d \lambda} \frac{d R^{\nu}}{d \lambda}} d\lambda \\ &= \int_0^{\pi} \sqrt{g_{\mu \mu} \left(\frac{d R^{\mu}}{d \lambda}\right)^2} d\lambda \\ &= \int_0^{\pi} \sqrt{\left(\frac{d r}{d \lambda}\right)^2 + r^2 \left(\frac{d \theta}{d \lambda}\right)^2 + r^2 \sin^2 \theta \left(\frac{d \phi}{d \lambda}\right)^2} d\lambda \\ &= \int_0^{\pi} \sqrt{r^2 + r^2 \sin^2 \theta} d\lambda \\ &= r^2 \int_0^{\pi} \sqrt{1 + \sin^2 \lambda}\ d\lambda \\ &\approx 3.8202 r^2 \neq \pi \sqrt{2}. \end{align*}

This is the extrinsic metric tensor - to work with 2D surface, we need three dimensions. To calculate curve lengths on the surface as if we are living on it (similar to Earth), we need to define an intrinsic metric tensor gˉμν\bar{g}_{\mu \nu}.

To start, consider again a vector R\boldsymbol{R} and we calculate its tangent vector:

dRdλ=dRμdλRRμ=dRμdλeˉμ,\frac{d \boldsymbol{R}}{d\lambda} = \frac{d R^{\mu}}{d \lambda} \frac{\partial \boldsymbol{R}}{\partial R^{\mu}} = \frac{d R^{\mu}}{d \lambda} \boldsymbol{\bar{e}_{\mu}},

where eˉμ\boldsymbol{\bar{e}_{\mu}} are basis vectors in the tangent plane: eˉθ\boldsymbol{\bar{e}_{\theta}} and eˉϕ\boldsymbol{\bar{e}_{\phi}}. This notation is problematic, since R\boldsymbol{R} lies outside the plane and we want to define extrinsic relationships. So instead I will be using derivative operators:

ddλ=dxˉμdλxˉμ=dxˉμdλeˉμ,\frac{d}{d\lambda} = \frac{d \bar{x}^{\mu}}{d \lambda} \frac{\partial}{\partial \bar{x}^{\mu}} = \frac{d \bar{x}^{\mu}}{d \lambda} \boldsymbol{\bar{e}_{\mu}},

The squared length of the tangent vector is given by:

ddλ2=(dxˉμdλeˉμ)(dxˉνdλeˉν)=dxˉμdλdxˉνdλgˉμν.\left|\frac{d}{d\lambda}\right|^2 = \left(\frac{d \bar{x}^{\mu}}{d \lambda} \boldsymbol{\bar{e}_{\mu}}\right) \cdot \left(\frac{d \bar{x}^{\nu}}{d \lambda} \boldsymbol{\bar{e}_{\nu}}\right) = \frac{d \bar{x}^{\mu}}{d \lambda} \frac{d \bar{x}^{\nu}}{d \lambda} \bar{g}_{\mu \nu}.

To obtain the metric tensor components gˉμν=xˉμxˉν\bar{g}_{\mu \nu} = \frac{\partial}{\partial \bar{x}^{\mu}} \cdot \frac{\partial}{\partial \bar{x}^{\nu}}, we can write the intrinsic bases as linear combination of the extrinsic bases:

eˉμ=xˉμ=xνxˉμxν=xνxˉμeν,\boldsymbol{\bar{e}_{\mu}} = \frac{\partial}{\partial \bar{x}^{\mu}} = \frac{\partial x^{\nu}}{\partial \bar{x}^{\mu}} \frac{\partial}{\partial x^{\nu}} = \frac{\partial x^{\nu}}{\partial \bar{x}^{\mu}} \boldsymbol{e_{\nu}},

where xμx^{\mu} are the extrinsic coordinates (3D cartesian coordinates) and xˉμ\bar{x}^{\mu} are the intrinsic coordinates (θ\theta and ϕ\phi). We already calculated these derivatives (we will not be using the partial derivatives with respect to rr since it is not an intrinsic coordinate):

xθ=rcosθcosϕ,xϕ=rsinθsinϕ,yθ=rcosθsinϕ,yϕ=rsinθcosϕ,zθ=rsinθ,zϕ=0. \begin{align*} \frac{\partial x}{\partial \theta} &= r \cos \theta \cos \phi, & \frac{\partial x}{\partial \phi} &= -r \sin \theta \sin \phi, \\ \frac{\partial y}{\partial \theta} &= r \cos \theta \sin \phi, & \frac{\partial y}{\partial \phi} &= r \sin \theta \cos \phi, \\ \frac{\partial z}{\partial \theta} &= -r \sin \theta, & \frac{\partial z}{\partial \phi} &= 0. \end{align*}

The intrinsic basis vectors are equal to:

eˉθ=xνxˉθeν=rcosθcosϕex+rcosθsinϕeyrsinθez,eˉϕ=xνxˉϕeν=rsinθsinϕex+rsinθcosϕey. \begin{align*} \boldsymbol{\bar{e}_{\theta}} &= \frac{\partial x^{\nu}}{\partial \bar{x}^{\theta}} \boldsymbol{e_{\nu}} \\ &= r \cos \theta \cos \phi \boldsymbol{e_x} + r \cos \theta \sin \phi \boldsymbol{e_y} - r \sin \theta \boldsymbol{e_z}, \\ \boldsymbol{\bar{e}_{\phi}} &= \frac{\partial x^{\nu}}{\partial \bar{x}^{\phi}} \boldsymbol{e_{\nu}} \\ &= -r \sin \theta \sin \phi \boldsymbol{e_x} + r \sin \theta \cos \phi \boldsymbol{e_y}. \end{align*}

Now we can calculate the intrinsic metric tensor components (since they are in Cartesian bases, the dot products are zero for eμeν\boldsymbol{e_{\mu}} \cdot \boldsymbol{e_{\nu}} when μν\mu \neq \nu):

gˉθθ=eˉθeˉθ=(rcosθcosϕex+rcosθsinϕeyrsinθez)(rcosθcosϕex+rcosθsinϕeyrsinθez)=r2cos2θcos2ϕ+r2cos2θsin2ϕr2sin2θ=r2cos2θ(cos2ϕ+sin2ϕ)r2sin2θ=r2cos2θr2sin2θ=r2,gˉθϕ=gˉϕθ=eˉθeˉϕ=(rcosθcosϕex+rcosθsinϕeyrsinθez)(rsinθsinϕex+rsinθcosϕey+0ez)=r2cosθsinθcosϕsinϕ+r2cosθsinθsinϕcosϕ=0,gˉϕϕ=eˉϕeˉϕ=(rsinθsinϕex+rsinθcosϕey)(rsinθsinϕex+rsinθcosϕey)=r2sin2θ(sin2ϕ+cos2ϕ)=r2sin2θ, \begin{align*} \bar{g}_{\theta \theta} &= \boldsymbol{\bar{e}_{\theta}} \cdot \boldsymbol{\bar{e}_{\theta}} \\ &= (r \cos \theta \cos \phi \boldsymbol{e_x} + r \cos \theta \sin \phi \boldsymbol{e_y} - r \sin \theta \boldsymbol{e_z}) \cdot (r \cos \theta \cos \phi \boldsymbol{e_x} + r \cos \theta \sin \phi \boldsymbol{e_y} - r \sin \theta \boldsymbol{e_z}) \\ &= r^2 \cos^2 \theta \cos^2 \phi + r^2 \cos^2 \theta \sin^2 \phi - r^2 \sin^2 \theta \\ &= r^2 \cos^2 \theta (\cos^2 \phi + \sin^2 \phi) - r^2 \sin^2 \theta \\ &= r^2 \cos^2 \theta - r^2 \sin^2 \theta \\ &= r^2, \\ \bar{g}_{\theta \phi} = \bar{g}_{\phi \theta} &= \boldsymbol{\bar{e}_{\theta}} \cdot \boldsymbol{\bar{e}_{\phi}} \\ &= (r \cos \theta \cos \phi \boldsymbol{e_x} + r \cos \theta \sin \phi \boldsymbol{e_y} - r \sin \theta \boldsymbol{e_z}) \cdot (-r \sin \theta \sin \phi \boldsymbol{e_x} + r \sin \theta \cos \phi \boldsymbol{e_y} + 0 \boldsymbol{e_z}) \\ &= -r^2 \cos \theta \sin \theta \cos \phi \sin \phi + r^2 \cos \theta \sin \theta \sin \phi \cos \phi \\ &= 0, \\ \bar{g}_{\phi \phi} &= \boldsymbol{\bar{e}_{\phi}} \cdot \boldsymbol{\bar{e}_{\phi}} \\ &= (-r \sin \theta \sin \phi \boldsymbol{e_x} + r \sin \theta \cos \phi \boldsymbol{e_y}) \cdot (-r \sin \theta \sin \phi \boldsymbol{e_x} + r \sin \theta \cos \phi \boldsymbol{e_y}) \\ &= r^2 \sin^2 \theta (\sin^2 \phi + \cos^2 \phi) \\ &= r^2 \sin^2 \theta, \end{align*}

or represented as matrix:

gˉμν=[r200r2sin2θ].\bar{g}_{\mu \nu} = \begin{bmatrix} r^2 & 0 \\ 0 & r^2 \sin^2 \theta \end{bmatrix}.

If we now use the previous curve defined as follows:

θ(λ)=λ,ϕ(λ)=λ,0λπ, \begin{align*} \theta(\lambda) &= \lambda, \\ \phi(\lambda) &= \lambda, \\ 0 \leq \lambda &\leq \pi, \end{align*}

and calculate the length of the curve, we arrive at the same answer:

s=0πddλdλ=0πgˉμνdxˉμdλdxˉνdλdλ=0πgˉμμ(dxˉμdλ)2dλ=0πr2(dθdλ)2+r2sin2θ(dϕdλ)2dλ=0πr2+r2sin2θdλ=r20π1+sin2λ dλ3.8202r2. \begin{align*} s &= \int_0^{\pi} \left|\frac{d}{d \lambda}\right| d\lambda \\ &= \int_0^{\pi} \sqrt{\bar{g}_{\mu \nu} \frac{d \bar{x}^{\mu}}{d \lambda} \frac{d \bar{x}^{\nu}}{d \lambda}} d\lambda \\ &= \int_0^{\pi} \sqrt{\bar{g}_{\mu \mu} \left(\frac{d \bar{x}^{\mu}}{d \lambda}\right)^2} d\lambda \\ &= \int_0^{\pi} \sqrt{r^2 \left(\frac{d \theta}{d \lambda}\right)^2 + r^2 \sin^2 \theta \left(\frac{d \phi}{d \lambda}\right)^2} d\lambda \\ &= \int_0^{\pi} \sqrt{r^2 + r^2 \sin^2 \theta} d\lambda \\ &= r^2 \int_0^{\pi} \sqrt{1 + \sin^2 \lambda}\ d\lambda \\ &\approx 3.8202 r^2. \end{align*}

To calculate the intrinsic metric tensor, we have to either: