# Let $f$ be an injective and continous function. Prove that $f$ is monotone. [duplicate]

Let $f:\mathbb{R} \rightarrow \mathbb{R}$ be an injective and continous function. Prove that $f$ is monotone.

My proof-trying Since $f$ is injective for all $x_{1},x_{2}\in\mathbb{R}$ there is a $y$ in $\mathbb{R}$ such that $f\left( x_{1}\right) =f\left( x_{2}\right)$. Since $f$ is continous for any $\varepsilon >0$ there is $\delta >0$ such that if $\left| x-a\right| < \delta$ then we have $\left| f\left( x\right) -f\left( a\right) \right| < \varepsilon$.

So how can I show $f$ is monotone?

• It might help to instead show the contrapositive, i.e. if $f$ is not monotone, then $f$ is not injective – TomGrubb Jan 17 '17 at 2:18
• @ThomasGrubb But, we don't know this is monotonically decreasing or increasing.Is it a problem? – James Ensor Jan 17 '17 at 2:23
• @ThomasGrubb If $f$ is not monotone then what can I say about $f$? I.e., how should I start proof? – James Ensor Jan 17 '17 at 2:28
• intuitively a function that is not monotone has a local maximum or minimum. Using continuity, you can then find a point with two preimages slightly below or above the local extremum. Hope that helps – TomGrubb Jan 17 '17 at 2:30

While others may suggest going via contrapositive ($f$ not monotone $\implies$ $f$ not injective), I prefer to do it this way.

Let $g(x,y) = f(x)-f(y)$, defined on the domain $D = \{(x,y) \in \mathbb R^2 : x>y\}$ . Note that $g$ is continuous because $f$ is, and the $D$ is connected in the real plane. Hence, $g(D)$ is also connected on the real line, so it is an interval. However, since we claim it is injective, $g(D)$ cannot contain zero (there can't be different points $x,y$ with $f(x)=f(y)$), so $g(D)$ as an interval, lies entirely to the left or to the right of zero i.e. $g$ is entirely negative or entirely positive as a function. Combining this with the definition of $g$, $f$ is either strictly increasing or strictly decreasing.

Points to keep in mind for this proof:

1) $g$ was continuous.

2) $D$ was connected, this combined with $1)$ to show that $g(D)$ is connected.

3) Every connected set of the real line is an interval.

4) The injectivity of $g$ was used to show that $g(D)$ cannot contain zero, this combined with $3)$ to complete the proof.

Pick an interval where $f$ is not monotone, and then see what happens to injectivity of $f$ in that interval.