# Show that $f$ is onto [duplicate]

This question already has an answer here:

Let $(X,d)$ be a compact metric space. Let $f:X\rightarrow X$ be such that $d(f(x),f(y))=d(x,y)$ for all $x,y\in X$. Show that f is onto. Hint: Fix $y\in X$and $x_1\in X$, define $x_n=f(x_{n-1})$, observe that $d(x_n,x_{n+k})=d(y,x_n)$.

It is easy to show that \begin{align*} d(x_n,x_{n+k})&=d(f(x_{n-1}),f(x_{n+k-1})) \\ &=d(x_{n-1},x_{n+k-1})\\ &=d(x_{n-k},x_n) \end{align*}
I don't understand how we get $d(y,x_n)$.Why $y$ must be an element in $x_n$?

## marked as duplicate by Will Jagy, Brian M. Scott, Daniel Fischer, user61527, Stefan4024Oct 19 '13 at 23:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• You used compactness tag, but forgot to mention it in the question: $X$ must be a compact metric space. – njguliyev Oct 19 '13 at 22:22
• yeah, my bad,how does compactness make a difference? – LPS Oct 19 '13 at 22:27
• @Berci He's not asking that facetiously, it's a serious question. – Gyu Eun Lee Oct 19 '13 at 22:30
• The hint still doesn’t make sense, but you can find one proof here and another here. The second one may be what the hint was supposed to suggest. – Brian M. Scott Oct 19 '13 at 22:32
• @Will: Your rudeness is uncalled for, especially since it appears that the OP was given a faulty question. – Brian M. Scott Oct 19 '13 at 22:35

## 1 Answer

The proposition is not true as it stands: consider $X$ the right halfplane $X:=\{(x,y)\in\Bbb R^2\,:\, x>0\}$, and let $f$ be a shift to the right: $f((x,y)):=(x+1,y)$.

Update: Assuming that $X$ is compact, makes difference.

Hint: If a hint doesn't help, don't insist to find it out, rather look for the solution for the original problem.

• sorry, I forgot to mention $X$ is a compact metric space, what about now? – LPS Oct 19 '13 at 22:24