Prove cardinality

Let $V = \{x \in \mathbb{R} | 2 < x < 5\}$. Prove that $S$ and $V$ have the same cardinality, where $S$ denotes the set of real numbers between $0$ and $1$.

The part I don't get is where my book says to define $h: S\rightarrow V$ as follows: $h(x) = 3x+2$ for all $x \in S$.

Where does this equation come from? It seems very random to me.

• What's the most obvious bijection between $(0, 1)$ and $(0, 3)$? Now observe that $(2, 5)$ is of length $3$. Shouldn't there be a bijection pretty similar to the first one? What is it? – Jack M Nov 15 '13 at 11:48

It's just a linear transformation from $(0,1)$ to $(2,5)$.
In general, if you want map a domain from $x\in(0,1)$ to $y\in(a,b)$, you can use the formula $y = {(b-a)}x + a$
The equation is not random at all. The mapping itself will send the upper and lower bounds from $S$ to $V$, since $$h(0)=3(0)+2=2$$ $$h(1)=3(1)+2=5$$ Now the job is to show that the mapping $h$ is a bijection and this will in turn prove that the sets have the same cardinality.