Re: Complex Matrices

*Subject*: [mg2436] Re: Complex Matrices*From*: ianc (Ian Collier)*Date*: Thu, 9 Nov 1995 04:42:56 GMT*Approved*: usenet@wri.com*Distribution*: local*Newsgroups*: wri.mathgroup*Organization*: Wolfram Research, Inc.*Sender*: daemon at wri.com ( )

In article <47hh8n$dcl at ralph.vnet.net>, David A Boyd <dab8g at kelvin.seas.virginia.edu> wrote: > Here is my problem: I have a matrix, M , with complex elements, and I want > to find M*.M. If I try Conjugate[ M ].M. or Conjugate[ M[[1,1]] ] M[[1,1]], > Mathematica will not expand the answer.That is to say instead of having > all of the I's replaced with -I's, I just get back Conjugate[ M ].M. even > if I try Expand[]. Which is not a lot of help. > > > david The problem is, probably, that Mathematica does not know if teh other symbols in your matrix are real or complex. ComplexExpand forces Mathematica to treat all variables as real. In[1]:= m = {{a + I b, c + I d},{e + I f, g + I h}} Out[1]= {{a + I b, c + I d}, {e + I f, g + I h}} In[2]:= Conjugate[ m ] Out[2]= {{Conjugate[a + I b], Conjugate[c + I d]}, {Conjugate[e + I f], Conjugate[g + I h]}} In[3]:= ComplexExpand[ %] Out[3]= {{a - I b, c - I d}, {e - I f, g - I h}} In[4]:= ?ComplexExpand ComplexExpand[expr] expands expr assuming that all variables are real. ComplexExpand[expr, {x1, x2, ...}] expands expr assuming that variables matching any of the xi are complex. I hope this helps. --Ian