# Does there exists a continuous surjection from $\mathbb{R}$ to $\mathbb{R}^2$?

I constructed a bijection by using decimal expansions of two real numbers and taking numbers 1 by 1 consecutively. (It took me hours to come up with this). I remember someone saying appealing to some sort of expansion is the only way to do this, and I think this type of method can never be continuous. Is there anyway to prove that no such function exists?

-
I don't know, but continuous is probably too weak as a condition. In fact there is the Peano curve, which is an example of continuous surjection $[0,1] \to [0,1] \times [0,1]$. –  Andrea Apr 10 '13 at 12:23
This doesn't answer your question, but... "I constructed a bijection by using decimal expansions of two real numbers and taking numbers 1 by 1 consecutively." -- this is reminiscent of a trap I fell down when trying to solve this problem for the first time. Make sure you didn't assume that $\mathbb{R}$ is countable or anything like that! –  Clive Newstead Apr 10 '13 at 12:23
To expand on Willie Wong's link, the Peano curve $[0,1]\rightarrow [0,1]\times[0,1]$ can easily be extended to a continuous surjection $(0,1)\rightarrow\mathbb{R}^2$. Or in your case, by a composition by homeomorphism on the domain, a continuous surjection $\mathbb{R}\rightarrow\mathbb{R}^2$. –  Daniel Rust Apr 10 '13 at 13:11
–  Douglas B. Staple Apr 10 '13 at 13:16

Yes, there exists a continuous surjection from $\mathbb R$ to $\mathbb R^2$. The following is a simple way to construct one, although there should be more elegant constructions. Let $f:[0,1]\to[-1,1]^2$ be a spacefilling curve which starts and ends at the origin, for example the Sierpinski curve (although one could of course start with any space-filling curve $[0,1]\to[0,1]^2$, obtain a new space-filling curve $[0,1]\to[-1,1]^2$ by translation and scaling, and then append paths to the beginning and end of the curve to make it start and end at the origin). By scaling, we can define a space-filling curve $g_n:[0,1]\to[-n,n]^2$ by $g_n(x)=nf(x)$ for any integer $n>0$, which starts and ends at the origin. We can now define a space-filling curve from $[0,\infty)$ to $\mathbb R^2$ by first walking along the curve $g_1$, then walking along the curve $g_2$, then walking along the curve $g_3$, and so on. This is a continuous curve and it passes through every point of $(x,y)\in \mathbb R^2$ since for every $(x,y)$ there exists an $n>0$ such that $(x,y)\in[-n,n]^2$.
To be explicit, the curve $F:\mathbb R\to\mathbb R^2$ defined by $F(x)=0$ if $x<1$, and $F(x)=g_n(x-n)$ if $x\in[n,n+1)$, is a continuous surjection.
Hey Samuel! You say one could start with a space-filling curve $[0,1]\to[0,1]^2$ and obtain a new space-filling curve $[0,1]\to[-1,1]^2$. I don't understand how exactly this is done. Could you please elaborate? –  rehband Oct 21 at 14:13
@rehband: Consider the square $S=[0,1]^2$. Move it a distance $1/2$ to the left and another distance $1/2$ down, so that it is centered about the origin, and then scale it by a factor $2$ so that it becomes twice as large. Then you have obtained the square $2(S-(1/2,1/2))=[-1,1]^2$. Thus you should be able to convince yourself that if $f:[0,1]\to[0,1]^2$ is space-filling, then $g:[0,1]\to[-1,1]^2$ is spacefilling, where $g(t)=2(f(t)-(1/2,1/2))$. –  Samuel Oct 21 at 18:13
@rehband: Append a path from the origin to the starting point of the Peano curve and append a path from the ending point of the Peano curve to the origin. So if $f:[0,1]\to[-1,1]^2$ is a Peano curve such that $f(0)=(-1,-1)$ and $f(1)=(1,1)$, then define $g:[0,1]\to[-1,1]^2$ by $g(t)=(-3t,-3t)$ if $t\in[0,1/3)$, $g(t)=f( 3(t-1/3) )$ if $t\in[1/3,2/3)$ and $g(t)=(3(t-2/3),3(t-2/3))$ if $t\in[2/3,1]$. Then $g$ will be spacefilling and start and end at the origin. –  Samuel Oct 22 at 14:38