[Math] Prove that the interval $ \ [0,2)$ and $ \ [5,6) \cup [7,8)$ have the same cardinality

cardinalselementary-set-theoryfunctionsgraphing-functions

Question:

Prove that the interval $[0,2)$ and $[5,6) \cup [7,8)$ have the same cardinality by constructing a bijection between the two sets. You can add a graph to support your argument.

I tried graphing a function with domain $[0,2)$ and target space $[5,6) \cup [7,8)$ but I can't come up with an explicit formula. Will the function be linear?

Best Answer

Essentially we want to map part of $[0,2)$ injectively onto $[5,6)$ and similarly the rest onto $[7,8)$. We will map $[0,1)$ onto $[5,6)$ and $[1,2)$ onto $[7,8)$ in the natural way; namely, we define $f:[0,2)\to[5,6)\cup[7,8)$ by $$ f(x) = \begin{cases} 5+x & \text{if}\ x\in[0,1), \\ 6+x & \text{if}\ x\in[1,2). \end{cases} $$ It remains to show that this function is both one-to-one and onto.

Related Question