Can this continuous function be injective? I've found very nice problem in math analysis book but I can't solve it:

We define
$c$ function as $c : \mathbb{I^2} \rightarrow \mathbb{R}$ and
$\mathbb{I^2}$ means closed square in $\mathbb{R^2}$ with vertices $( \pm 1, \pm 1)$.
Is it true that continuous function $c$ can be injective?

How can I solve this problem?
 A: A continuous map maps a compact set on a compact set, and a connected set on a connected one. The compact connected subsets of $\Bbb R$ are closed intervals. If $c(\mathbb{I}^2)=[a,b]$, take $t=\frac{a+b}2\notin\{a,b\}$ since $c$ is injective then define 
$$c'\colon \mathbb{I}^2\setminus c^{-1}(\{t\})\to [a,b],$$ 
we can see that $\mathbb{I}^2 \setminus c^{-1}(\{t\})$ is connected, but $c'$ doesn't map it to a connected set. 
A: Let $a:=f(0,0)$. If $f$ were injective then the functions $$f_1:\ s\mapsto f(s,0)\ , \qquad f_2:\ t\mapsto f(0,t)$$
would be continuous and strictly monotone. Their image sets would be intervals containing $a$ in their interior, contradicting the injectivity of $f$.
A: Suppose that such an $f$ exists. For each $x\in\Bbb I$ let $J_x=\{x\}\times\Bbb I$, and let $K_x=f[J_x]$. Each $J_x$ is compact and connected, so each $K_x$ is a compact, connected subset of $\Bbb R$. The only such sets are closed intervals, so for each $x\in\Bbb I$ there are $a_x,b_x\in\Bbb R$ such that $K_x=[a_x,b_x]$. Since $f$ is injective, $a_x<b_x$, and the open intervals $(a_x,b_x)$ for $x\in\Bbb I$ are pairwise disjoint. But $\Bbb R$ is separable and therefore ccc space, so it does not have an uncountable family of pairwise disjoint non-empty open sets. This contradiction shows that such an $f$ does not exist.
