Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.075 X-Spam-Evidence: '*H*': 0.85; '*S*': 0.00; 'root': 0.05; 'subject:Python': 0.06; 'referring': 0.07; 'terms,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'numbers;': 0.16; 'roy': 0.16; 'subject: \n ': 0.16; 'symbols': 0.16; 'two.': 0.16; 'vectors': 0.16; 'wrote:': 0.18; 'pointed': 0.19; 'example': 0.22; 'cc:addr:python.org': 0.22; 'please?': 0.24; 'space.': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'extension': 0.26; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'related': 0.29; 'involving': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:wiki': 0.31; 'dimensions': 0.31; 'url:wikipedia': 0.31; 'covered': 0.32; 'fri,': 0.33; 'guess': 0.33; 'maybe': 0.34; 'subject: (': 0.35; 'etc': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'described': 0.36; 'useful': 0.36; 'similar': 0.36; 'url:org': 0.36; 'unit': 0.37; 'two': 0.37; 'being': 0.38; 'represent': 0.38; 'heard': 0.39; 'called': 0.40; 'even': 0.60; 'numbers': 0.61; 'simply': 0.61; 'simple': 0.61; 'here:': 0.62; 'term': 0.63; 'real': 0.63; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'smith': 0.68; 'electrical': 0.74; 'square': 0.74; '*and*': 0.84; 'calculations': 0.84; 'circuit': 0.84; 'dimensional': 0.84; 'from.': 0.93; 'taught': 0.96; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3fxVGS8OSK/TxFImDhEYhEB2FvxXVzfq6Oxn5e1QpuI=; b=CQjIyu5dW8Cwddti4RFUsU0SRjEoclBoYXtGX++inyDXZzV9IMywl1Ix/QEKuvTjnP Qjaq2MI5ZcVOJ1uQ+f3SH8+0xMtlHlZH91GBDImxmSRdKQmy66Vcb0/YsEs/W7DCANTc cU8T17LZRXYOCjm4viBlHIK2peJUJ3osiEIbwWuD19mcWfFAKJES+93jyNmlNtDkDjV6 XwSNNjMNHTXWpMP4Fcofurs8XgaqBzdZ8B+u1XKwTyMLAAIlzlYGI/UF4vY8EcYbwQGo QoUcHN3JnwEV+5Uo2SjiQ/n4hYmwpCDX0ouX99Fqql17M/TcQFYufI1FSCBdjAPrb3V2 Q+og== MIME-Version: 1.0 X-Received: by 10.52.161.231 with SMTP id xv7mr11921798vdb.1.1381415640942; Thu, 10 Oct 2013 07:34:00 -0700 (PDT) In-Reply-To: References: Date: Fri, 11 Oct 2013 01:34:00 +1100 Subject: Re: Complex literals (was Re: I am never going to complain about Python again) From: David To: Chris Angelico Content-Type: text/plain; charset=ISO-8859-1 Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1381415643 news.xs4all.nl 15880 [2001:888:2000:d::a6]:42397 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:56578 On 11 October 2013 00:25, Chris Angelico wrote: > On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith 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.