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.
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.
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)$.
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.