# Is there a bijection from $(-\infty,\infty)$ to $[0,1]$?

Previous questions established, for example, that a continuous bijection $f:(0,1)\to [0,1]$ does not exist, but the proof relied on continuity. Clearly, with continuity similar proofs can be invoked to show there is no bijection $f:(-\infty,\infty)\to[0,1]$.

Similarly, one can show there is no order-preserving bijection: Suppose there were, then there is an $x\in(-\infty,\infty)$ such that $f(x)=1$. But there exists some $y\in(-\infty,\infty)$ such that $y>x$, and for a bijection this requires $f(y)>f(x)=1$, which is a contradiction.

But what if the bijection need not be continuous? Is there a bijection, or can you prove there isn't?

• Why do you tag this topology if there is no continuity involved? – Stefan Hamcke Dec 6 '13 at 18:33
• If you don't take topology into account, then "compact" becomes meaningless... – Najib Idrissi Dec 6 '13 at 18:33
• But note that an order-preserving bijection will be continuous and open - one can show that $f[(a,b)]=(f(a),f(b)).$ – Stefan Hamcke Dec 6 '13 at 18:36
• Thanks, I suspected order-preservation implies continuity if the domain has no "gaps". – Nameless Dec 6 '13 at 18:48
• @Nameless : this question or equivalent has probably been asked dozens of times on this forum. I don't feel like finding the duplicates right now. The easiest way to show a bijection exists is not by constructing one but by using the Canotr-Schroeder-Bernstein Theorem. – Stefan Smith Dec 6 '13 at 19:48

Without continuity there is a bijection.

Let $x_1=\frac{1}{2}, x_2=\frac{1}{3},.., x_n=\frac{1}{n+1},...$. Define $f(x_1)=1, f(x_2)=0, f(x_3)=x_1,..., f(x_n)=x_{n-2},..$ and $f(x)=x$ for all $x$ not in the sequence.

Then $f$ is a bijection from $(0,1)$ to $[0,1]$.

Now use the fact that $\frac{1}{2}+\frac{1}{\pi}\arctan(x)$ is a bijection from $(-\infty, \infty)$ to $(0,1)$.

• That is a bijection from $(0,1)$ to $[0,1]$. You still need to compose it with something like $\frac12+\frac{x}{2\sqrt{1+x^2}}$ to get a bijection from $(-\infty,\infty)$ to $[0,1]$. – robjohn Dec 6 '13 at 18:43

If you don't demand continuity then compactness is irrelevant. The question becomes a set-theoretic one and therefore the analytical/topological properties of the sets in question are irrelevant. In particular, there is a bijection between the two sets you mention, as can be shown using standard techniques of elementary set theory.

Hint: Try the Schroeder-Bernstein theorem.