# Is there a bijection from [0,1] to R?

I'm looking for a bijection from the closed interval [0,1] to the real line. I have already thought of $\tan(x-\frac{\pi}{2})$ and $-\cot\pi x$, but these functions aren't defined on 0 and 1.

Does anyone know how to find such a function and/or if it even exists?

• $f(x)=x$ defines an injective function $[0,1]\to\mathbb R$. It is not surjective, though. Did you mean to ask for a bijection rather than an injection? – hmakholm left over Monica Nov 24 '16 at 17:28
Use Did's method here to construct a bijection $[0,1] \to (0,1)$. Play around with $\tan$ for a bijection $(0,1) \to \mathbb{R}$
Note that any bijection cannot be continuous. This is because $[0,1]$ is compact.
A continuous bijection can't exists because $[0,1]$ is a compact set and continuous functions send compacts in compacts. You can look for a non-continuous bijection, that exists because $[0,1]$ and $\mathbb R$ have the same cardinality. It follows from Cantor-Bernstein theorem, that states "given two sets $A, B$ if exist two injective functions $f:A\rightarrow B \ g:B\rightarrow A$" than exists a bijective function $h:A\rightarrow B$".