Existence of an injective continuous function $\Bbb R^2\to\Bbb R$? Let's say $f(x,y)$ is a continuous function. $x$ and $y$ can be any real numbers. Can this function have one unique value for any two different pairs of variables? In other words can $f(a,b) \neq f(c,d)$ for any $a$, $b$, $c$, and $d$ such that $a \neq c$ or $b \neq d$? I don't think there can at least not if the range of $f$ is within the real numbers. Could someone please offer a more formal proof of this or at least start me off in the right direction.

If $f$ takes values in $\mathbb R$, then no, $f$ cannot be injective.
To see this, consider the function $$ g(t) = f(\cos t, \sin t) $$
which is continuous because it is a composition of continuous functions. If $f(1,0)=f(-1,0)$ then we know $f$ is not injective. Otherwise, since $g(0)=g(2\pi)$, by the intermediate value theorem the value $\frac{g(0)+g(\pi)}{2}$ must be attained for some $t_0\in(0,\pi)$ as well as for some $t_1\in(\pi,2\pi)$. But $(\cos t_0,\sin t_0)$ is a different point than $(\cos t_1, \sin t_1)$. so in this case $f$ is not injective either.

On the other hand, there are continuous injections $\mathbb Q^2\to\mathbb Q$. Namely, $(x,y)\mapsto x+\sqrt2 y$ injects $\mathbb Q^2$ continuously into $\mathbb Q+\sqrt2 \mathbb Q$, and this set is a countable dense linear order without first and last element and therefore order-isomorphic -- and thus homeomorphic -- to $\mathbb Q$.
