Could you show me some bijection between the #RR−QQ# and #RR#?

I was wondering if is there some "nice" bijective function that connects the irrationals and the reals. There must be some bijection, once that #RR# and #RR-QQ# has the "same size".

P.S: It doesn't need to be a continuous function.

1 Answer
Feb 13, 2018

Here's one...

Explanation:

I can explain it, though I don't have a formula just yet.

The rational numbers are countable, so we can define a sequence:

#a_0 = 0, a_1, a_2, ...#

enumerating all of #QQ#.

Then we can define a function #f(x): RR -> RR "\" QQ# as follows:

#f(x) = { (a_(2n + 1)sqrt(2) " if " x = a_n " for " n >= 0), (a_(2n)sqrt(2) " if " x = a_n sqrt(2) " for " n >= 1), (x " otherwise") :}#

This maps all rational numbers and all rational multiples of #sqrt(2)# to the set of all non-zero rational multiples of #sqrt(2)#.

This #f(x)# is a bijection between #RR# and #RR "\" QQ#