# Smoothness of distance function in Riemannian Manifolds

Let $(\mathcal{M},g)$ be a $C^{\infty}$-Riemannian manifold. A basic fact is that $g$ endows the manifold $\mathcal{M}$ with a metric space structure, that is, we can define a distance function $d:\mathcal{M}\times\mathcal{M}\longrightarrow\mathbb{R}$ (the distance between two points will be the infimum of the lengths of the curves which join the points) which is compatible with the topology of $\mathcal{M}$. Of course $d$ is continuous function, but what can we say about the differentiability of $d$?, is it smooth?. If not, Is there some criterion to know when it is?

-
It's never smooth for a compact manifold. Consider a diameter -- the maximum of the function. It's not smooth there. For example, consider $S^n$. You get cone-type singularities. –  Ryan Budney Apr 14 '10 at 4:02
Similarly, it's not smooth along the diagonal $\{(x,x) : x \in \mathcal{M}\}$ –  Ryan Budney Apr 14 '10 at 4:04
One often looks at $d^2$ instead of $d$. This at least fixes the smoothness issues along the diagonal mentioned by Ryan. Still, on any comapct manifold, $d^2$ will necessarily fail to be smooth at some points. –  Jason DeVito Apr 14 '10 at 5:04
I know we all know what you're talking about but presumeably you want $\mathbb{R}$ as your codomain rather than the manifold. –  Spencer Apr 14 '10 at 10:34
Spencer. You are right. I have corrected the post. –  Mauricio Apr 14 '10 at 16:45

As others mentioned, you have to remove the diagonal of $M\times M$ or square the distance function. Then, for a complete $M$, the answer is the following.

The distance function is differentiable at $(p,q)\in M\times M$ if and only if there is a unique length-minimizing geodesic from $p$ to $q$. Furthermore, the distance function is $C^\infty$ in a neighborhood of $(p,q)$ if and only if $p$ and $q$ are not conjugate points along this minimizing geodesic.

Thus, the function is smooth everywhere if and only if $M$ is simply connected and the geodesics have no conjugate points. This property has numerous equivalent reformulations, including the following

• for every pair of points, there is a unique minimizing geodesic between them;

• for every pair of points, there is a unique geodesic between them;

• every geodesic is minimizing;

• the exponential map at every point $p\in M$ is a diffeomorphism from $T_pM$ to $M$.

In general, the distance function has one-sided directional derivatives everywhere. This derivative has a nice description in the case when you fix $p\in M$ and study the function $f=d(p,\cdot)$. Namely let $q\in M$, $q\ne p$, and denote by $\vec{qp}$ the set of initial velocity vectors (in $T_qM$) of unit-speed minimizing geodesics from $q$ to $p$. Then, for a vector $v\in T_qM$, the one-sided derivative $f'_v$ of $f$ in the direction of $v$ is $$f'_v=\min\{-\langle v,\xi\rangle:\xi\in \vec{qp}\} .$$ This follows from the first variation formula and holds not only in Riemannian manifolds but also in Alexandrov spaces. It is not hard to derive the above differentiablity properties from this.

I don't have a textbook reference for this precise formulation in the Riemannian case, but any book that covers Berger's lemma about geodesics realizing the diameter probably has directional derivatives as a sublemma. For Alexandrov spaces, the standard reference is Burago-Gromov-Perelman's paper. An intro-level proof (not in a full generality) can be found in (a shameless advertisement follows) "A course in metric geometry" by Burago, Burago and myself, section 4.5.

-
Your advertisement would only have been shameless if there was another book which covered anywhere near the same material. –  Paul Siegel Apr 14 '10 at 11:58
It is a cute thoerem of Franz-Erick Wolter that a complete $n$-dimensional Riemannian manifold $M$ is necessarily diffeomorphic to $\mathbb R^n$ if there is a point $p\in M$ such that the squared-distance function $d(p,\mathord-)^2:M\to\mathbb R$ has directional derivatives at all points and in all directions. This provides examples.