Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I couldn't find a bijective map from $(0,1)$ to $\mathbb{R}$. Is there any example?

share|improve this question
Yes, and there's even one from (0,1) to R²... –  Axel Sep 21 '12 at 12:56

10 Answers 10

Here is a bijection from $(-\pi/2,\pi/2)$ and $\mathbb{R}$: $$ f(x)=\tan x. $$ You can play with this function and solve your problem.

share|improve this answer

$g(x)=\frac 1{1+e^x}$ gives a bijection from $\Bbb R$ to $(0,1)$, so take the inverse of this map.

share|improve this answer
And the inverse is $f(x)=\ln\left(\frac{1}{x}-1\right)$ –  celtschk Sep 21 '12 at 12:19

Yes. let $f(x)=\tan((x-1/2)\pi)$. the domain is $(0,1)$ and range is $\mathbb{R}$

share|improve this answer
Here is a more visual description of the same function (modulo a factor of $\pi$) Bend the line segment (0, 1) into a semicircle, with the open part facing upwards, and rest it on the real line (with 0.5 on the semicircle resting on 0 on the real line). To map a point on one line to a point on the other, draw a line through that point and the centre of the circle. The mapped point is where it intersects the other line. –  Max Sep 21 '12 at 10:10
Of course, knowing the domain and range simply guarantees that $f$ is surjective, but this $f$ does turn out to be injective, too. –  Cameron Buie Sep 21 '12 at 10:36

The trigonometric function $\tan x$ is an invertible function from $(-\pi/2,\pi/2)$ to $\mathbb{R}$. Also to find an invertible function from $(0,1)$ to $(-\pi/2,\pi/2)$ find the equation of the straight line joining the points $(0,-\pi/2)$ and $(1,\pi/2)$. Now compose the two functions together. You can likewise find bijections between any two open intervals and any open interval and $\mathbb{R}$.

share|improve this answer

For a less differentiable example, consider the bijection in the following picture, enter image description here

In symbols, given $x \in (0,1)$ let $n$ be the largest natural number such that $1-\frac{1}{n}<x$, define $$y=\frac{x-n}{\frac{1}{n}-\frac{1}{n+1}}$$ to be the renormalized version of $x$ if the interval $(1-\frac{1}{n},1-\frac{1}{n+1}]$ is rescaled and shifted to map to $(0,1)$. Then we have the following bijection: $$f(x)=\begin{cases}\frac{n-1}{2}+y,& n \text{ odd} \\ -\frac{n-2}{2}-y,& n \text{ even}\end{cases}$$

share|improve this answer
Not only less differentiable but also much less continuous. –  Stefan Geschke Sep 21 '12 at 10:15
(: One might even consider the composition $f \circ g$ with a nowhere continuous bijection $g:(0,1)\rightarrow (0,1)$. –  Nick Alger Sep 21 '12 at 10:27

Yes, see above answers. There are even bijective maps between $(0,1)$ and $\mathbb{R}^n$. To see this, note that a bijection $\phi$ between $(0,1)$ and $(0,1)^2$ can be made in this way: Let $x= 0.b_1b_2\ldots$, with $b_j$ being the digits in a decimal expansion. Define $$\phi(x) = (0.b_1b_3b_5\ldots,0.b_2b_4b_6\ldots),$$ i.e., extract even and odd digits. For $\phi^{-1}(x_1,x_2)$, let $x_1 = 0.a_1a_2a_3\ldots$, and $x_2=b_1b_2b_3\ldots$. Then, $$ \phi^{-1}(x,y) = 0.a_1b_1a_2b_2\cdots$$ Some care has to be taken with identification between digital expansions like $0.199999\cdots$ and $0.20000\cdots$, but that is an exercise.

Having the bijection between $(0,1)$ and $(0,1)^2$, we can apply one of the other answers to create a bijection with $\mathbb{R}^2$.

The argument easily generalizes to $\mathbb{R}^n$.

share|improve this answer
Actually you don't even have to generalize the argument: If you have the bijection between $(0,1)$ and $(0,1)^2$, you get a bijection from $(0,1)$ to $(0,1)^3$ by just applying the same bijection to one of the two factors of $(0,1)^2$. Of course the same way you get to $(0,1)^n$. –  celtschk Sep 21 '12 at 12:16

A homeomorphism (continuous bijection with a continuous inverse) would be $f:(0,1)\to\Bbb R$ given by $$f(x)=\frac{2x-1}{x-x^2}.$$

share|improve this answer
This is the answer you want. A direct map that just stretches the unit interval onto the (-inf,inf) interval. This shows you don't need an exotic function like the bijection between [0,1] and [0,1]^2. –  John Baber Sep 21 '12 at 12:17
No need for that 4... –  lhf Sep 21 '12 at 12:22
Fair point, @lhf. Not sure why I bothered with that.... –  Cameron Buie Sep 21 '12 at 17:21

Here is a nice one ${}{}{}{}{}{}{}{}{}$, can you find the equation? enter image description here fg fgf gf gdddddfgfdgfgdgfgdfg

share|improve this answer
That's really nice! –  Clive Newstead Sep 21 '12 at 12:26
Note: I would be interested in an explicit formula. –  The Chaz 2.0 Oct 21 '13 at 19:59
@The Chaz 2.0 If the diameter of the circle is 1 and the interval is $(0, 1)$ and 1/2 mapped to 0 and the distance between the center of the circle and the 2nd numberline is 1/2 then the formula is $f(x)=\frac{x-1/2}{\sqrt{x-x^2}}$. Becouse scaling does not matter you can multiply by 2 and get the formula $f(x)=\frac{2x-1}{\sqrt{x-x^2}}$, but i don't know how you can get Cameron Buie's formula, out of this. –  05storm26 Feb 2 at 8:31
I am thinking about: $f:(0,1)\to\mathbb{R}$, $f(x)=-\cot\left(\pi x\right)$ –  Darius Apr 22 at 19:58

$x \mapsto \ln (- \ln x)$ with the inverse $y \mapsto e^{-e ^ {\ y}}$. It's also a $C ^ \infty$ diffeomorphism.

share|improve this answer

By virtue of http://natureofmathematics.wordpress.com/lecture-notes/cantor/, here's another picture. The interval at the bottom is $\mathbb{R}$.

enter image description here

share|improve this answer
It's not clear to me which point on the circle is missed from the map described by the blue arrows. It looks like it could be some point between the images of the point $0$ and the point $1$, but then the map described by the red arrows from the circle to the real line is not a bijective map because that missed point has no preimage and so its image in the real line after the red mapping has no preimage in the interval. This is a poor picture. –  Daniel Rust Feb 18 at 12:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.