Smoothness of the squared distance function on a Riemannian manifold

1k Views Asked by At

Let $\left(M, g\right)$ be a complete Riemannian manifold. Let us fix a point $p \in M$ and consider the squared distance function $$ r(x) := \operatorname{dist}(x, p)^2. $$ It is well-known that $r$ is a smooth function on $M\setminus Cut(p)$, where $Cut(p)$ is the cut locus of $p$, see here and here. So it may happen that $r$ is singular on some points in $Cut(p)$.

Now, embed $M$ into the Euclidean space isometricly, then the squared distance function $r$ is the restriction of the Euclidean squared distance function to the submanifold $M$. In particular, $r$ is smooth on $M$. In the book Morse theory by J.Milnor, this distance function is used as a Morse function.

I found it very confusing to have these two seemingly contradict statements. Did I miss something? Are there any good examples?