[Date Index]
[Thread Index]
[Author Index]
Re: Eigenvectors of a Complex Hermitian Matrix
*To*: mathgroup at smc.vnet.net
*Subject*: [mg13594] Re: Eigenvectors of a Complex Hermitian Matrix
*From*: Paul Abbott <paul at physics.uwa.edu.au>
*Date*: Mon, 3 Aug 1998 03:53:53 -0400
*Organization*: University of Western Australia
*References*: <002101bdbca6$e2a37c80$f6ed4c86@pbuech7.mpae.gwdg.de> <6pui5e$6s3@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
Gerhard J. Theurich wrote:
> I am currently writting on
> a program that needs to diagonalize some matrices and I am using
> Eispack to do it. Eispack returns the correct unitary transform but out
> of curiosity I checked with Mathematica and got strange results. Now I
> was wondering what I did wrong.
>
> I included my Hermitian matrix by:
>
> a = {{..,..},...}
>
> and then typed
>
> b = Eigenvectors[]
>
> and then expected Conjugate[b]*Transpose[b] to be unity and
> Conjugate[b]*a*Transpose[b] to be diagonal.
The problem is simply the format of the output of the Eigenvectors
command. Note that u =Eigenvectors[m] gives a list of the eigenvectors
of the square matrix m, which means that the eigenvectors are the ROWS
of u. Hence you need to redefine u = Transpose[u] first before you
apply the usual formulae. E.g, for the matrix
In[1]:=
a = {{-11.4133,-1.43923+2.97532 I,0.774195+3.48219 I,-0.208604+2.46393
I},
{-1.43923+-2.97532 I,-1.17674,-2.73313+-0.20665
I,1.32306+-1.72722I},
{0.774195+-3.48219 I,-2.73313+0.20665 I,3.93994,1.30476+-1.87478I},
{-0.208604+-2.46393 I,1.32306+1.72722 I,1.30476+1.87478
I,5.16037}};
we compute the eigensystem,
In[2]:= {lambda, u} = Chop[Eigensystem[a]];
and then take the transpose of the matrix of eigenvectors,
In[3]:= u = Transpose[u];
Defining the Hermitian adjoint,
In[4]:= SuperDagger[a_?MatrixQ] := Conjugate[Transpose[a]]
(note that this automatically formats nicely if you convert this cell
into TraditionalForm!) then we have
In[5]:=
Out[5]= {{1., 0, 0, 0}, {0, 1., 0, 0}, {0, 0, 1., 0}, {0, 0, 0, 1.}}
and
In[6]:= u . SuperDagger[u] // Chop
Out[6]= {{1., 0, 0, 0}, {0, 1., 0, 0}, {0, 0, 1., 0}, {0, 0, 0, 1.}}
Finally, to diagonalize a,
In[7]:= SuperDagger[u] . a. u // Chop Out[7]= {{-13.5232, 0, 0, 0}, {0,
7.62675, 0, 0},
{0, 0, 4.69012, 0}, {0, 0, 0, -2.28343}}
which agrees with DiagonalMatrix[lambda]
In[8]:= DiagonalMatrix[lambda]
Out[8]= {{-13.5232, 0, 0, 0}, {0, 7.62675, 0, 0},
{0, 0, 4.69012, 0}, {0, 0, 0, -2.28343}}
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
____________________________________________________________________
Prev by Date:
**Publicon Problems**
Next by Date:
**Memory Management**
Previous by thread:
**Re: Publicon Problems**
Next by thread:
**Re: Eigenvectors of a Complex Hermitian Matrix**
| |