# Geodesics: Paths of Shortest Distance

Everyone knows that the path of shortest distance in a paper (or in general a flat plane) is a straight line. What if the paper was curved? What if you want to find the shortest distance from one point on Earth to another? Finding the shortest distance in curved surfaces is not as simple as one might think. In this article, we will look into how we can find geodesics, which are the paths of shortest distance, on curved surfaces.

## Geodesics on a Sphere

One way to develop an intuition of how the shortest paths may look like is to imagine the geometry of the object. In this case, the sphere is a geometry we are all familiar with. A key point are that travelling laterally, by the same angle is shorter when we are closer to the poles. This result would prove important in understanding why the geodesic path looks that way. Furthermore, we should always bear in mind that we are travelling along the surface of the object and not through the object or in a parabolic manner over the object. Imagine this as walking along the surface.

Now we can get into how to develop the framework for this analysis. We know from Pythagoras theorem that the sum of squares of the distances in orthogonal coordinates give the square of the overall ‘hypotenuse’ distance from one point to another. This can be represented as

Looking at this from the infinitesimal lens, we obtain

So, using this formula for the infinitesimal distance, we can deduce that the formula for arclength is merely

We know that representing a sphere in cartesian coordinates makes the calculations very cumbersome, so we switch to spherical coordinates where the infinitesimal distance is given as

One can derive this is two ways: represent x, y and z in terms of r, theta and phi, and find the derivatives and use chain rule to convert. The other, simpler way is to merely observe the relationship between the spherical coordinates and cartesian coordinates. The terms then become obvious.

Also, in our case, we assume there is no change in the radius (we indeed live in an awfully flat sphere). So, the differential simplifies and the arclength becomes

The trick to approaching this integral is to make our solution of the form

Now, the integral can be represented as

## Solving the Integral

If you have taken some calculus courses in your university, you would remember that formula for arclength and would have solved it for some parameterized curve given by your teacher. However, this problem of finding the optimal curve that minimizes this integral is much harder. It involves the use of calculus of variations. Calculus of variations is essentially looking at optimization (extremum) problems and finding the optimal function that extremizes a given functional.

An important concept is that of a functional. Think of a functional as a function with parameters that you vary. Varying this parameters gives you different functions (although of the same form) and our goal is to find that one (or few) parameters that gives the extreme value of the function.

Without getting into too much of the details, the extremum of the functional can be found by solving the Euler-Lagrange equations. The Euler-Lagrange equations are a set of equations that resulted from applying the Fundamental Lemma of Calculus of Variations to integrals such as the one we have. These are the Euler Lagrange equations

Where L is called the Lagrangian, and it is essentially the integrand of the integral that needs to be extremized. So now we can apply these equations to our problem (letting our sphere be an unit sphere, without loss of generality)

Differentiating, we get

This can be rearranged into the following integral

This integral is quite trivial and gives us the following solution

Where a and phi are constants that will be determined by the initial and final points. Although this solution may look complicated, it actually gives the formula of a great circle on a sphere. It is a well known fact that great circles are the shortest path between two point on a sphere.

## Generalization

The example we saw was a very simple derivation of a geodesic path on a sphere. For more complicated geometries, it is more useful to turn to differential geometry. In differential geometry, we denote the relationship between the distance and the coordinate system by the metric tensor

Note that Einstein summation convention is applied, so the terms are summed over repeated indices.

In this general curved space, we can represent the arclength as

Where the curve is parameterized with t. Turns out that instead of minimizing this functional, we can minimize the ‘energy’ functional, defined by

Now, the equivalent of the Lagrange equations for problems in differential geometry is the geodesic equations:

Where L is known as the Christoffel Symbols. They essentially contain information about how the basis of the coordinates change with respect to other coordinates at different points. So, in Euclidean space, we can show that Christoffel symbols are equivalent to

However, in curved space, their definitions are more complicated, and they come out to be

## Conclusion

Solving the geodesic equation is no mean feat, and it is very tedious even for the simplest of geometries, due to the number of terms and permutations over indices. However, it is sometimes nice to see how concepts can be generalized to be able to consider several other cases. Do look forward to my post about solving the geodesic equations.