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.
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&gt;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&gt;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...
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