# Isometry is not surjective

According to the definition I am using, an isometry is a mapping $f:X \rightarrow Y$ between two metric spaces $(X,d_{X})$ and $(Y,d_{Y})$: $$d_{Y}(f(a),f(b)) = d_{X}(a,b)$$ for all $a,b \in X$

I managed to prove that it is injective. I let $f(a)=f(b)$ so $d_{Y}(f(a),f(b))=d_{X}(a,b)=0$, which means $a=b$, by one of the axioms of distance. So $f(a)=f(b) \Rightarrow a=b$ and $f$ is injective. Now, I have to prove (or give a counterexample) that $f$ is surjective. I thought of a very simple counterexample, but I am not sure if it is right.

Consider $X,Y \subset \mathbb{R}^{2}$ such that $X=\left\{ (0,0),(0,1),(1/2,\sqrt{3}/2)\right\}$ and $Y=\left\{ (0,0),(0,1),(1/2,\sqrt{3}/2),(10,10)\right\}$. And the usual euclidean distance. I constructed $X$ so that for any two given points, their distance is always the same (=1). $Y$ contains $X$ and also another point that could be pretty much anything. Now I define $f(\textbf{x})=\textbf{x}$. Surely, $f$ is not surjective, but $d(f(a),f(b)) = d(a,b)$ for any $a,b \in X$.

Is my reasoning right?

• Your example is fine, but overly-complicated. :) (It's enough to take $X$ a singleton, $Y$ a two-point set containing $X$, and $f$ the inclusion. (Incidentally, for suitable $(X, d)$ there exist non-surjective isometries $f:X \to X$.) Mar 23 '14 at 11:49
• @Thiago: related: math.stackexchange.com/questions/1507700/… Sep 1 '16 at 10:37

As user86418 remarked, the example is correct, and any other inclusion map $f:X\to Y$ with $X\subset Y$ will do. (There is no reason to arrange all distances in $X$ to be equal to $1$.)
The problem is more interesting if one insists in addition on having $X=Y$. A simple example for this version is $f(n)=n+1$ on the set of natural numbers $\mathbb N$.