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.
 A: 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.
A: 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.
A: 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)$...
A: 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.
A: 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.
