# Example of non-surjective isometry of metric space

I need an example of an isometry, $f$, from a metric space $X \rightarrow X$ that is not surjective. My example was letting the metric space be the set of non-negative real numbers with d$(x,y) := \max(x,y) - \min(x,y)$ if $x \neq y$, and $0$ if $x = y$. Then my isometry would be $f(x) = x+1$, so $0$ would not be in the image of $f$.

Is this a valid example? I don't know whether this is a real metric space, I just came up with it on my own.

• Welcome to MSE! See here for a tutorial on how to format your math. – mrp Oct 18 '15 at 14:46

Your metric $d$ is the same as the standard metric $d'(x,y) = |x - y|$ on $[0,\infty)$ and your example indeed works.