Show that open segment $(a,b)$, close segment $[a,b]$ have the same cardinality as $\mathbb{R}$ a) Show that any open segment $(a,b)$ with $a<b$ has the same cardinality as $\mathbb{R}$.
b) Show that any closed segment $[a,b]$ with $a<b$ has the same cardinality as $\mathbb{R}$.

Thoughts:
Since $a<b$, $a,b$ are two distinct real number on $\mathbb{R}$, we need to show it is 1 to 1 bijection functions which map between $(a,b)$ and $\mathbb{R}$, $[a,b]$ and $\mathbb{R}$.
But we know $\mathbb{R}$ is uncountable, so we show the same for $(a,b)$ and $[a,b]$?
and how can I make use of the Cantor-Schroder-Bernstein Theorem? The one with $|A|\le|B|$ and $|B|\le|A|$, then $|A|=|B|$?
thanks!!

Hint: $(a,b)\subseteq[a,b]\subseteq\Bbb R$ so you only need to show an injection from $\Bbb R$ into $(a,b)$. Then the Cantor-Bernstein theorem can work its magic. 
Show that every two open intervals have the same cardinality (exhibit a bijection between them), and so it is enough to show that there is an injection into $(0,1)$. Consider something along the lines of: $$x\mapsto\frac1{2+e^x}$$
