Continuous injective map $f:\mathbb{R}^3 \to \mathbb{R}$?

I will present an answer which can be (in principle, at least) understood by anyone who knows single variable calculus and the definition of a continuous function $f: \mathbb{R}^n \rightarrow \mathbb{R}$. Then I will explain how to shorten the argument a little by using topological language.

Step 1: Let $f: [0,1] \rightarrow \mathbb{R}$ be a continuous function with $f(0) = f(1)$. Then there exist $x,y \in [0,1)$ such that $f(x) = f(y)$ and $x\neq y$.

Proof: We may assume $f$ is nonconstant. By the Extreme Value Theorem it assumes a minimum value $m$ and a maximum value $M$ with $m < M$. Let $x_m,x_M$ be such that $f(x_m) = m$ and $f(x_M) = M$. Without loss of generality $x_m < x_M$. By the Intermediate Value Theorem, every value in $(m,M)$ is assumed on the interval $(x_m,x_M)$. Moreover, because $f(1) = f(0)$, the function

$g: [x_M,1+x_m]: \rightarrow \mathbb{R}$ given by

$x \mapsto f(x)$, $x_M \leq x \leq 1$,
$x \mapsto f(x-1)$, $1 \leq x \leq 1+x_m$

is continuous, with $g(x_M) = M$, $g(1+x_m) = m$, so by the Intermediate Value Theorem takes every value in $(m,M)$ on the interval $(x_M,1+x_m)$, so that $f$ takes every value in $(m,M)$ on $(x_M,1) \cup (0,x_m) = [0,1] \setminus [x_m,x_M]$. Thus $f$ takes every value in $(m,M)$ at least twice and is not injective on $[0,1)$.

Step 2: Let $n$ be an integer greater than one, and let $f: \mathbb{R}^n \rightarrow \mathbb{R}$ be a continuous function. Then $g: [0,1] \rightarrow \mathbb{R}$ given by $g(t) = f(\cos(2\pi t),\sin(2\pi t),0,\ldots,0)$ is continuous with $g(0) = g(1)$, so by Step 1 there is $0 \leq t_0 < t_1 < 1$ such that $g(t_1) = g(t_2)$. That is, $f(\cos(2\pi t_1),\sin(2\pi t_1),0,\ldots,0) = f(\cos(2\pi t_2),\sin(2\pi t_2),0,\ldots,0)$, so $f$ is not injective.

Step 3: A softer, more topological version of this is as follows: let $f: \mathbb{R}^n \rightarrow \mathbb{R}$ be continuous. Seeking a contradiction, we suppose it is injective. Let $S^{n-1} \subset \mathbb{R^n}$ be the unit sphere. Since it is compact, the restriction of $f$ to $S^{n-1}$ gives a homeomorphism onto its image, which is a compact, connected subset of $\mathbb{R}$ hence a closed bounded interval $[a,b]$. If $a = b$ then $f$ is constant, hence not injective. Otherwise, observe that if we remove any one of the uncountably infinitely many points from $S^{n-1}$ we get a space homeomorphic to $\mathbb{R}^{n-1}$, which is connected if $n \geq 2$. However, there are only two points in $[a,b]$ whose removal leads to a connected space: the two endpoints. Contradiction!


Take two lines through the origin $\ell_1=tb_1,\ell_2=tb_2$ where $b_1,b_2 \in \Bbb{R}^3$. Then $g_i(t)=f(tb_i)$ are injective and continuous, and therefore strictly monotone. This proves that $f(\ell_1)\cap f(\ell_2)$ cannot equal a single point, therefore contradicting injectivity.


Another approach. Take $a,b \in \Bbb{R}^3$ such that $f(a)<f(b)$. Then the image of every bounded connected path between $a$ and $b$ must be the interval $[f(a),f(b)]$. This contradicts injectivity.


Suppose such an $f$ exists. Then, since $f$ is continuous, $f(\Bbb R^3)$ is a connected subset of $\Bbb R$ and hence, an interval $U$.

Also, since $f$ is one-to-one, the following two properties hold:

$\ \ $1) $U$ is not a singleton point,

and,

$\ \ $2) for each $a\in\Bbb R^3$, we have $f\bigl(\, \Bbb R^3\setminus\{a\}\,\bigr) = f(\Bbb R^3) \setminus \{\,f(a)\,\} =U\setminus\{\,f(a)\,\}$.

Now, by 1), we may (and do) choose $b\in\Bbb R^3$ such that $f(b)\in\text{Int}(U)$, where $\text{Int}(U)$ is the interior of $U$.

Then, by 2), $$ f\bigl(\, \Bbb R^3\setminus\{\,b\,\}\,\bigr) = U \setminus \{\,f(b)\,\}; $$ which is a contradiction, since $\Bbb R^3\setminus\{\,b\,\}$ is connected whilst $U \setminus \{\,f(b)\,\}$ is not.