# Is there a continuous bijection between an interval $[0,1]$ and a square: $[0,1] \times [0,1]$?

Is there a continuous bijection from $[0,1]$ onto $[0,1] \times [0,1]$?
That is with $I=[0,1]$ and $S=[0,1] \times [0,1]$, is there a continuous bijection $$f: I \to S?$$

I know there is a continuous bijection $g:C \to I$ from the Cantor set $C$ to $[0,1]$.
The square $S$ is compact so there is a continuous function $$h: C \to S.$$ But this leads nowhere.
Is there a way to construct such an $f$?

I ask because I have a continuous functional $F:S \to \mathbb R$.
For numerical reason, I would like to convert it into the functional $$G: I \to \mathbb R, \\ G = F \circ f ,$$ so that $G$ is continuous.

• Any continuous $f:I\to S$ produces a continuous $G$. One can even arrange $f$ is surjective. Is there some further reason $f$ needs to be bijective? – Bob Pego Oct 1 '13 at 0:47
• @BobPego The bijection requirement was a first instinct. You made me realized I can forgo it. Thank you for your insightfull comment. – user14108 Oct 1 '13 at 0:56
• By the way, there is no continuous bijection from $C$ to $I$ since $C$ is compact, $I$ is Hausdorff, and $I$ is connected while $C$ is not. – Stefan Hamcke Oct 1 '13 at 1:30
• Side note: A functional maps functions to $\mathbb R$, e.g. $F: C^\infty(S)\to\mathbb R$ – Tobias Kienzler Oct 1 '13 at 9:19
• Something can also be found in this older question. @TobiasKienzler I have removed my previous two comments. Since the older question is already closed, they seem to be obsolete now. – Martin Sleziak Oct 1 '13 at 12:12

No, such a bijection from the unit interval $I$ to the unit square $S$ cannot exist. Since $I$ is compact and $S$ is Hausdorff, a continuous bijection would be a homeomorphism (see here). But in $I$ there are only two non-cut-points, whereas in $S$ each point is a non-cut-point.

Hint: Consider what happens to the connected $[0,1]$ if the point $\frac12$ is removed. What happens to $[0,1]\times[0,1]$ when $f(\frac12)$ is removed?

Hint: A continuous bijection from a compact space to a Hausdorff space is bicontinous.

• Why the downvote? A continuous bijection from a compact space ($[0,1]$) to a Hausdorff space ($[0,1]\times[0,1]$) is bicontinuous, so the inverse is also continuous. I've amended my answer to make this explicit. – robjohn Oct 27 '17 at 15:42

No. The easiest was to see this is to first notice that $[0,1]^2\setminus \{x\}$ is connected for any $x \in [0,1]^2$.

It is easier (for me) to work with $\phi = f^{-1}$. However I must show that $\phi$ is continuous. Suppose $y_n \to y$, then I must show that $\phi(y_n) \to \phi(y)$. Let $x_n = \phi(y_n), x = \phi(y)$. One slightly technical way is to show that every subsequence of $x_n$ contains a further subsequence that converges to $x$. From this we will conclude that $\phi$ is continuous.

Suppose $x_{n_k} \to z$. Since $f$ is continuous, we have $y_{n_k} = f(x_{n_k}) \to f(z) = y$. Hence $z = x$. (So, in fact, the entire sequence, not just a subsequence, converges to $x$.) Hence $\phi$ is continuous.

Now suppose $\phi:[0,1]^2 \to [0,1]$ is a continuous bijection. Let $x = \phi^{-1} (\frac{1}{2} )$, then $\phi([0,1]^2\setminus \{x\})$ is connected, however we see that $\phi([0,1]^2\setminus \{x\}) = [0,\frac{1}{2}) \cup (\frac{1}{2},1]$ which is not connected. Hence a contradiction.

• technically he asked for a continuous bijection the other way, so you'd have to show that the inverse function is also continuous. – Deven Ware Oct 1 '13 at 0:44
• @DevenWare: Thanks - I'm just processing that now! – copper.hat Oct 1 '13 at 0:44
• @copper.hat Your answer shows an other side of the die. Please let it live. – user14108 Oct 1 '13 at 1:09
• @NicolasEssis-Breton: :-). – copper.hat Oct 1 '13 at 1:13

As the other answers state, there is no bijection. However, since you mention numerics, an approximation might be of interest:

The Lissajous curve $\begin{pmatrix}\sin(at+\delta)\\\cos(bt)\end{pmatrix}$ for an irrational ratio $a/b$, e.g. $a=1, b=\sqrt2$, is not closed and therefore maps $\mathbb R$ to a dense subset of $[0,1]^2$. Now take one of the usual $\mathbb [0,1]\to\mathbb R$ mappings, e.g. $t = \tan(\pi(u-\frac12))$ or $\operatorname{artanh}(2u-1)$, to obtain a map from $[0,1]$ to a dense subset of $[0,1]^2$. Now I wonder if there is an analysical formula to obtain the $t$ best approximating a given $(x,y)$...

• Downvoted. The question is about continuous bijective maps, and you discuss an example which is neither injective, nor surjective, nor continuous. – D. Thomine May 5 '18 at 9:51
• @D.Thomine That's up to you. I saw no point in repeating what the others already stated, namely that there is no bijective map. I also fail to see how the approximation I proposed is not injective. And concerning continuity, I think there is a problem in even defining that properly when you go from one dimension to two... – Tobias Kienzler May 6 '18 at 8:49

Answering this, as a new duplicate was recently closed. I was trying to construct an as elementary proof as possible but...

I think that in order to use the fact that the inverse would also have to be continuous, we will have to use the fact that both domain and range are compact and Hausdorff, together with the respective result on continuity of the inverse of a bijection (see robjohn's answer).

Maybe the above can still be obtained in a more elementary way, so let us proceed:

Assume that we know the inverse $f^{-1}$ of such a function would be continuos, thus open subsets of $\left[0,1\right]$ would have an open preimage with respect to $f^{-1}$:

Specifically the image $C\;:=\;f\left(\left(0,1\right)\right)$ would be open in $B\;:=\;\left[0,1\right]\times\left[0,1\right]$. The complement of $\left(0,1\right)$ in $\left[0,1\right]$ only contains the two points $0$ and $1$. These would have to be bijectively mapped to the complement of $C$ in $B$ which however contains more than $2$ points. Contradiction.

EDIT: I think I came about what could qualify as an "elementary" proof:

Consider the preimage of $J\,:=\,\left(0,1\right)\times\left(0,1\right)$. As $f$ is continuous, this preimage is open: $f^{-1}\left(J\right)=\left(a,b\right)\,=:\, I$ with $0<a<b<1$. The set $\left[0,1\right]\backslash I$ thus consists of two disjoint compact intervals, namely $A\,:=\,\left[0,a\right]$ and $B\,:=\,\left[b,1\right]$. As $f$ is supposed to be a continuous bijection, the set $K\,:=\,\left(\left[0,1\right]\times\left[0,1\right]\right)\backslash J$ is the disjoint union of the two images of $A$ and $B$ under the mapping $f$: $K=f\left(A\right)\,\biguplus\, f\left(B\right)$. However as $f$ is continuous, $f\left(A\right)$ and $f\left(B\right)$ are both connected and compact, thus such a partition of $K$ cannot exist. Contradiction.

• Why is the preimage of $J$ doomed to be an interval? – Michael Hoppe May 16 '18 at 10:14