HP Prime: Psuedo Ordering of Complex Numbers
Can Complex Numbers be Ordered?
Not really, not if you consider what is required to be an ordered field. The complex numbers can not be an ordered field, one counter example is illustrating the nonzero complex numbers i and 1, when squared and added together, you get zero.
i^2 + 1^2 = -1 + 1 = 0
If you order complex numbers by their modulus (absolute values) only, you run into the problem of having many complex numbers becoming equivalent. Example:
2 + 3i and 3 + 2i, each with radius √13
One way to "psuedo" order complex numbers is to use the numbers looking at both their modulus and angle.
z1 "<" z2 if and only if one of the two conditions are met:
| z1 | < | z2 | or
| z1 | = | z2 | and atan(imag(z1)/real(z1)) < atan(imag(z2)/real(z2))
I believe we do not have about the unit of angle (degrees vs. radians vs. grads) for this psuedo-ordering.
Please see the sources listed at the end of this article for more details.
HP Prime Program: CLESS
EXPORT CLESS(z1,z2)
BEGIN
// 2020-08-06 EWS
// psuedo ordering of
// complex numbers
LOCAL a1,a2,t1,t2;
a1:=ABS(z1);
a2:=ABS(z2);
t1:=ATAN(IM(z1)/RE(z1));
t2:=ATAN(IM(z2)/RE(z2));
IF (a1<a2) OR ((a1==a2) AND (t1<t2)) THEN
RETURN "TRUE";
ELSE
RETURN "FALSE";
END;
END;
Example (angle shown in radians, rounded to five decimal places):
These complex numbers are listed in order:
1 + i (1.41421 ∠ 0.78540)
2 + i (2.23067 ∠ 0.46365)
1+ 2i (2.23607 ∠ 1.10715)
2 + 2i (2.82843 ∠ 0.78540)
3 + i (3.16228 ∠ 0.32175)
1 + 3i (3.16228 ∠ 1.24905)
3 + 2i (3.60555 ∠ 0.58800)
2 + 3i (3.60555 ∠ 0.98279)
4 + i (4.12311 ∠ 0.24498)
Sources:
Weimer, Richard C. "Can the Complex Numbers Be Ordered?" The Two-Year College Mathematics Journal, Dec. 1976, Vol. 7, No. 4. Taylor & Francis, Ltd on behalf of the Mathematical Association of America. https://www.jstor.org/stable/3027050?seq=1
Yada, Dharmendra Kumar. "A New Approach to Ordering Complex Numbers" International Journal of Mathematical Sciences and Engineering Applications (IJMSEA), Vol 2. No. III (2008), pp. 221-223. Article downloaded from ResearchGate: https://www.researchgate.net/publication/267465398_A_new_approach_to_ordering_complex_numbers
Eddie
All original content copyright, © 2011-2020. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.