Examples of bijective map from R3→R

First, note that it is enough to find a bijection f:R2R, since then g(x,y,z)=f(f(x,y),z) is automatically a bijection from R3 to R.
Next, note that since there is a bijection from [0,1]R (see appendix), it is enough to find a bijection from the unit square [0,1]2 to the unit interval [0,1]. By constructions in the appendix, it does not really matter whether we consider [0,1], (0,1], or (0,1), since there are easy bijections between all of these.

Mapping the unit square to the unit interval

There are a number of ways to proceed in finding a bijection from the unit square to the unit interval. One approach is to fix up the "interleaving" technique I mentioned in the comments, writing 0.a1a2a3,0.b1b2b3 to 0.a1b2a2b2a3b3. This doesn't quite work, as I noted in the comments, because there is a question of whether to represent 12 as 0.5000 or as 0.4999. We can't use both, since then 12,0 goes to both 12=0.5000 and to 922=0.40909 and we don't even have a function, much less a bijection. But if we arbitrarily choose to the second representation, then there is no element of [0,1]2 that is mapped to 12, and if we choose the first there is no element that is mapped to 922, so either way we fail to have a bijection.
This problem can be fixed.
(In answering this question, I tried many web searches to try to remember the fix, and I was amazed at how many sources I found that ignored the problem, either entirely, or by handwaving. I never did find it; I had to remember it. Sadly, I cannot remember where I saw it first.)
First, we will deal with (0,1] rather than with [0,1]; bijections between these two sets are well-known, or see the appendix. For real numbers with two decimal expansions, such as 12, we will agree to choose the one that ends with nines rather than with zeroes. So for example we represent 12 as 0.4999.
Now instead of interleaving single digits, we will break each input number into chunks, where each chunk consists of some number of zeroes (possibly none) followed by a single non-zero digit. For example, 1200=0.00499 is broken up as 004 9 9 9, and 0.01003430901111 is broken up as 01 003 4 3 09 01 1 1.
This is well-defined since we are ignoring representations that contain infinite sequences of zeroes.
Now instead of interleaving digits, we interleave chunks. To interleave 0.004999 and 0.01003430901111, we get 0.004 01 9 003 9 4 9. This is obviously reversible. It can never produce a result that ends with an infinite sequence of zeroes, and similarly the reverse mapping can never produce a number with an infinite sequence of trailing zeroes, so we win. A problem example similar to the one from a few paragraphs ago is resolved as follows: 12=0.4999 is the unique image of 0.4999,0.999 and 922=0.40909 is the unique image of 0.40909,0.0909.
This is enough to answer the question posted, but I will give some alternative approaches.

Continued fractions

According to the paper "Was Cantor Surprised?" by Fernando Q. Gouveâ, Cantor originally tried interleaving the digits himself, but Dedekind pointed out the problem of nonunique decimal representations. Cantor then switched to an argument like the one Robert Israel gave in his answer, based on continued fraction representations of irrational numbers. He first constructed a bijection from (0,1) to its irrational subset (see this question for the mapping Cantor used and other mappings that work), and then from pairs of irrational numbers to a single irrational number by interleaving the terms of the infinite continued fractions. Since Cantor dealt with numbers in (0,1), he could guarantee that every irrational number had an infinite continued fraction representation of the form
where x0 was zero, avoiding the special-case handling for x0 in Robert Israel's solution.

Cantor-Schröder-Bernstein mappings

The Cantor-Schröder-Bernstein theorem takes an injection f:AB and an injection g:BA, and constructs a bijection between A and B.
So if we can find an injection f:[0,1)2[0,1) and an injection g:[0,1)[0,1)2, we can invoke the CSB theorem and we will be done.
g is quite trivial; xx,0 is one of many obvious injections.
For f we can use the interleaving-digits trick again, and we don't have to be so careful because we need only an injection, not a bijection. We can choose the representation of the input numbers arbitrarily; say we will take the 0.5000 representation rather than the 0.4999 representation. Then we interleave the digits of the two input numbers. There is no way for the result to end with an infinite sequence of nines, so we are guaranteed an injection.
Then we apply CSB to f and g and we are done.


  1. There is a bijection from (,) to (0,). The map xex is an example.
  2. There is a bijection from (0,) to (0,1). The map x2πtan1x is an example, as is xxx+1.
  3. There is a bijection from [0,1] to (0,1]. Have 012,1223,2334, and so on. That takes care of {0,12,23,34,}. For any other x, just map xx.
  4. Similarly, there is a bijection from (0,1] to (0,1).


Post a Comment

Don't Forget to comment

About Me

My photo

HI i am mohammed  a Embedded Software Developer ,SEO specialist,Electronic engineer   Read more