How to prove the distance isometry is a smooth on a Riemannian manifold? Suppose $(M,g)$ is a Riemannian manifold, $d$ the induced metric (by geodesic lengths), and $f$ is an isometry on $M$ in the metric space sense. I want to prove $f$ is a diffeomorphism using the exponential map.
But the first thing is I want to prove smoothness. One fact I know is that $f$ sends geodesics to geodesics. So here I go.
For each $p$, consider some $\epsilon>0$ so that we have a geodesic ball $\exp_p(\bar B_\epsilon(0))$ around $p$ (in which $\bar B$ means closed balls in $T_pM$). Within this ball, I want to show $f$ is smooth. For each $q\in \exp_p(\bar B_\epsilon(0))$ there exists a unique $v_q\in T_pM$ so that $\|v_q\|\le\epsilon$ and that $\exp_p(v_q)=q$. Thus
$$f(q)=\exp_{F(p)}(d(f)_p v_q)$$
since $d(f)_p$ preserves lengths in tangent vectors. (Here $df$ denotes the differential of $f$, not to be confused with the metric $d$.)
However, I'm having trouble showing why $q\mapsto v_q\in T_pM$ is smooth. Is there any explicit expression of this map? (I know it is continuous of course (and indeed an isometry) since $d(p,q)=\|v_q\|$. But how to show the direction of $v_q$ also varies smoothly with $q$?)
 A: There is a very explicit expression of the map $q\mapsto v_q$: it's the inverse of the exponential map $\exp_p^{-1}$ (well you write $\exp_p (v_q) = q$....). In particular, it is smooth as $\exp_p$ is a local diffeomorphism (I assume you know how to prove that). 
Note that $q\mapsto v_q$ is indeed NOT an isometry. Your formula $d(p, q)  = \| v_q\|$ holds true, but it works only for $p$. If $q_1, q_2$ are both not $p$, you do not have 
$$ d(q_1, q_2) = \| v_{q_1} - v_{q_2}\|.$$
Indeed the metric $g_p$ defined on $B_\epsilon(0) \subset T_pM$ is flat, so in general $\exp_p$ cannot be an isometry. 
A: OK, here is a proof that each isometric embedding $f: E\to E$ of a finite-dimensional Euclidean space to itself is an affine transformation with orthogonal linear part. As I said in a comment, it is a pleasant elementary geometry exercise. (Lemmata 1 and 2 are essentially from John Stillwell's "Four Pillars of Geometry".)
Lemma 1. Pick $n+1$ generic (i.e. not in a proper affine subspace) points $A_0, A_1, ..., A_n$ in the Euclidean $n$-space $E^n$. Then the tuple of distances $\tau(P):=(|A_0P|, |A_1P|,..., |A_nP|)$ determines the position of a point $P\in E^n$ uniquely. 
Proof. Suppose that there are two distinct points $P, Q\in E^n$ such that $\tau(P)=\tau(Q)$. Then all $n+1$ points $A_0, A_1,..., A_n$ belong to the perpendicular bisector of the segment $PQ$. Hence, $A_0, A_1,..., A_n$ all belong to a proper affine subspace. qed
Lemma 2. Each isometric embedding $f: E^n\to E^n$ is an affine isometry with orthogonal linear part. 
Proof. Let $A_0...A_n\subset E^n$ be the vertex set of a simplex with unit edges. Since $f(A_0,...,A_n)$ is also the vertex set of a simplex with unit edges, there exists an affine isometry (with orthogonal linear part) $g: E^n\to E^n$ such that $f(A_0)=g(A_0), f(A_1)=g(A_1),... f(A_n)=g(A_n)$. Since both $f$ and $g$ preserve distances, Lemma 1 implies that $f(P)=g(P)$ for all $P\in E^n$. qed
