TITLE: Injective function from $\mathbb{R}^2$ to $\mathbb{R}$?
QUESTION [9 upvotes]: Is there an injective function $f :\mathbb{R}^2\rightarrow\mathbb{R}$?
I approached this problem from the perspective of $f^{-1}$, from which I showed there exists a surjective function $f^{-1}:\mathbb{R}\rightarrow\mathbb{R}^2$. Would this imply that there exists an injective function for the inverse mapping?

REPLY [8 votes]: Let's construct an injective function $f : (0,1) \times(0,1) \to (0,1)$. Since there exist bijections between $\mathbb{R}$ and $(0, 1)$, the proposed function $f$ is sufficient to prove the existence of an injective function from $\mathbb{R}^2$ to $\mathbb{R}$.
Let the decimal representation of $x$ be $0.x_1x_2x_3\cdots$, and that of $y$ be $0.y_1y_2y_3\cdots$. Let $f(x, y)$ be $0.x_1y_1x_2y_2x_3y_3\cdots$.
To make this function well-defined, we should avoid decimal representations that end with infinite successive $9$s. Once this is taken care of, it's easy to show that this function is injective.