TITLE: Reference request: Recovering a Riemannian metric from the distance function
QUESTION [13 upvotes]: Let $M = (M, g)$ be a Riemannian manifold, and let $p \in M$.
Writing $d$ for the geodesic distance in $M$, there is a function
$$
d(-, p)^2 : M \to \mathbb{R}.
$$
This function is smooth near $p$. Hence for each point $x \in M$ sufficiently close to $p$, we have the Hessian 
$$
\text{Hess}_x(d(-, p)^2) 
$$
(defined using the Levi-Civita connection), which is a bilinear form on $T_x M$. In particular, we can take $x$ to be equal to $p$ itself, giving a bilinear form 
$$
\text{Hess}_p(d(-, p)^2)
$$
on $T_p M$. But of course, we already have another bilinear form on $T_p M$, namely, the Riemannian metric $g_p$ itself. And the fact is that up to a constant factor, these two forms are equal:
$$
g_p = \frac{1}{2} \text{Hess}_p(d(-, p)^2).
$$
I'm looking for a reference for this fact. For the purposes of what I'm writing, it would ideally be a reference that states this fact in the same simple direct terms as above, without involving any other differential-geometric concepts (e.g. normal coordinates).
I understand that this is a basic fact of Riemannian geometry, so I've already looked for it in various introductions to the subject, including those by do Carmo, Jost, Lee, and Petersen. But I haven't found it stated in any of those sources (which isn't to say it's not there). I have found more sophisticated stuff about $\text{Hess}_x(d(-, p)^2)$ for points $x$ different from $p$, but not the simple fact I'm looking for.
Requests for references often result in people giving their favourite proofs rather than a reference. While that doesn't do any harm (and can be quite interesting), I emphasize that it's a reference I'm looking for, not a proof.

REPLY [2 votes]: I believe that the reason why you cannot find the result that you are asking about printed anywhere is that it is, after all, a mere exercise in Riemannian computation. First, it is easy to show that if $f$ is smooth around $p$, then $(Hf)_{ij} = \partial^2_{ij}f - \Gamma_{ij} ^k \partial_k f$ in any system of coordinates around $p$. Now, since your $f = d_p^2$ has radial symmetry, it is natural to continue the work in spherical normal coordinates, i.e. you go in $T_pM$ through $\exp_p ^{-1}$ and there you introduce spherical coordinates $r, \sigma_1, \dots, \sigma_n$, with $n = \dim M$. Since $\Gamma_{ij}^k (p) = 0$ as a consequence of your coordinates being normal, you will have $(Hf)_{ij} (p) = (\partial^2_{ij}f) (p) = (\partial ^2 _{rr} r^2) (p) = 2$ (all the other second-order partial derivatives vanish at $p$ because $f=r^2$ does not contain the variables $\sigma_1, \dots, \sigma_n$).
On the other hand, it is known that in normal spherical coordinates the expression of the metric tensor is $g_{ij} = \delta_{ij} + o(r)$, so that $g_{ij} (p) = \delta_{ij} (p)$ (the Kronecker symbol), whence it follows that $(Hf)(p) = 2g(p)$ (the metric evaluated at $p$). See p.114 of I. Chavel, "Riemannian Geometry - A Modern Introduction", 2006, or the more general  theorem 2.53 of Cartan on p.83 of S. Rosenberg, "The Laplacian on a Riemannian Manifold", 1997, or Petersen's book cited here.