Why is Complex number notation the way it is?

Delaney, Timothy tdelaney at avaya.com
Wed Dec 19 17:30:45 EST 2001


> From: joshyotty at hotmail.com [mailto:joshyotty at hotmail.com]
> 
> I've been coding Python for about a day now, and I can't 'see' why a
> complex number like 2+3i is represented as 2+3j in Python.
> 
> Well, um, why?

Because there are two representations for complex numbers, depending on
whether you're a mathematician or a physicist. Mathematicians use 'i',
physicists (and engineers I think) use 'j'.

'j' is more easily distinguished from the surrounding characters (such a
'1') because it dips below the baseline.

Besides, so many people seem to write phyton that there is an obvious link
to the word "physics" ... :)

You may find the following links useful (although your question does not
appear to be in there ...).

http://www.python.org/
http://www.python.org/cgi-bin/faqw.py

Tim Delaney




More information about the Python-list mailing list