TITLE: Homeomorphism of the real line-Topology
QUESTION [15 upvotes]: I need to show that any open interval is homeomorphic to the real line.
I know that $f(x)=a+e^x$ will work for the mapping $f:R \to (a,\infty)$ and $f(x)=b-e^{-x}$ will work for the mapping $f:R \to (-\infty,b).$
Without using two functions, how can I prove the result in general?

REPLY [13 votes]: You've already been given two possible homeomorphisms, but how about another one?
Say that you have two maps $\varphi : A \to B$ and $\psi : B \to C$, both of which are homeomorphisms.  It's clear that $\psi \circ \varphi : A \to C$ is again a homeomorphism.
Using this fact, choose your favorite finite open interval $(a,b)$, and prove it is homeomorphic to $\mathbb{R}$.
Next up, take an arbitrary open interval $(c,d)$, and construct a homeomorphism between this an $(a,b)$, and voila, you are done.
In particular, look at the interval $(0,1)$, and its image under the function $\tan(\pi(x-\frac{1}{2}))$.  This is pretty clearly a homeomorphism.  Now just map an open interval to $(0,1)$ (homeomorphically), and call it a day.