A continuous, injective function $f: \mathbb{R} \to \mathbb{R}$ is either strictly increasing or strictly decreasing.

Prove the contrapositive instead: if $f$ is not strictly increasing and not strictly decreasing, then it is not one-to-one.

For example, say there are points $a\lt b\lt c$ such that $f(a)\lt f(b)$ and $f(b)\gt f(c)$. Either $f(a)=f(c)$ (in which case $f$ is not one-to-one), or $f(a)\lt f(c)$, or $f(c)\lt f(a)$.

If $f(a)\lt f(c)\lt f(b)$, then by the Intermediate Value Theorem there exists $d\in (a,b)$ such that $f(d)=f(c)$; hence $f$ is not one-to-one.

Now, there are other possibilities (I made certain assumptions along the way, and you should check what the alternatives are if they are not met).


Consider $g\colon \{(x,y)\mid x<y\}\mapsto\mathbb R$, defined by $g(x,y):=f(x)-f(y)$. Clearly $g$ is continuos. Since the domain of $g$ is connected and $g$ has no zeroes, the image of $g$ is an interval not containing $0$.


Suppose $f : \mathbb{R} \rightarrow \mathbb{R}$ is continuous and not strictly increasing. Then there exists two points such that $f(a) = f(b)$, or there exists three points $a < b < c$ such that $f(a) < f(b)$ and $f(b) < f(c)$. The first case contradicts injectivity. Suppose the second, without loss of generality, suppose that $f(b) - f(a) \leq f(c) - f(b)$. Then $f(b) \leq f(b) - (f(b) - f(a)) = f(a) \leq f(c)$. By the intermediate value theorem, there exists $d$ such that $b < d < c$ such that $f(d)= f(a)$. This contradicts injectivity.