An Introduction to Differential Geometry
What is a metric tensor, anyway?
Maria Nicolae,
I plan to publish a few posts soon that substantially involve differential geometry (including one that I've almost finished writing), so I figured I might as well make a separate post purely dedicated to this subject.
At its core, differential geometry is the study of manifolds, which are defined as -dimensional metric spaces that locally resemble flat (Euclidean) space. Let's break this down:
- -dimensional means that every point in the space can be identified with an -tuple of numbers , the coordinates, which vary continuously while moving around the space,
- metric space means that there is a distance between any two points in this space, and
- locally Euclidean means that this distance relation (metric) resembles that of Euclidean space for points that are sufficiently close together.
In this post, I'll start by describing Euclidean space, in the usual Cartesian coordinates, in what we will see is the language of differential geometry. Then, by considering what happens when one performs a coordinate transformation, I'll show how the idea of a metric tensor emerges, and that this turns out to be applicable to curved manifolds too, because of their locally Euclidean nature. After a tour of various concepts in differential geometry (topology, constant-curvature manifolds, and geodesics), I'll finish by giving an overview of how differential geometry applies to the curved spacetimes of Einsteinian relativity.
Euclidean Space in Cartesian Coordinates
To figure out how locally-Euclidean spaces work, let's start with plain Euclidean space. In the two-dimensional Euclidean plane with Cartesian coordinates , the distance along a straight line path between points and is found using Pythagoras' theorem
What about a curved path ? We can find the length of such a path by integrating what is essentially a bunch of little Pythagoras' theorems:
where
More simply, we can write this in differential form with the line element :
For a general -dimensional Euclidean space, we can express this as a summation
Coordinate Transformations and the Metric Tensor
Now, let's find out what happens to the line element when we perform a coordinate transformation. I'll first derive this in the abstract, for a transformation from Cartesian coordinates to some other general coordinates , and then give a worked example of the specific case of transforming from Cartesian coordinates to polar coordinates in the Euclidean plane.
Using the multivariate chain rule
the line element in Cartesian coordinates from Equation 5 becomes
This has the form
where the metric tensor is
The metric tensor can be represented in matrix form as
where is the Jacobian matrix of the coordinate transformation, whose elements are
We can see from this that the metric, as a matrix, is symmetric and positive-definite, and that it is a function of the coordinates. In terms of this matrix form, the line element is
For Cartesian coordinates, the Jacobian, and therefore the metric, is the identity matrix
Now, let's work through the example of transforming from Cartesian coordinates to polar coordinates. The coordinate transformation for this is
and therefore
Substituting these into Equation 4, we get
and so the metric tensor of the Euclidean plane in polar coordinates is
Curved Spaces
Equation 8, which I derived earlier for arbitrary coordinates in Euclidean space, turns out to be fully general, applicable also to curved manifolds. After all, what defines manifolds is that they are locally Euclidean, so for any given point inside the manifold, you can choose normal coordinates for which the metric at that point is the identity matrix. Then, a coordinate transformation back to whatever coordinates you started with creates a general metric . For example, the line element for the surface of a sphere with radius , in terms of latitude and longitude , is
An example of normal coordinates centred on a point on the sphere is
Here, represents movement to the east and represents movement to the north. The line element is then
for which at , though it differs at other locations. Essentially, this is like drawing a flat map of the sphere which is accurate in a small region near , but which gets more distorted as you get further away from that point.
Geometry vs Topology
Given what I've gone over up until now, you might have the impression that the metric tensor completely defines a given manifold. That's almost true, but not quite. The metric tensor completely defines the geometry of a manifold, i.e. how it curves at any given point, but a manifold also has a topology, which is, loosely speaking, a notion of which points are neighbours. To see what I mean, let's consider the surface of an infinitely long cylinder. If we define a coordinate system where the distance around the cylinder is , and the distance along the cylinder's length is , the metric is
This is the same metric as that of the Euclidean plane! Thus, we say that the surface of a cylinder has Euclidean geometry. The difference between the cylinder and the Euclidean plane is that, on the cylinder, the coordinate repeats every , where is the radius of the cylinder, whereas on the Euclidean plane it never repeats. and are very close together on the cylinder, but not on the Euclidean plane. This is the difference in topology between the two manifolds, how the points are connected to each other.
If you've ever played one of the Portal video games, what you were doing, as you were shooting the portal gun, is changing the topology of the game environment, while its geometry stayed Euclidean. Separately, there's a tendency in the gaming world to use the term "non-Euclidean"1 to describe manifolds with Euclidean geometry but weird topologies, but this is erroneous.
Constant-Curvature Manifolds
A particularly important set of manifolds is those that have uniform curvature throughout, and which have the same topology as typical Euclidean space (extending infinitely without repeating). These are characterised by one parameter, the value of that uniform curvature, and therefore fall into three types:
- Euclidean space, which has zero curvature,
- Spherical space, which has positive curvature, and
- Hyperbolic (or Lobachevskian) space, which has negative curvature.
Letting the uniform curvature be , all three are represented in the two-dimensional case in "azimuthal equidistant coordinates" as
For , this is the metric for a sphere of radius , where is the distance from the north pole and is the longitude. In the limit of , this becomes the metric for the Euclidean plane in polar coordinates
Finally, for , we're taking the sine of an imaginary number, so this becomes
From this, we see that the relationship between a circle's radius and its circumference is linear () in Eulidean geometry, sinusoidal () in spherical geometry, and exponential () in hyperbolic geometry. In a sense, hyperbolic geometry has "more space" than your Euclidean intuition might expect, while the surface of a sphere has less space, ultimately being finite.
Intermission: Notation and The Einstein Summation Convention
Many of the equations I've shown you so far have summations, particularly multiple nested summations. Differential geometry tends to involve a lot of summations; indeed, there are many more to come. For the sake of conciseness, then, it is common to use the Einstein summation convention, in which Equation 8 is written more concisely as
Two changes are apparent here: first, some of the indices are superscripts (not to be confused with exponents) rather than subscripts, and second, the summation symbols have been removed.
In the Einstein summation convention, any indices which occur in pairs of upper and lower on one side of an equation but not the other (dummy indices) are summed over. Whether an index is upper or lower indicates, respectively, whether it is contravariant or covariant. A contravariant quantity is one which scales inversely to the metric; if the metric gets bigger, the coordinate differentials must get smaller to represent the same size of step. A covariant quantity is one which scales proportionally to the metric; the metric itself is, of course, such a quantity. Some quantities have mixed upper and lower indices, meaning that their transformation rules are more complicated. Finally, taking a reciprocal inverts the covariance/contravariance of a quantity, meaning that an upper index in a denominator is treated as a lower index, and vice versa.
Lowering and Raising Indices
The line element can alternatively be expressed as
where the index on has been lowered by doing
In general, we can use the metric to lower an index, and it has the interpretation of creating a "dual vector" which multiplies with vectors to compute "square lengths". Formally, is the adjoint of with respect to the inner product generated by the metric.
Reversing Equation 27, we also see that we can raise an index by doing
where
are the components of the matrix inverse of .
The Geodesic Equation
We know that we can use the metric to compute the length of a path as
that's the exact context in which I first presented the notion of the metric, after all. Similarly, we can compute areas by integrating lengths and compute volumes by integrating areas. Another thing we might want to do in a manifold, however, is to find the shortest path between two points. Such paths are known as geodesics. Here, I'll derive the geodesic equation, a differential equation whose solutions are geodesics.
Finding shortest paths is, of course, an optimisation problem. The typical approach to optimisation problems is to find critical points. For a single-variable problem, this is a point at which the derivative is zero, and for multivariate problems, this is a point at which all directional derivatives are zero. In our case, we similarly look for a function for which all of its "directional derivatives" are zero, but here the directions are themselves functions. Namely, for a path to be optimal, a directional perturbation of that path
must have a vanishing effect on its length:
where is the length of the perturbed path and is its derivative. Note also that this perturbed path must have the same endpoints as the original path, and so
Denoting
so that
the expression for the geodesic path becomes
Applying integration by parts to the right term, we obtain
because of the boundary conditions in Equation 33, the middle term vanishes, leaving
Using the fact that this equation must be true for any , we can extract the expression in the brackets to finally obtain a differential equation for :
For a general , this is known as the Euler-Lagrange equation, and itself is known as the Lagrangian; the geodesic equation is just one of many functional optimisation problems of this form.
Setting
such that , Equation 39 becomes
Because is a function of , we can choose a parameter of the path that keeps constant. This is called an affine parameter, and it means that the length varies linearly with . Using such a parameter, we can factor out to obtain the effective Euler-Lagrange equation
Now let's evaluate this. First,
Next,
Differentiating this,
Substituting Equations 43 and 45 into Equation 42,
Multiplying this by the matrix inverse of to extract the second derivatives , we finally obtain the geodesic equation
where the Christoffel symbols of the metric are
Spacetime as a Manifold
One of the main applications of differential geometry in modern times is in describing the geometry of spacetime in Einsteinian relativity. Spacetime is a manifold, but not quite like what we've seen so far. Recall that a manifold is a metric space that locally resembles flat (Euclidean) space; curved spacetime does locally resemble flat spacetime, but flat spacetime is not Euclidean. So to understand curved spacetime, let's first understand flat spacetime.
Flat Spacetime
Three-dimensional Euclidean space has Cartesian coordinates
for which the line element is the Pythagorean sum
Four-dimensional flat spacetime, on the other hand, has Minkowski coordinates
where we've added time2 as a "zeroth" coordinate. The line element of spacetime, however, is not simply the Pythagorean sum of the coordinate differentials, as it would be if spacetime were Euclidean. Rather, we need to consider three cases. First, paths for which , which are called spacelike paths because they include purely spatial paths , have a distance line element
Second, paths for which , which are called timelike paths because they include purely temporal paths , have a line element for proper time
These are slower-than-light paths that a massive object can traverse, and the proper time is the time measured by that object, which accounts for time dilation. Finally, paths for which are called lightlike paths, because they are the paths that light can take. For a lightlike path, ; a light ray experiences no time and no distance.
Thus, the metric for flat spacetime is not the identity matrix, as it is for Euclidean space, but instead it is the Minkowski metric
in terms of which
where we are now using Greek letters for indices; it is a convention in Einsteinian relativity that Latin-alphabet indices span the spacelike coordinates , while Greek-alphabet indices span all coordinates . Just as this metric is called the Minkowski metric, this geometry of flat spacetime is called Minkowski geometry, in contrast with Euclidean geometry.
Curved Spacetime
Just as the manifolds of space that we've seen so far (so-called Riemannian manifolds) are locally Euclidean, manifolds of spacetime are locally Minkowski (Lorentzian manifolds, a special case of pseudo-Riemannian manifolds). Thus, their line elements look like
where the metric has the form
for some matrix . As before, this has the interpretation of being the Jacobian matrix of the transformation from normal coordinates to our coordinate system of choice :
This means that, while is symmetric, it is not positive-definite.
The motion of a massive (slower-than-light) body through spacetime, as a path parameterised by the proper time , is governed by the geodesic equation
where is the four-dimensional acceleration applied to the body, whose magnitude
is the magnitude of the acceleration that the body experiences. The Christoffel symbols have the same form as before:
This variant of the geodesic equation not only lets us find spacetime geodesics, which are the freefall () paths of massive bodies, but also tells us how massive bodies move under acceleration, and lets us determine the acceleration needed to follow some given path. Because the path parameter here is simply the proper time, the four-dimensional velocity has a fixed magnitude:
An interpretation of this is that bodies are always moving at the speed of light through spacetime; a body that's "standing still" is moving purely through time at this speed, whereas a body that's moving through space is moving at the speed of light in a direction that has both a spatial and temporal component. Changing your velocity, then, is like "rotating" your four-dimensional velocity vector.
It's worth noting that these spacetime geodesics are the paths of maximum proper time, in contrast to geodesics of Riemannian manifolds, which minimise distance. Indeed, the proper time of a spacetime path is not bounded from below, since lightlike paths have zero proper time, so the only extremal paths are maximisers.
The motion of light rays through spacetime is also determined by the geodesic equation
Because lightlike paths have no proper time, we use a different parameter for them, which is an affine parameter in the most abstract sense of being a parameter for which the geodesic equation is true.