Continuous bijection from $(0,1)$ to $[0,1]$

Does there exist a continuous bijection from $(0,1)$ to $[0,1]$? Of course the map should not be a proper map.


No. If $f:(0,1) \to [0,1]$ were continuous and bijective, there would be a unique point $x \in (0,1)$ such that $f(x) = 1$. However, since $f$ is continuous, the intervals $[x - \varepsilon, x]$ and $[x, x + \varepsilon]$ would be mapped to intervals $[a,1]$ and $[b,1]$, say. By bijectivity we'd have $a, b \lt 1$. Thus every value strictly between $\max{\{a,b\}}$ and $1$ would be assumed at least twice, contradicting bijectivity.


Let $f:(0,1) \rightarrow [0,1]$ be continuous and surjective. (Actually, we just need to suppose that $0$ and $1$ are in the image of $f$.) Let $a,b \in (0,1)$ such that $f(a)=0$ and $f(b)=1$. Let $I=[a,b]$ if $a<b$ or $I=[b,a]$ if $b<a$. Then, by the intermediate value theorem, $f(I)$ is an interval that contains $0$ and $1$ and so $f(I)$ contains $[0,1]$, which implies $f(I)=[0,1]$. But then $f$ cannot be injective because $(0,1)\setminus I$ is nonempty.


Suppose that $f:(0,1) \rightarrow [0,1]$ is 1-1 and continuous. By the intermediate value theorem, the image of any interval under $f$ is an interval. Since $f$ is 1-1, it is either (strictly) monotone increasing or decreasing. Hence, $f(0,1)$ is an interval. Without loss of generality, assume $f$ is increasing; were it not this analysis would apply to $1 - f$.

Suppose now that $f$ is onto; then we must have some $t\in(0,1)$ with $f(t) = 1$. Because $f$ is strictly monotone increasing, we would have to have $f(s) > 1$, for $t \le s < 1$. This violates the premise that $f(0,1) \subseteq [0,1]$. Hence, $f$ cannot be onto.


Since Theo gave an answer I am going to be nitpicking and add one remark. When speaking about continuity (especially when tagging under [topology]) it is best to mention the topology you are working with. In this case, you mean in the standard topology.

Otherwise, consider the discrete topology, i.e. every set is open:

Let $f\colon [0,1]\to (0,1)$ be any bijection, it is continuous since all sets are open, the preimage of an open set is an open set, thus $f$ is continuous.