Let $(M,d)$ be a compact metric space and $f:M \to M$ such that $d(f(x),f(y)) \ge d(x,y) , \forall x,y \in M$ , then $f$ is isometry? Let $(M,d)$ be a compact metric space and $f:M \to M$ such that $d(f(x),f(y)) \ge d(x,y) , \forall x,y \in M$ ; then how to prove that $d(f(x),f(y))=d(x,y) , \forall x,y \in M$ i.e. that $f$ is an isometry  ? I wanted to prove by contradiction , that suppose $\exists a,b \in M$ such that $d(f(a),f(b)) > d(a,b)$ ; I wanted to use the sequences $\{f^n(a)\}$ and $\{f^n(b)\}$ , these have convergent subsequences $\{f^{r_n}(a) \}$ and $\{f^{r_n}(b)\}$ ( without loss of generality we have extracted a common subsequence ) converging to say $x,y \in M $ respectively . Then $d (f^{r_n}(a) , f^{r_n}(b))$ converges to $d(x,y) >d(a,b)$ ;  but I don't know what to do next , please help . Thanks in advance  
 A: Let $a,b$ be two elements of $M$. We wish to show that
$d(f(a),f(b)) \leq d(a,b)$.
As noted in the OP, there is an increasing sequence $(r_n)$
of integers such that $f^{r_n}(a)$ converges in $M$
and $f^{r_n}(b)$ converges in $M$. Then $d(f^{r_n}(a),f^{r_{n+1}}(a))$ 
tends to zero. But $d(a,f^{r_{n+1}-r_n}(a)) \leq d(f^{r_n}(a),f^{r_{n+1}}(a))$
by the hypothesis on $f$, so $d(a,f^{r_{n+1}-r_n}(a))$ tends to zero.
For the same reason, $d(b,f^{r_{n+1}-r_n}(b))$ tends to zero. There are then
two not-so-different cases to consider :
First case : the set of values $V=\lbrace r_{n+1}-r_n\rbrace$ is finite. Then some
value $v\in V$ is attained infinitely often ; it follows that
$d(a,f^v(a))=0$ hence $f^v(a)=a$ and similarly $f^v(b)=b$. If we put
$x=f(a)$ and $y=f(b)$, we have $d(x,y) \leq d(f^{v-1}(x),f^{v-1}(y))$
by the hypothesis on $f$. But this is exactly what we want.
Second case : the set of values $V=\lbrace r_{n+1}-r_n\rbrace$ is infinite. Then
there is an increasing subsequence $(s_n)$ of $(r_{n+1}-r_n)$ such that
$f^{s_n}(a)$ converges to $a$ and $f^{s_n}(b)$ converges to $b$. Then
 $u_n=d(f^{s_n}(a),f^{s_n}(b))$ converges to $d(a,b)$.
On the other hand, by the hypothesis on $f$ we have 
$$
d(a,b)\leq d(f(a),f(b)) \leq  u_0 \leq u_1 \leq \ldots \leq d(a,b)
$$
this concludes the proof.
A: I would proceed like this : 
1) $\overline{f(M)} = M$. Indeed, as $M$ is compact, if $a\in M$, the sequence $(f^n (a))_{n\in\mathbf{N}}$ has a convergent subsequence, which is therefore Cauchy : this means that for all $\varepsilon$ you can find $n,p\in\mathbf{N}$ such that $d(f^n (a),f^{n+p}(a))< \varepsilon$, and the hypothesis on $f$ implies then that $d(a,f^p(a))<\varepsilon$, and this shows that $a\in \overline{f(M)}$.
2) As $(M,d)$ is compact, so is $(M\times M, d\times d)$ where $$(d\times d)((m_1,m_2),(m'_1,m'_2)) := d(m_1,m'_1)+d(m_2,m'_2)$$ for all $m_1,m'_1,m_2,m'_2\in M$. Moreover, the application $g=(f,f) : M\times M \to M\times M$ verifies the same property as the one verified by $f$. This implies that, if $x,y\in M$ we have : $$\forall \varepsilon > 0, \exists p\in\mathbf{N}, d(x,f^p(x))<\varepsilon\textrm{ and }d(y,f^p(y))<\varepsilon.$$
3) Now suppose having $x,y\in M$ such that $d(f(x),f(y)) > d(x,y)$. Then choose $\varepsilon > 0$ such that $$(A)\;\;\;\;\;\;\;\;d(x,y) + 2\varepsilon < d(f(x),f(y)).$$ Then for all $k\in\mathbf{N}^*$ we have $$(F)\;\;\;\;\;\;\;\;d(f^p(x),f^p(y)) \geq d(f(x),f(y)) > d(x,y).$$ But then 2 implies that we can find a $p$ such that $$(B)\;\;\;\;\;\;\;\;d(x,f^p(x))<\varepsilon\textrm{ and }d(y,f^p(y))<\varepsilon.$$ Then (A), (B) and the triangle inequality imply that $$d(f^p(x),f^p(y)) < d(x,y) + 2\varepsilon < d(f^p(x),f^p(y))$$ which is in contradiction with (F).
Remark. Note that now that $f$ is an isometry, $f$ is continuous so that $f(M)$ is compact (i.e. quasi-compact and Hausdorff) and is therefore closed, so that 1 implies that $f$ is in fact surjective.
A: @Ewan Delanoy, very nice proof indeed, I just want to propose a simpler step in the last step of your handling: "There are then two not-so-different cases..."
As $$lim(d(a,f^{r_{n+1}-{r_{n}}}(a)))=0$$ 
and
$$lim(d(b,f^{r_{n+1}-{r_{n}}}(b)))=0$$
then
$$lim(d(f^{r_{n+1}-{r_{n}}}(a),f^{r_{n+1}-{r_{n}}}(b)))=d(a,b)$$
with 
$$r_{n+1}-{r_{n}}\ge1$$
So
$$0\le{d(f(a),f(b))-d(a,b)}\le{d(f^{r_{n+1}-{r_{n}}}(a),f^{r_{n+1}-{r_{n}}}(b))}-d(a,b)\le\varepsilon$$
for every $$\varepsilon\gt0$$
A: Based on the first answer I think I got an asnwer. Please correct whatever steps may be wrong. We have for hypothesis that: $ \forall x, y \in X  \; d(f(x), f(y)) \geq d(x, y) $. We want to show that $ d(x, y) = d(f(x), f(y)) $.
Of course we can do this by showing that:
$$ d(x, y) \geq d(f(x), f(y)) \geq  d(x, y)$$.
To motivate this let's propose an use of the triangle inequality:
$$ d(f(x), f(y)) \leq d(f(x), f^2(x)) + d(f^2(x), x) + d(x, y) + d(f^2(y), y) + d(f^2(y), f(y))  $$
This inequality in particular is way too specific and if we were to show that $\forall x \in X: \; d(f(x), f^2(x)) < \epsilon $ and  $\forall x \in X: \; d(x, f^2(x)) < \epsilon $ we would be finished. But more generally we would like to prove:
$$ d(f^k(x), x) < \epsilon \;\;\; \text{&} \;\;\; d(f^{m-k}(x), f^k(x) < \epsilon $$
So let's consider the $(f^n(x))_n$ sequence. By compacity we have that it exists $f^{n_k}(x)_k$ that it converges. As it converges it is a Cauchy sequence.
$$ \exists f^{n_k}(x)_k : d(f^{n_k}(x), x_o) < \epsilon$$
$$ d(f^{n_k}(x), f^{n_{k+1}}(x)) < \epsilon$$
Using the fact that is Cauchy + hypothesis we have that:
$$ d(f^{n_{k+1} - n_k}(x), x) \leq  d(f^{n_{k+1}}(x), f^{n_k}(x)) \leq \epsilon$$
Such that we can construct a similar inequality to the specific one proposed.
