(in)exactness of complex numbers

David C. Ullrich ullrich at math.okstate.edu
Mon Aug 6 10:15:54 EDT 2001


On Mon, 6 Aug 2001 07:18:56 +0000 (UTC), Michael Abbott
<michael at rcp.co.uk> wrote:

>Michael Ackerman <ack at nethere.com> wrote in 
>news:mailman.996787686.29273.python-list at python.org:
>
>> 
>> 
>> "David C. Ullrich" wrote:
>> 
>>> Exactly what definition of
>>> "complex number" do you have in mind here?
>>> The _standard_ definition _is_ "pair of real numbers".)
>> 
>> If you define the complex numbers C as pairs of reals, you have given at
>> most its structure of real vector space. Then you must define
>> multiplication and prove that what you have is actually a ring. But if
>> you define C as the quotient ring R[X]/(X^2+1), then you needn't do
>> anything more. This definition is often used, e.g. in MacLane &
>> Birhkoff's "Algebra", the most categorically oriented basic algebra
>> text.  
>> 
>> -- Michael Ackerman
>
>
>Actually, this is kinda amusing: I thought I'd try writing a Complex class 
>using the representation above (ie, the value of a complex number is a 
>polynomial, and equality is modulo X^2+1); in this case the only real 
>complexity (sic) is implementing equality and division by quotienting by 
>X^2+1 -- but then I realised that I might as well quotient my 
>representation by X^2+1 throughout.
>    Then, surprise, surprise, it turns out that we recover the standard 
>(real,imaginary) presentation of reals.  Of course this isn't all that 
>surprising, given that X is there precisely to represent the root of 
>X^2+1=0.

No, it's not even one teensy bit surprising to me, sorry. I was
actually going to point out that this is what would probably happen at
one point, decided there wasn't much point to going on about it.

Why "probably": Of course it's impossible to use the mathematical
R[X]/(X^2+1) literally; the elements are equivalence classes of
polynomials, in particular a complex number is an infinite set
of polynomials, and hence would take too much storage space.

That's one version of "implement as R[X}/(X^2+1)", anyway. That's
so obviously impossible that what one does instead is say that a
complex is a polynomial, except that operations and equality
are all just "mod X^2 + 1", as you say. But now we have all these
different polynomials that all represent a given complex number;
if we're talking about internal representations it's hard to
see why we don't just choose the simplest one to use as a
representative, if we can decide what the simplest one is.
Here there _is_ a natural choice of one polynomial to use
from each equivalence class, but if you use that one your
complex numbers have become precisely pairs of reals.

(Hence the "probably": A person _could_ use a representation
as above without choosing special representatives from each
equivalence class... hard to see why one would. And then
when one compares two complexes for equality one is going
to be calculating real and imag with each comparison 
enyway... similarly for division.)

You've discovered that those two definitions are equivalent.


David C. Ullrich



More information about the Python-list mailing list