Prompt
Let $a,b,c,d \in \mathbb R$ with $a < b $ and $c<d$.
Show that $[a,b]$ has the same cardinality as $[c,d]$.
Likewise, $(a,b)$ has the same cardinality as $(c,d)$.
My Solution
I try to show they are the same cardinality by constructing a bijection. Let $A=[a,b]$ and $B=[c,d]$: $$f:A\rightarrow B\\ f = \{ (x,y) \in A\times B: y=\frac{d-c}{b-a}(x + a) - c\}.$$ I thought of this function by imagining the two real sets as snippets of a line with a slope $\frac{b-a}{d-c}$ and the $x$ is offset by $a$, while the $y$ is offset by $c$.
Does this make sense? Is there an easier way?
I think you have the right thing in your mind. However, the function should be
$$y=\frac{d-c}{b-a}(x - a) + c$$
It maps, $a$ to $c$ and $b$ to $d$.