Re: Question for using complex variables

*To*: mathgroup at smc.vnet.net*Subject*: [mg13772] Re: Question for using complex variables*From*: Paul Abbott <paul at physics.uwa.edu.au>*Date*: Mon, 24 Aug 1998 05:07:22 -0400*Organization*: University of Western Australia*References*: <6r10kv$fjg@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Chongdae Park wrote: > Here, x, y, w, and z are all real values. Then I expected > > Complex[x,y]*Complex[w,z]=(xw-yz)+I(xz+yw) First, note that In[1]:= ?Complex "Complex is the head used for complex numbers." so, to work with complex variables in explicit form, you should not use Complex but instead enter them directly as x+I y, etc. Second, ComplexExpand is the operator you want for simplifying complex expressions (assuming that the variables x,y,w,z are real): In[2]:= ComplexExpand[(x + I y) (w + I z)] Out[2]= w x - y z + I (w y + x z) Cheers, Paul ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul at physics.uwa.edu.au AUSTRALIA http://www.physics.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________