Bijection between [a,b) and [a,b] intervals. I need help with finding a bijection between these two intervals: [a,b) and [a,b]. It is told that a,b are in R (real numbers). I know how to construct a bijection if a,b are integers, but i have no idea how to do it if they are real. Any ideas?
Edit: If anyone is still watching, can you tell me if I'm doing this right?
So the bijection will be f(x) = 1) a if x = a and 2) b/p-1 if x != a and x = b/p , where p is in R - {0}.
By taking the p from R - {0} and not from N, I think this could work for real numbers.
Because a < b, every number from a to b can be written as b/p. So the function moves every number upwards if I express myself that way, thus reaching the b.
 A: It looks like you're confusing yourself by thinking that just because $a$ and $b$ are arbitrary reals, you must not mention $\mathbb Z$ or $\mathbb N$ anywhere in your construction. In particular, when you want to allow your $p$ to be an arbitrary nonzero real, you get yourself into something that's not easy to repair.
Instead partition the numbers in your intervals $[a,b)$ and $[a,b]$ into two classes:


*

*Numbers that can be written as $a+\frac{b-a}{n}$ for some $n\in\mathbb N$.

*All other numbers.


$b$ itself is in the first class (take $n=1$). Now make your bijection be the identity on the second class and shift everything one position in the first.
Even though $b-a$ can be irrational, there's nothing that prevents you from dividing it by a sequence of integers. You get more irrationals out of that, but that doesn't matter for this purpose -- the only important thing is that you get an infinite sequence of different real numbers inside the interval that you can shift by one position.
