how to prove, $f$ is onto if $f$ is continuous and satisfying $|f(x) - f(y)| ≥ |x - y|$ for all $x,y$ in $\mathbb{R}$ let $f:\mathbb{R}\rightarrow\mathbb{R}$ be a continuous function such that
$|f(x) - f(y)| ≥ |x - y|$ for all $x,y$ in $\mathbb{R}$.
then $f$ is onto.
 A: Let $A=f(\mathbb R)$.  The inequality implies that $f$ is injective with continuous inverse defined on $A$, hence by assumed continuity of $f$, $f:\mathbb R\to A$ is a homeomorphism.  The inequality along with continuity of $f$ and completeness of $\mathbb R$ also implies that $A$ is complete with the metric restricted from $\mathbb R$.  The only subspace of $\mathbb R$ that is homeomorphic to $\mathbb R$ and complete (with the restricted metric) is $\mathbb R$, so $A=\mathbb R$. 
A: If $M$ is connected and $f$ is continuous, then $f(M)$ is connected. $\mathbb{R}$ is connected. Hence $f(\mathbb{R})$ must be an interval. Now you only have to prove that $f(\mathbb{R})$ cannot be bounded from above or below. That's up to you.
A: Hint: 
The given inequality implies that $f$ must be one-to-one. Without loss of generality, suppose $f$ is increasing. 
Suppose now that $f$ does not take the value $M>f(0)$ with $M$ positive. Then by continuity we must have $|f(x)-f(0)|\le M-f(0)$ for all $x\ge 0$. This, however, contradicts your given inequality (consider the inequality with $y=0$ and $x>M-f(0)$). 
Thus, $f$ is not bounded above.
Now argue in a manner similar to the above that $f$ is not bounded below.
So, you have a   continuous function which is neither bounded above nor bounded below...
A: Assume $f$ is not onto, implying that there exist $y\in Y$, here i denote Y as the codomain of $f$, where no $x\in X$, X is the domain of $f$, satisfies $f(x)=y$. Note that $f$ is continuous in the whole real number line. In another words, for any $y\in Y$ as well as in real number line, due to continunity, there should exist and $x$ s.t.$\lim_{t\rightarrow x}f(t)=y$ implies $x$ satisfies $f(x)=y$ for any $y$ in real which is a contradiction
