TITLE: Do sufficiently regular distances on manifolds come from riemannian metrics?
QUESTION [7 upvotes]: Hi to all!
Let $M$ be a compact smooth manifold without boundary and let $$d:M\times M\rightarrow [0,+\infty)$$ a distance on $M$ compatible with its topology. Suppose there exist $\varepsilon\in (0,+\infty)$ s.t. on the open set $\Delta_{\varepsilon}\subset M\times M$ 
$$\Delta_{\varepsilon}:=d^{-1}\left([0,\varepsilon)\right)$$
the function 
$$d^{2}:\Delta_{\varepsilon}\rightarrow [0,+\infty)$$ 
is smooth. Does a distance like this one come from a riemannian metric on $M$?
Thank you in advance.

REPLY [6 votes]: As pointed out in other answers, only length metrics can be Riemannian and there are plenty of non-length metrics satisfying your condition.
If your metric is a length metric, then yes, it is Riemannian. Indeed, for every $x\in M$ the function $f_x=d(x,\cdot)^2$ is smooth near $x$. Since it attains its minimum at $x$, its derivative at $x$ is zero. Therefore its second derivative at $x$ is well-defined as a quadratic form on $T_xM$. Define the metric tensor at $x$ as one half of this second derivative. Now from the Taylor expansion it is easy to see that for every $\varepsilon>0$ there is a neighborhood of $x$ where the original distance and the new Riemannian distance are Lipschitz equivalent with Lipschitz constant $1+\varepsilon$. Since both metrics are length metrics, this property implies that they are $(1+\varepsilon)$-Lipschitz equivalent globally. Since $\varepsilon$ is arbitrary, this means that they are equal.