# Compact metric space [duplicate]

Let $(X,d)$ be a compact metric space and $f : X \to X$ be isometric, i.e. for every $x,y \in X$ : $d(f(x),f(y)) = d(x,y)$. How I can show the following? $f(X) = X$
My first thought was to show the surjection $x \in X \setminus f(x)$. Is this the right approach?