Complex literals (was Re: I am never going to complain about Python again)

David bouncingcats at gmail.com
Thu Oct 10 10:34:00 EDT 2013


On 11 October 2013 00:25, Chris Angelico <rosuav at gmail.com> wrote:
> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith <roy at panix.com> wrote:
>
> I've never been well-up on complex numbers; can you elaborate on this,
> please? All I know is that I was taught that the square root of -1 is
> called i, and that hypercomplex numbers include i, j, k, and maybe
> even other terms, and I never understood where j comes from. Why is
> Python better for using j?

Pretty well covered here: http://en.wikipedia.org/wiki/Complex_number

Plus, the simple overview is that they are useful because they are
two-dimensional, and so can be used to simply calculations involving
two-dimensional quantities. Very useful for electrical engineers who
use them to represent the two dimensions of amplitude,phase in
Fourier or Laplace circuit analysis. As others have pointed out, they
use the symbol j for the square root of -1 to avoid confusion with the
symbol i used for current.

I have never heard the term "hypercomplex" numbers. I guess you
are referring to vectors with more dimensions than two. A three
dimensional vector is described as having components in i,j,k
directions. Although this is very like an extension of complex numbers
into higher dimensions, the symbols used (i,j,k) are not the same
as the i or j used for complex numbers. Instead they represent
orthogonal unit vectors; which are similar in concept (because
real and imaginary components of complex numbers are orthogonal),
but not the *same*. So don't think of the i *or* j of a complex number
being related to the i *and* j etc components of a vector.

These are useful for example to describe three dimensional space, and
scalar or vector functions in that space.



More information about the Python-list mailing list