# Convert Arrays of Reals into an Equivalent Array of Complex

Given a collection of $n$ real number arrays of length $m$, for example:

$$[r_{11},\ \dots, r_{1m}]$$ $$\vdots$$ $$[r_{n1},\ \dots, r_{nm}]$$ is it possible to transform the entire collection into one equivalent complex number array of length $m$, for example, $[c_1,\ \dots, c_m]$?

Also, the solution should be the same regardless of the row order in the collection.

-
What do you mean by "equivalent" here? – Henning Makholm Feb 15 '12 at 1:39
What do you mean by "transform"? There is indeed a bijection between the sets you have indicated. – Jim Belk Feb 15 '12 at 1:45
In fact, you can compress everything into a single real number by using Cantor's interlace-the-decimals trick. The result will not make much arithmetic sense, but that doesn't seem to be part of your specification. – Henning Makholm Feb 15 '12 at 1:51
What's a "real number array"? That expression combines a mathematical term ("real number") and a computer term ("array") and doesn't make sense the way those terms are usually used in those fields, since computers can't store arbitrary real numbers. Do you mean an array on a computer or just a tuple of real numbers? – joriki Feb 15 '12 at 2:32
I take it that you're probably then also thinking of a pair of floating point numbers when you write "complex number". In that case, the answer for $n\gt2$ is "no", since the array of "complex numbers" has only as many bits as two arrays of "real numbers", and the "information content" is given by the number of bits. For $n=2$ the answer is "yes" since you can combine $r(0,k)$ and $r(1,k)$ into $c_k$. – joriki Feb 15 '12 at 11:09

• Yes if $n=1$, because a real number is also a complex number.
• Yes if $n=2$, because a pair of real numbers $r(0,k)$ and $r(1,k)$ can be represented by one complex number.
• No if $n>2$, because there is no natural way to represent three or more real numbers as a single complex number (unnatural ways include mashing two single-precision numbers into double-precision, but this is silly, and does not go far.)