a one-to-one and onto function that cannot be continuous I'm reading Torchinsky's Real Analysis, and am having difficulty demonstrating   if
$$\varphi : [0,1]^2 \rightarrow [0,1]$$ is one-to-one and onto, then it cannot be continuous. (5.13)
Unable to demonstrate this myself, I did some research and found what seems to a proof: 
"Suppose such a function exists $$\varphi : [0,1]^2 \rightarrow [0,1]$$ 
Now, $[0,1]^2 \setminus\{\varphi^{-1}(1/2)\}$ is connected (since $\varphi$ is a bijection we are just removing one point from the square) and by properties of continuous functions we know that $\varphi$ maps connected sets to connected sets (cf. Rudin 4.22) . But $$\varphi\left([0,1]^2 \setminus\{\varphi^{-1}(1/2)\}\right) = [0, 1/2)\cup(1/2, 1]$$ which is not connected, hence no such map can exist."
What is unclear to me: removing point from the domain introduces a discontinuity in the codomain since the function is onto, but how does this prove the assertion for the domain in question: $$ [0,1]^2 \text{ ?}$$
 A: The proof is saying that if $\phi$ is a continuous bijection from $[0,1]^2$ to $[0,1]$, then $\phi$ must satisfy a certain property.  The proof simply uses $[0,1]^2 \setminus \{\phi^{-1}(1/2)\}$ to show that $\phi$ can't possibly have this property.
Here's a breakdown:


*

*Let $\phi : [0,1]^2 \to [0,1]$ be an arbitrary continuous bijection.

*Because $\phi$ is a bijection, there is a unique point in $[0,1]^2$ such that $\phi^{-1}(1/2)$ corresponds to that point.  So we'll just call it $\phi^{-1}(1/2)$ for clarity.

*Note that $[0,1]^2 \setminus \{\phi^{-1}(1/2)\}$ is connected because it's a square minus one point.

*The continuous image of a connected set is connected.  Note that this also means $\phi$ must map any connected subset of $[0,1]^2$ to a connected subset of $[0,1]$.

*Therefore, $\phi\left([0,1]^2 \setminus \{\phi^{-1}(1/2)\}\right)$ must be connected.

*But because $\phi$ is a bijection, $1/2 \notin \phi\left([0,1]^2 \setminus \{\phi^{-1}(1/2)\}\right)$.

*So then $\phi\left([0,1]^2 \setminus \{\phi^{-1}(1/2)\}\right) = [0,1/2) \cup (1/2, 1].$

*$[0,1/2) \cup (1/2, 1]$ is not connected.

*This shows that if $\phi$ is any continuous bijection from $[0,1]^2$ to $[0,1]$, then it will map a connected set to a disconnected set.  This is a contradiction.  Therefore there can't possibly be a continuous bijection from $[0,1]^2$ to $[0,1]$.

A: We assumed the existence of such a function $\varphi$, did some work to arrive at a contradiction (in particular, the existence of a continuous map that maps a connected set to a set that is not connected). Therefore the assumption was not consistent.
The author might have meant $\varphi$ instead of $\varphi^{-1}$. That might have caused confusion.
