Prove or Disprove : There exists a continuous bijection from $\mathbb{ R}^2$ to $\mathbb{R} $ This question was asked to me by a mathematics undergraduate to me and I was not able to solve it. So, I am asking it here.

Prove or Disprove : There exists a continuous bijection from $\mathbb{ R}^2$ to $\mathbb{R} $ .

I have no idea on how this problem can be tackled. It seems it has something to do with set theory but I only know elementary set theory( bijection from naturals) and  I am unable to solve it.
 A: Stronger result: Suppose $f:\mathbb R^2\to \mathbb R.$ Define $V_x$ to be the vertical line $\{x\}\times \mathbb R.$ Assume that $f$ is continuous on each $V_x,$ (i.e., $f(x,y)$ is continuous in $y$ everywhere), and that the collection $\{f(V_x):x\in \mathbb R\}$ is pairwise disjoint.
Claim: $f$ is constant on all but countably many  vertical lines.
Proof: Let $$E=\{x\in \mathbb R: f \text{ is nonconstant on }V_x\}.$$ Then $f(V_x)$ is an interval of positive length for $x\in E.$ These intervals are pairwise disoint. Thus there can be no more than countably many of them (each such interval contains a rational, there are only countably many rationals). This is the desired result.
A: The answer is NO!
If possible let $f :\Bbb R^2 \to \Bbb R$ be your continuous bijection.
Take any two points say $p,q \in \Bbb R^2$. Join them by a straight line segment say $l_{p,q}$ and then look at $f(l_{p,q})$. You can parametrize your $l_{p,q}$ from some $[a,b] \subset \Bbb R$ by some $\gamma$ . Then look at $f \circ \gamma :[a,b] \to \Bbb R$, it's a contiuous function from $\Bbb R \to \Bbb R$ and hence by the intermediate value theorem you get that every point in the connected segment $[f(p),f(q)]$ has a pre-image on $l_{p,q}$.
But $l_{p,q}$ isn't anything special! Same argument holds for any non self-intersecting path joining $p,q $ in $\Bbb R^2$. But then you realize that there are infinitely many non self-intersecting paths in $\Bbb R^2$ which are each disjoint to all the other ones except at the end-points $p,q$. Hence every interior point in $[f(p),f(q)]$ has infinitely many pre-images!
So, I am just trying to show that any continuous function $ \Bbb R^2 \to \Bbb R$ is so far from being injective! Uncountably many disjoint paths get mapped to every interval and every point has uncountably many pre-images!
A: Suppose $f:\Bbb R^2\to \Bbb R$ is a continuous injection.  Let $S=[0,1]^2$ and $T=[1/3,2/3]^2.$ Each of $S,T$ is compact and  connected so their images $f[S], f[T]$ are compact and  connected.
$(\bullet)\,$ So $f[S]$ and $f[T]$ are closed bounded real intervals.
Now $f|_S: S\to f[S]$ is a continuous bijection from the compact Hausdorff space $S$ to the compact Hausdorff space $f[S]$ so $f|_S:S\to f[S]$ is a homeomorphism.
Therefore $f$ maps the boundary of $T$ in the space $S$ to the boundary of $f[T]$ in the space $f[S].$
But the boundary of  $f[T]$ in the space $f[S]$ contains just 2 points by $(\bullet)$ and the boundary of $T$ in the space $S$ is infinite, and $f$ is 1-to-1, which is absurd.
A: The standard argument that $\mathbb{R}^2$ is not homeomorphic to $\mathbb{R}$ works just as well to show that there is no continuous bijection $\mathbb{R}^2\to \mathbb{R}$.
Suppose such a continuous bijection $f$ exists. If we remove a point $p$ from $\mathbb{R}$, it becomes disconnected. The preimages of the disjoint open sets $(-\infty,p)$ and $(p,\infty)$ will be disjoint open subsets of $\mathbb{R}^2$ whose union is $\mathbb{R}^2\setminus \{f^{-1}(p)\}$. But this implies that $\mathbb{R}^2$ minus a point is disconnected, which is a contradiction, since $\mathbb{R}^2$ minus a point is path connected.
It is also true that there is no continuous bijection $\mathbb{R}\to \mathbb{R}^2$, but the proof is a bit harder - I don't know a way of proving this that doesn't use the Baire category theorem. See this answer and also this answer.
