$f$ is continuous and open implies $f$ injective

Question:

Let $f: \mathbb R \to \mathbb R$ be continuous and open, that is if $A \subset \mathbb R$ is open then $f(A) \subset \mathbb R$ is open. Prove that $f$ is injective.

Attempt:

Suppose $f$ is not injective then there exit $x, y \in \mathbb R$ such that $$x < y \implies f(x) = f(y) = c$$

Take the closed inteval $[x,y] \subset \mathbb R$, as $f$ is continuous then $\displaystyle {f|_{[x,y]}}$ is continuous, by Weierstrass Theorem we have that $f$ has a maximum or a minimum point.

Let's assume $m = \max \{f(a) ; a \in [x,y]\}$. Now there is $x' \in [x,y]$ such that $f(x') = m$. If we take the open $(x'-\delta, x'+\delta)$ centered at $x'$ and we have

(1) If $m = c$ then $f$ is constant on the interval $[x,y]$ and $f((x'-\delta, x'+\delta)) = \{c\}$ which is closed, thus a contradiction;

(2) If $m \neq c$ then we would have $f((x'-\delta, x'+\delta)) = (b, m]$, where $b$ can also be $b = \infty$. Again a contradiction.

Well, this is my least embarassing attempt. I'm not sure how to show $(2)$ $100 \%$.

I have also tried to show $f^{-1}f(A) = A$ for any $A \subset \mathbb R$, tried to work on the connected space $\mathbb R$ by finding a contradiction using the intervals $E_{[f > c]}$ and $E_{[f < c]}$ open when $A$ is open.

Any thoughts?

Note: I've already seen this to try something out, but the fact that $f$ is monotone on this exercise comes as a consequence.

• In the first line under "Question" you probably mean: "if $A\subset\mathbb R$ is open then ..." Feb 1, 2015 at 20:03
• That's right, thanks. Feb 1, 2015 at 20:04
• If $f$ is monotonic, continuous, and $f(x)=f(y)$ then wouldn't $f$ need to be constant on $[x,y]$, then you can pick out an open interval and say its image is $\{c\}$?
– user43138
Feb 1, 2015 at 20:13
• $f$ is not monotonic though. I mean not by hypothesis. Feb 1, 2015 at 20:14

You could use that $f((x,y))$ is open, so that neither the maximum nor the minimum are attained in the interior $(x,y)$ (why exactly?).
Use this to derive a contradiction to $f(x)=f(y)$.
• Thanks for your answer, I really appreciate, I've spent a long time on this exercise already. In order to show that neither maximum nor minimum are attained wouldn't I have to use the same $2$ steps though? Feb 1, 2015 at 20:31
• And further, do you think my answer is correct? Also, number $(2)$ is clear as it is? Feb 1, 2015 at 20:31
• @AaronMaroja: Regarding your solution: I don't really see why $m=c$ implies that $f$ is constant on the interval. It could still assume values $<c$, because $m$ is just the maximum of $f$ on the interval. Also, you will have to distinguish the case $x' \in \{a,b\}$, because then $(x'-\delta, x'+\delta)$ will not be a subset of $[x,y]$. <hr/>To show that neither the max, nor the min. is attained in $(x,y)$ you do not need cases. If e.g. the max is attained, this implies $f((x,y)) = (\alpha, c]$, which is not open. The min. case is handled analogous. Feb 1, 2015 at 21:03
• I see, you're right, it doesn't need to be constant. What do I need to prove that last part, though? Assuming that $m$ is attained, should I take any sequence $(x_n)$ converging to $x'$ and then show that to any $\epsilon > 0$ $f(x_n) \leq m$? Feb 1, 2015 at 21:19
• Simply observe that if $c = \max \{f(z) \mid z \in [x,y]\}$ and if some $z \in (x,y)$ satisfies $c = f(z)$, then $c = \max f((x,y))$, but an open set does not contain its maximum. Finally, since neither the max. nor the min. are attained in $(x,y)$, the max. must be either $f(x)$ or $f(y)$ and similarly for the min. But this implies max = min, so that $f$ is constant, contradiction. Feb 1, 2015 at 21:22