Let $(X,d)$ be a compact metric space. Let $f:X \to X$ be an isometric embedding, which means that for each $x,y\in X$, we have: $$ d(f (x),f (y)) = d (x,y). $$
Is then $f$ automatically surjective? In other words, is it true that $$ \inf_{y\in X} d (x,f (y)) = 0 $$ for every $x\in X $?
What I've figured out so far: this is clearly true if $X $ is finite, and clearly false if $X $ is not compact.