Show $(a, b)$ has the same cardinality as $\Bbb R$ for any interval $(a, b)$.
From the previous chapters of the book (Understanding Analysis by Stephen Abbott), I know that $(-1,1)$ has the same cardinality as $\Bbb R$. I am willing to know is there any systematic way to show this or I have to guess some function $f: (a,b)\to(-1,1)$ that is 1-to-1 and onto?
A straight line joining the points $(a,b)$ and $(-1,1)$ will work.
$f(x)=1+\frac{b-1}{a+1}(x+1)$\