Skip to main content
Matthew Litwin

The Metric Tensor

At every point of our coordinate space, we can use the tangent space to define the distance in any (infinitesimal) direction. In general the square of the distance will be a quadratic form in the (infinitesimal) coordinate displacements along the basis vectors of the tangent space.

Quadratic Form

We can represent the quadratic form as a symmetric matrix

For a general tangent space with basis {ei}\{e_i\}, and (infinitesmal) displacements along those basis vectors {dxi}\{dx^i\}, then the square of the distance is:

ds2=ijgijdxidxjds^2=\sum_{ij}g_{ij}{dx}^i {dx}^j

where g={gij}g=\{g_{ij}\} is our matrix and gij=eiejg_{ij}=e_i\cdot e_j

and if x=xieix=x^i e_i and y=yieiy=y^i e_i, then we can define the dot product

xy=ijgijxiyjx \cdot y = \sum_{ij}g_{i j} x^i y^j

which also lets us define the angle θ\theta between xx and yy since we can take

xy=xycosθx\cdot y=|x||y|\cos\theta

as a definition.

Law of Cosines

We can figure these out in our examples using the Law of cosines.

If we have our basis vectors ABAB, ACAC with angle alphaalpha between them, to find the displacement of them together you put them head to tail (doesn't matter which is first), and the side ADAD is the net displacement.

Consider the following diagram:

If BAC=α\angle BAC=\alpha, then ACD=πα\angle ACD=\pi-\alpha.

And since cos(πα)=cosα\cos(\pi-\alpha)=-\cos\alpha the law of cosines tells us

s2=a2+b2+2abcosαs^2=a^2+b^2+2ab\cos\alpha

Tangent Space for non-skew Sphere

We have calculated:

which give us

g=(100sin2θ)g=\begin{pmatrix} 1 & 0 \\ 0 & \sin^2\theta \end{pmatrix}

Tangent Space for skew Sphere

We have calculated:

which give us

g=(1γθsinϕsinθγθsinϕsinθsin2θ) \large g=\def\arraystretch{1.5} \def\A{\frac{\gamma}{\theta} \sin\phi \sin\theta} \begin{pmatrix} 1 & \A \\ \A & \sin^2\theta \end{pmatrix}

Next Up

Next up will be "The Dual Basis"