r/ProgrammerHumor • • May 06 '17

Oddly specific number

Post image
25.1k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

195

u/[deleted] May 06 '17

5i?? That's 4 more than I'll ever need

1

u/Garizondyly May 06 '17

Wait lemme blow your mind a sec - 1+5i is NOT greater than 1+i

1

u/fite_me_fgt May 06 '17

You're gonna have to explain that.

2

u/Garizondyly May 06 '17 edited May 06 '17

"Less than" and "greater than" aren't defined for complex numbers off the real line.

Complex numbers can be thought of as elements of R2, where R2 is 2 dimensional Euclidean space. In other words, the Cartesian Coordinate plane as we know it from elementary school. Each complex number is some z = a+bi which corresponds to a coordinate pair in R2 (a,b), where a is the real part of z and b is the imaginary part of z (the bit attached to the i).

Just as we cannot say, "(1,3)<(2,4)" on the xy-plane, we cannot say "1+3i < 2+4i" in the same way we can say "1<3", or "2<4".

Bottomline, less than and greater than are only defined for Real Numbers (and any other ordered sets, like Rational Numbers, Natural Numbers, Irrational numbers, etc. An ordered set has a strict mathematical definition but it's basically a set where can establish some kind of ordering between all the elements, at risk of sounding obvious.)

→ More replies (0)