# Let $(a,b)$ and $(c,d)$ be intervals in $\Bbb R$, and find an injective and surjective function from $(a,b)$ to $(c,d)$

So here is this question I got stuck on:

Let $(a,b)$, $(c,d)$ be intervals (not sure if that's the correct term) on $\Bbb R$, so that $a<b$, $c<d$. Find an injective and surjective function $f:(a,b)\rightarrow(c,d)$.

P.S. I get these question a lot. Is that some way of thinking, or some general method I should follow to make these question easier for me to solve?

-
Interval is correct. –  Git Gud Apr 20 '13 at 12:57

Edit: It's not supposed to be a square.

-
I see. Thank you for your constant help! –  ohad Apr 20 '13 at 13:02
Congratulations for the 5k! And wow, I have exactly the same score right now. –  azimut Apr 20 '13 at 13:03
@ohad No problem. –  Git Gud Apr 20 '13 at 13:03
@azimut Thank you and congrats :) –  Git Gud Apr 20 '13 at 13:04

Hint

Try a function of the form $x \mapsto sx + t$ with $s,t\in\mathbb R$.

-