I have an exercise that asks to show that: (i) two closed bounded intervals in $\mathbb{R}$ are homeomorphics; (ii) two open intervals in $\mathbb{R}$ are homeomorphics.
I began naturally by (i), trying to show a mapping that is a homeomorphism between the two intervals. I tried to construct a linear mapping \begin{align} f : [a,b] &\rightarrow [c,d] \\ x &\mapsto (\frac{d-c}{b-a})x+ (c-a\frac{d-c}{b-a}) \end{align} which is clearly inversible and bijective. But then I got to (ii) and I don't know what is the difference of considering open intervals instead of closed, bounded ones. Is what I am doing right? What is the difference between the two cases?