# Riemannian surfaces with an explicit distance function?

I'm looking for explicit examples of Riemannian surfaces (two-dimensional Riemannian manifolds $(M,g)$) for which the distance function d(x,y) can be given explicitly in terms of local coordinates of x,y, assuming that x and y are sufficiently close. By "explicit", I mean things like a closed form description in terms of special functions, by implicitly solving a transcendental equation or (at worst) by solving an ODE, as opposed to having to solve a variational problem or a PDE such as the eikonal equation, or an inverse problem for an ODE, or to sum an asymptotic series.

The only examples of this that I know of are the constant curvature surfaces, which can be locally modeled either by the Euclidean plane ${\bf R}^2$, the sphere ${\bf S}^2$, or the hyperbolic plane ${\bf H}^2$, for which we have classical formulae for the distance function.

But I don't know of any other examples. For instance, the distance functions on the surface of the solid ellipsoid or solid torus in ${\bf R}^3$ look quite unpleasant already to write down explicitly. Presumably Zoll surfaces would be the next thing to try, but I don't know of any tractable explicit examples of Zoll surfaces that are not already constant curvature.

-
What about trying the "inverse" problem: first specify the geodesics, then try to find Riemannian metrics with these geodesics. For example, if you start with the unit disc with straight lines as geodesics, it has constant curvature metrics with positive zero or negative curvature. Does it have any others? – Richard Borcherds Sep 9 '10 at 16:06
Richard: I believe this is a version of Hilbert's fourth problem, and such metrics are called projective. I don't know the current status of this problem, though. – Terry Tao Sep 9 '10 at 21:59
My idea seems to be a dud: apparently Beltrami showed in 1866 that a Riemannian metric whose geodesics are ordinary lines has constant curvature. – Richard Borcherds Sep 10 '10 at 0:12
Actually, Richard, you were on the right track. Having the geodesics be straight lines appeals because many symmetries preserve the straight lines, and one feels that if the geodesics have a lot of symmetry then maybe there will be extra first integrals of the geodesic equations that will give the distance function explicitly in terms of coordinates. You just had the bad luck to look at the most symmetric case, which, as Beltrami showed, only gives constant curvature metrics. There are less symmetric examples (see my Answer below) for which this idea does work. – Robert Bryant Apr 15 '11 at 17:20

I'll briefly spell out what others have pointed to concerning geodesics on surfaces of revolution (or more generally, surfaces with a 1-parameter group of symmetries), because it's nice and not as widely understood as it should be.

Geodesics on surfaces of revolution conserve angular momentum about the central axis, so the geodesic flow splits into 2-dimensional surfaces having constant energy (~length) and angular momentum (The more general principle is that the inner product of the tangent to a geodesic with any infinitesimal isometry of a Riemannian manifold is constant). The surfaces are generically toruses. The shadow of these toruses on the surface of revolution is an annulus, a component of a set of $r \ge r_0$, where on each point with $r > r_0$ there are two vectors having the given angular momentum, but they merge at the boundary, both becoming tangent to the boundary of the annulus. If you sketch the picture, you will see the torus. The geodesics correspond to the physical phenomenon of the pattern of string or thread mechnically but passively wound around a cylinder. As string builds up in the middle, geodesics start to oscillate back and forth in a sinusoidal pattern, further amplifying the bulge in the middle.

To find the geodesic from point x to point y, you need to know which angular momentum will take you from x to y. For any two meridian circles and any choice of angular momentum, the geodesics of given angular momentum map one circle to the other by a rotation. Both the angle of rotation of the map and the length of the particular family of geodesics traversing the annulus is given by an integral over an interval cutting across the annulus, since the the slope of the vector field at all intervening points is known. I have an aversion to actual symbolic computation so I won't give you example formulas, but I believe this should meet your criterion for explicitness.

But to take a step back: this question, asking for an explicit formula, has an unstated (and probably unintended) connotation that is worth examining: this use of language implicitly suggests that non-symbolic forms are less worthy. I don't know the background motivation for the question, but an alternative question for some purposes would be to give example of surfaces where you can exhibit the distance function. Communication of mathematics is biassed toward symbolic forms. However, for many people and many purposes, some kind of graphical representation of the distance function, and/or diagrams or explanations of why it is what it is as well as a striaghtforward method for computing it, would often be better than a symbolic answer.

The geodesic flow of course is an ordinary differential equation. It is a vector field on the 3-manifold of unit-length tangent vectors to the surface, defined by very easy equations: the vectors are tangent to the surface, and their derivative (= the 2nd derivative of a geodesic arc) is normal to the surface. The solutions may not always have a nice symbolic form, but they always have a nice and easy-to-compute geometric form. Finding the distance involves the implicit function theorem, but this is easy and intuitive. One could, for instance, easily draw a parametric surface that is the graph of distance as a function of position directly from solutions to the ODE (which no doubt sometimes even have reasonable symbolic representations). Both the ODE for the geodesic flow and the inverse function to give distance as a function of position are easy to compute numerically, and easy to understand qualitatively.

-
Thanks Bill! These representations might be good enough for what I (or more precisely, my student) needs. We've encountered generalised ellipses (the loci of points whose combined distance to two foci is constant), and want to understand how often two such ellipses can intersect each other. In the Euclidean case, Bezout's theorem says the answer is 4, but the situation is murkier in general. The more "algebraic" the description we have of the metric, the more likely we can use some sort of Bezout-type elimination theory here. We'll definitely look into surfaces of revolution now... – Terry Tao Sep 9 '10 at 21:47
Of interest here, but perhaps in an orthogonal direction to the interests of your student is the fact that for the Kepler problem on the sphere or the hyperbolic plane the solutions are generalized ellipses (as you've defined them), and the fact that for the Kepler problem in the plane the two ellipses, sharing a common focus (the Sun'') intersect in at most two points. – Richard Montgomery Sep 9 '10 at 22:20
In a bumpy kind of metric (think of the earth's surface where there are lots of hills), two circles can and do meet in arbitrarily many points, so generalized ellipses also do. Are you looking for non constant-curvature metrics where there is a small upper bound? One possibly relevant point: in homogeneous spaces of higher dimension, the intersection of generalized ellipsoids (defined with the obvious generalization) can have quite complicated intersections. The geometry of the 3-dimensional Heisenberg group is complicated in this way, and what we call Solvgeometry is even more so. – Bill Thurston Sep 10 '10 at 1:02
Yes, we've convinced ourselves that the intersection of generalised ellipses can be quite nasty for general metrics even if one has bounds on all the derivatives of the metric (indeed, even real analytic metrics could conceivably have enough "bumps" to cause trouble), so were looking for interesting examples of geometries (other than the constant curvature ones, which we understand pretty well) in which the situation could be simpler. It's a bit disheartening to hear that homogeneous spaces are bad though; after surfaces of revolution, we were going to try left-invariant metrics next... – Terry Tao Sep 10 '10 at 16:58
It's a bit disheartening to hear that homogeneous spaces are bad though; after surfaces of revolution, we were going to try left-invariant metrics next.. '' I would not make the value judgement "bad", it's just that it's complicated. The patterns can actually be quite interesting. For instance, geodesics in nilgeometry can be interpreted as asking for C^2 curves in the plane, with metric a combination of arc length and curvature and sideways slip --- interpretable for driving, or ice skating etc, where you're asking how to efficiently circle around and arrive at speed in a certain direction. – Bill Thurston Sep 11 '10 at 19:24

NB: For some time, I have been meaning to revise this answer to make it more complete (and, to be frank, more accurate), but I never found the time to do it. The main point is that my original answer did not take into account the difference between the cut locus and the conjugate locus, and, of course, this affects the formula for the distance between points.

I'm aware of a few metrics with non-constant curvature for which one can write the distance function explicitly in terms of the coordinates. The simplest such metric I know is the (incomplete) metric $ds^2 = y\ (dx^2+dy^2)$ on the upper half plane $y>0$. The Gauss curvature of this metric is $K = 1/(2y^3)>0$, so it's not constant.

Every geodesic of this metric in the upper half plane can be parametrized in the form $$x = a + b\ t\qquad\qquad y = b^2 + \frac{t^2}{4}$$ for some constants $a$ and $b$, and, for such a geodesic, the arclength function along the curve is $$s = c + b^2\ t + \frac{t^3}{12}\ .$$ for some constant $c$.

Using these formulae, one finds that two points $(x_1,y_1)$ and $(x_2,y_2)$ are joinable by a geodesic segment if and only if $4y_1y_2 \ge (x_1{-}x_2)^2$. In the case of strict inequality, there are two geodesic segments joining the two points, and the length of the shorter segment is $$L_1\bigl((x_1,y_1),(x_2,y_2)\bigr) = {1\over3}\sqrt{3(x_1{-}x_2)^2(y_1{+}y_2)+4(y_1^3{+}y_2^3) - (4y_1y_2-(x_1{-}x_2)^2)^{3/2}}\ .$$ Note that, in a sense, this is better than the constant curvature case. Here, the distance function is algebraic in suitable coordinates, whereas, in the constant nonzero curvature cases, the distance function is not.

However, the function $L_1$ does not necessarily give the actual distance between the two points (i.e., the infinimum of the lengths of curves joining the two points), and it's not only because not every pair of points can be joined by a geodesic. To see this, one should complete the upper half plane by adding a point that represents the 'boundary' $y=0$. The Riemannian metric does not extend smoothly across this 'point', of course (after all, the Gauss curvature blows up at you approach this point), but it does extend as a metric space. The vertical lines, which are geodesics, can then be used to join $(x_1,y_1)$ to $(x_2,y_2)$ by going through the singular point, and the total length of this geodesic is $$L_2\bigl((x_1,y_1),(x_2,y_2)\bigr) = \frac{2}{3}\bigl({y_1}^{3/2}+{y_2}^{3/2}\bigr).$$ (Also, note that $L_2$ is defined for any pair of points in the upper half-plane.) If one doesn't like this path that goes through the singular point, one can easily perturb it slightly to avoid the singular point and not increase the length by much, so it's clear that the infimum of lengths of curves lying strictly in the upper half plane and joining the two points is no more than $L_2$.

This suggests that the true distance function $L$ should be the minimum of $L_1$ and $L_2$ where they are both defined, i.e., where $4y_1y_2 \ge (x_1{-}x_2)^2$, and $L_2$ on the set where $4y_1y_2 < (x_1{-}x_2)^2$.

To get a sense of how these two formulae interact, one can use the fact that $x$-translation preserves the metric while the scalings $(x,y)\mapsto (ax,ay)$ for $a>0$ preserve the metric up to a homothety (and hence preserve the geodesics and scale the distances). These two actions generate a transitive group on the upper half plane, so, it suffices to see how these two functions interact when $(x_1,y_1) = (0,1)$, i.e., to see the conjugate locus and cut locus of this point.

The conjugate locus is easy: It's just $y-x^2/4=0$, which is the boundary of the region $y-x^2/4\ge0$ consisting of the points that can be joined to $(0,1)$ by a geodesic segment. Meanwhile, the cut locus is given by points $(x,y)$ that satisfy $y-x^2/4\ge0$ and for which $L_1\bigl((0,1),(x,y)\bigr) = L_2\bigl((0,1),(x,y)\bigr)$. In fact, one has $L_1\bigl((0,1),(x,y)\bigr) < L_2\bigl((0,1),(x,y)\bigr)$ only when $y > f(x)$, where $f$ is a certain even algebraic function of $x$ that satisfies $f(x) \ge x^2/4$ (with equality only when $x=0$). Moreover, for $|x|$ small, one has $$f(x) = \left({\frac{{\sqrt{3}}}{4}}x\right)^{4/3} + O(x^2)$$ while, for $|x|$ large, one has $$f(x) = \left({\frac{\sqrt{3}}{4}}x\right)^{4} + o(x^4).$$

Thus, all of the geodesics leaving $(x,y)=(0,1)$, other than the vertical ones, meet the cut locus before they reach the conjugate locus (and they all do meet the conjugate locus).

Thus, the actual distance function for this metric is explicit (it's essentially the minimum of $L_1$ and $L_2$), but it is only semi-algebraic.

Remark: The thing that makes this work is that, while the metric has only a 1-parameter family of symmetries, it has a 2-parameter family of homotheties (as described above), and this extra symmetry of the geodesics is critical for making this work. Of course, there are other such metrics, all the ones of the form $ds^2 = y^{a}\ (dx^2+dy^2)$ ($a$ is a constant) have this property and don't have constant curvature unless $a = 0$ or $a = -2$. You don't get algebraic answers for all values of $a$, of course, but there is a way to get $D$ implicitly defined in terms of a special function (depending on the value of $a$).

More generally, the metrics whose geodesics admit more symmetries than the metric itself does tend to have such formulae. I'm not aware of any other cases in which one can get $D$ so explicitly.

-

You have probably already thought of this, anyway: a way to produce 'explicit' formulas for the Riemann distance is via the heat kernel $p(t,x,y)$ and Varadhan's $$\lim_{t\to0+}t\log p(t,x,y)=-d(x,y)^2.$$ This might be interesting since there is a business of computing heat kernels for elliptic operators, which in some cases can be locally interpreted as Laplacians in some metric. See e.g. Beals, or the results of Hulanicki and Gaveau.

-

I hesitate to suggest this because you already mentioned Zoll surfaces. But for what it's worth, in Besse's book, Manifolds All of Whose Geodesics Are Closed, (Ergebnisse der Mathematik und ihrer Grenzgebiete, 93. Berlin: Springer-Verlag, 1978), Section D of Chapter 4, he gives an explicit embedding into $\mathbb{R}^3$ of a Zoll surface of revolution via parametric equations $\lbrace x,y,z\rbrace (r,\theta)$, and computes the cut locus from a particular point (it takes the shape of a 'Y').

Edit. Taking Bill Thurston's point re a "graphical representation of the distance function, and/or diagrams" to heart, I found this elegant image of the Zoll cut locus in the paper "Thaw: A Tool for Approximating Cut Loci on a Triangulation of a Surface" by Jin-ichi Itoh and Robert Sinclair, Experiment. Math. Volume 13, Issue 3 (2004), 309-325:

-

For a surface of revolution, there is Clairaut's relation, which I first learned from Do Carmo's book on curves and surfaces.

Oops. This gives you a nice description of the geodesics, but presumably the distance function is much harder.

-
Well, anyway it should be a lot of explicit examples among surfaces of revolution. – Anton Petrunin Sep 5 '10 at 3:10
Anton, I agree! – Deane Yang Sep 5 '10 at 3:26

A classical geometry in the calculus of variations is the one associated with the Brachistochrone problem.

The metric is given by

$$ds^2 = \frac{dx^2 + dy^2}{y}$$

Interestingly, for completely unrelated reasons, the same metric appears in the geometric approach to one of the two most famous models in mathematical finance. The so-called Heston model.

Although the geodesics for this metric have been known since the Bernoulli brothers, as far as we know, a rapid method to determine the associate Riemmanian distance function, was to our knowledge, not available. There now are two such methods, both presented in the paper "The Heston Riemannian distance function", by Gulisashvili and Laurence, that will appear on the ArXiv next week (identifier 0651294). The distance function is not found explicitly, in the sense of Terry's initial query. But, for instance in method 1, it is found modulo the solution of a convex scalar equation, for which 3-4 Newton iterations easily lead to a very accurate solution. So, we might call this "semi-explicit". In method 2 one needs to solve either convex or monotone scalar equations, also very fast.

Interestingly method 1 is related to the comment by Piero D'Ancona, to use an approach via Varadhan's lemma. Also, interestingly the Heston-Brachistochrone" metric is an example of an incomplete Riemannian metri in the upper half-plane, which is embedded in the larger family mentioned above by Robert Bryant: $$ds^2 =y^a (dx^2 +dy^2 ).$$ But now $a$ is negative.

-
Link for the paper: arxiv.org/abs/1302.2337 – Shamisen Feb 17 at 19:49

This is an old question but since it has been bumped up I would like to mention two classes of Riemann metrics (on the upper half-plane, resp. on the punctured plane) where your conditions can be met, at least partially. In the first case these are the metrics of the form $ds^2 =y^\beta(dx^2+dy^2)$ and in the second case $ds^2=r^\beta(dx^2+dy^2)$. The basis for this lies in the remarkable properties of the class of functions of the form $f(t)=p (\cos (d(t-t_0)))^{\frac 1 d}$ (we have included the parameters for a reason). Then we have the following facts:

$1$. If we consider the family of curves with parametrisations of the form $(F(t),f(t))$ where $F$ is a primitive of $f$ (called the MacLaurin catenaries in the arXiv article 1102.1579), then these are, for a fixed $d$, the geodesics for the first class of Riemann metric above (where the exponent $\beta$ depends in a simple way on $d$).

$2$. Similarly, the family of curves with polar equation $rf(\theta)=1$ (no, this is not a misprint) are, for a fixed $d$, the geodesics for the second class of surface (again there is a simple, but different, relation between $d$ and $\beta$).

$3$. The lengths along these curves can be calculated explicitly (this involves computing the integrals of functions of the form $f^\alpha$ with $f$ as above and Mathematica can handle this---the primitives involve hypergeometric functions).

We refer to the above mentioned article for the details and the rationale of the above representations and remark only that the reason behind all of this is that, for suitable choices of parameters, these functions are the solutions of the euler equations for calculus of variation problems of the form: minimise the functionals $\int f^\gamma(f^2+f'^2)^{\frac 1 2} dt$, resp. the same functional with restraint $\int f(t) dt = constant$ under suitable boundary conditions. The essential fact is that the functions of the above type are precisely those for which the expression $f^2+f'^2$ is proportional to a power of $f$. In fact, $f^2+f'^2=p^2 f^{2-2d}$. (We included the parameters to ensure that we have obtained all solutions). (Remark: the case $d=0$ is an exception---here we use the functions $f(t) = Ae^{bt}$).

The first class of curves was introduced in the article mentioned above, the second are the so-called spirals of MacLaurin and were introduced by this scottish mathematician in the 18th century. Of course, several members of the first class (i.e., for special choices of $d$) are familiar ---e.g. Dido circles, straight line, catenaries, cycloids, special types of parabolas. some of which have been mentioned in the above responses---and the MacLaurin spirals (sometimes called sinusoidal spirals) include, as special cases, some of the most famous curves of classical geometry (Teixeira Gomes' standard work on special curves includes many sections on this subject). Both have a startling array of special properties, all depending on the above property of the functions $f$ (for a unified exposition see, again, the aforementioned arXiv article).

We end with a caveat. For some of these spaces we can measure the distance between two points simply as the length of the geodesic joining them (we can, of course, always do this locally). However, for some values of $\beta$ there are points which cannot be joined by geodesics and then one would presumably need a more delicate argument. This has already been pointed out in the case of parabolas in the above responses and for catenaries the question is intricate enough for Hancock to have devoted a complete article in Annals of Mathematics to it.

-
Remember that the request was for an explicit formula for the distance function, which is considerably harder than finding explicit integrals of the geodesic equations. There are many known metrics with explicit geodesics; the surfaces of revolution and, in particular, the metrics you list (which are characterized by having a homothetic symmetry group of dimension at least 2) are special cases of a much wider class of such, which includes the Liouville metrics (which often have no symmetries). For nearly all of these, including yours, the distance function cannot be written down explicitly. – Robert Bryant May 10 '13 at 14:48
Also: The metrics of the form $ds^2 = r^{2\beta}(dx^2+dy^2)$ are essentially all the same, since they are locally flat. When $\beta=-1$, one can write $x{+}iy = e^w$, where $w=u{+}iv$ is a complex coordinate, and one has $ds^2 = du^2+dv^2$. When $\beta\not=-1$, one can write $$x+iy = \bigl((1{+}\beta)(u{+}iv)\bigr)^{1/(1{+}\beta)}$$ and, again, one has $ds^2 = du^2+dv^2$. Thus, it is not surprising that one can describe the geodesics (and distances) completely in these cases, for they are (quotients of open subsets of) the plane in disguise. – Robert Bryant May 10 '13 at 23:58