# Prove two sets have same Cardinality by writing down bijection

a. Prove that the interval $A = [1,3]$ has the same cardinality as $B = [1,5]$ by writing down a bijection from $A \to B$. Don't prove it is a bijection.

b. Consider the following infinite set: $A = {1, \frac{1}{2}, \frac{1}{3}, \frac{1}{4},..., \frac{1}{n}}$, Prove the set $A$ has the same cardinality as the integers by writing down a . bijection from $A$ onto $Z$.

I don't know how to find a function that is a bijection from one set to another. Can anyone help by explaining the thought process behind it, I've been having trouble with these types of problems? Thanks.

• For a., consider a function like $f(x) = cx$ for some particular constant $c$. Nov 17, 2015 at 23:33
• @BrianO: The intervals start at $1$ (instead of $0$), so you might need $f(x) = cx + d$. Nov 17, 2015 at 23:40
• @Niklas Well, sure, that's true. But I wasn't giving an answer, just a starting point. Nov 17, 2015 at 23:43

Hint for a. We want to use simple functions. Let's use a linear function $f: A \to B$. Find a linear function
$$f(x) = ax + b$$
such that $f(1) = 1$ and $f(3) = 5$.
Hint for b. Can you find a bijection $g: A \to \mathbb{N}$? And do you remember a bijection $h: \mathbb{N} \to \mathbb{Z}$? Then you can simply combine those and obtain a bijection $h \circ g: A \to \mathbb{Z}$.