MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Trick for getting the comples conjugate in symbolic calculations?


By default, Mathematica assumes that variables denote complex numbers, so
for example

Conjugate[z(x+I y)]

        Conjugate[(x + I*y)*z]

This could be expanded to (Conjugate[x] - I*Conjugate[y])*Conjugate[z] but
it is left to the user to make choices.

To deal with such situations we have the functions ComplexExpand,
FunctionExpand and the package Algebra`ReIm`. These can be looked up in the

Here are some examples

ComplexExpand[Conjugate[(x+I y)z]]  (*x,y,z are assumed real*)

        x*z - I*y*z

ComplexExpand[Conjugate[(x+I y)z],{z}] (*z, only is assumed complex*)

        (-y)*Im[z] + x*Re[z] - I*(x*Im[z] + y*Re[z])

FunctionExpand[Conjugate[(x+I y)z]]   (*x,y,z are assumed complex*)

        (Conjugate[x] - I*Conjugate[y])*Conjugate[z]


This allows some expansion, under the default assumption that  x,y,z are

Conjugate[z(x+I y)]

        (Conjugate[x] - I*Conjugate[y])*Conjugate[z]

We can declare z to be real ( note z:/  --- this setting is tagged by z, not


Conjugate[(x+I y)z]

        z*(Conjugate[x] - I*Conjugate[y])

This declaration overides the beviour of ComplexExpand

ComplexExpand[Conjugate[(x+I y)z],{z}]

        x*z - I*y*z

Allan Hayes
Mathematica Training and Consulting
Leicester UK
hay at
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

<riefler at> wrote in message
news:9kqj1m$4bo$1 at
> Hi
> I read in the older news that the numeric functions real / Re and imag
> / Im for  / Mathematica won't do its job because of some
> ambiguity. The same holds for the complex conjugate conj / Conjugate.
> Is there a trick to get anyway the algebraic solution of for example
> (x1+i*y1)*conj(x2+i*y2) / (x1+i*y1)*Conjugate(x2+i*y2) in Mathematica?
> Thanks a lot
> Norbert

  • Prev by Date: Re: differential equation with buondary conditions
  • Next by Date: Preparing Documents or Presentations in Mathematica?
  • Previous by thread: RE: Trick for getting the comples conjugate in symbolic calculations?
  • Next by thread: Re: Trick for getting the comples conjugate in symbolic calculations?