Proof that a subset of R has same cardinality as R I am sitting with a task where I have to prove the following:
Claim:
Every subset of $\mathbb{R}$, that contains an interval $I$ with $a < b$, has the same cardinality as $\mathbb{R}$.
So I think that I should prove that there exist a bijection from $I$ to $\mathbb{R}$? I'm kinda lost, and don't know how to start.
There is a lemma 3 in the book saying:
Let $a,b \in \mathbb{R}$ with $-\infty\neq  a < b \neq \infty$. There exist a $f\colon ]-1; 1[ \to ]a; b[$ that is bijektiv. The intervals $]-1; 1[$ and $]a; b[$ has same cardinality.
Another lemma 4 says:
$f\colon ]0; 1[ \to ]1; \infty[$, $x\to \frac{1}{x}$, is bijective. The intervals $f\colon ]0; 1[ \to ]1; \infty[$ have same cardinality.
(There is an image added to lemma4)

The above interval $]-1; 1[$ has same cardinality as $\mathbb{R}$, and the $f$ is bijective
Any help is highly appreciated
 A: Hints:
First prove that any two non-empty open intervals have the same cardinality.
Second, pass now to use the nice interval $\;(-\pi/2\,,\,\pi/2)\;$ and a rather nice, simple trigonometric function to show equipotency with $\;\Bbb R\;$
A: For a bijection from $I$ to $\mathbb R$ chose
$$f: (a,b) \to (-1,1), \qquad x\mapsto 2\frac{x-a}{b-a} - 1$$
which is (obviously) bijective. Then
$$g: (-1,1) \to \mathbb R, \qquad \begin{cases}\frac{1}{x} - 1&x\in(0,1)\\0&x=0\\\frac{1}{x} + 1&x\in(-1,0)\end{cases}$$
(Taken from Lemma 4)
$$h := g\circ f : (a,b) \to\mathbb R$$
is bijective as a composition of bijective maps.
A: No one has pointed out yet that to prove the statement of the OP (where a subset contains an interval), you're also going to need to invoke the theorem that bears the names Cantor, Schroeder, and Bernstein (in some order or other). 
The idea is to construct an injection from $\mathbb{R}$ into the subset $S$ by injecting it into an interval $(a, b)$ inside $S$ (the other answers describe how to do this), and of course we have an injection from $S$ into $\mathbb{R}$ given by subset inclusion. Then apply the Cantor-Schroeder-Bernstein theorem, which says that if there is an injective function $f: A \to B$ and an injective function $g: B \to A$, then there exists a bijection $\phi: A \to B$. 
