# How can I prove that a continuous injective function is increasing/decreasing? [duplicate]

If I have a continuous, injective function mapping the real numbers, then it is either increasing or decreasing.

This seems intuitively obvious but I can't come up with a neat proof for it.

## 3 Answers

It is easiest here to prove that if $f$ is not strictly monotonic, then $f$ is not injective. Suppose $f$ is not strictly monotonic. Then there exists a $b\in [x,y]$ such that there are $a<b$ and $c>b$ for which either $f(a)\leq f(b)$ and $f(c)\leq f(b)$ or $f(a)\geq f(b)$ and $f(c)\geq f(b)$. Without loss of generality, assume that $f(a)\leq f(b)$ and $f(c)\leq f(b)$. If $f(a)\geq f(c)$, then by the intermediate value theorem there exists a $c'$ between $b$ and $c$ such that $f(c')=f(a)$, so $f$ is not injective. We may argue similarly if $f(a)\leq f(c)$.

• @Lara This holds for $\mathbb{R}$ because a monotonic continuous map is an open map, so yes. – Matt Samuel Feb 1 '15 at 20:05
• How so? For $f^{-1}$ to be continuous, doesn't the function have to be mapping from a compact metric space onto the reals? – Lara Feb 1 '15 at 20:08
• How does monotonicity give us the result? – Lara Feb 1 '15 at 20:09
• The function would be from the range of $f$ to $[x,y]$. Continuity is defined in the same way as for functions into $\mathbb{R}$. I'm not sure I understand the problem you are having, though. – Matt Samuel Feb 1 '15 at 20:12
• @Lara the function maps into $[x,y]$, not $(x,y)$. At the endpoints $f(z)\in \{x,y\}$. – Matt Samuel Feb 1 '15 at 20:16

A topological proof

We define the sets : $$A=\{(a,b)\in[x,y]\times [x,y] \mid a<b\}$$ $$B=\{(a,b)\in A \mid f(a)−f(b)<0\}$$ and $$C=\{(a,b)\in A \mid f(a)−f(b)>0\}$$ Notice that $B$ and $C$ are disjoint and that $A$ is a connected set. Since $f$ is injective then $B\cup C=[x,y]$ and since $f$ is continuous then $B$ and $C$ are open. Finally, if $f$ isn't strictly monotonic then $B$ and $C$ are non empty sets which contradicts the fact that $A$ is a connected set.

Hint: If it is not monotone then you can find points $x<y<z$ such that $f(x)\le f(y)$ and $f(y)\ge f(z)$ . Now arrive at contradiction.