This is an old revision of the document!


Eigensystem

Matrix.Eigensystem(M) calculates the eigenvalues and eigenvectors of the square matrix M. If M is Hermitian it returns the eigenvalues and a single eigenvector, if M is non-hermitian it returns both the left and right eigenvectors

Example

For an Hermitian matrix

Input

Example.Quanty
A = Matrix.New({{1,2,3},
                {2,3,5},
                {3,5,1}})
val, fun = Eigensystem(A)
print("The eigenvalues are\n",val)
print("The eigenfunctions are\n",fun)
print("The matrix transformed to a diagonal matrix by its eigenfunctions is\n",Chop( Matrix.Conjugate(fun) * A * Matrix.Transpose(fun)) )

Result

The eigenvalues are
{ -3.4339294734789 , -0.23514404390394 , 8.6690735173829 }
The eigenfunctions are
{ {  0.3019 ,  0.5247 , -0.796  } ,
  {  0.8587 , -0.5123 , -0.012  } ,
  {  0.4141 ,  0.6799 ,  0.6052 } }
 
The matrix transformed to a diagonal matrix by its eigenfunctions is
{ { -3.4339 ,  0      ,  0      } ,
  {  0      , -0.2351 ,  0      } ,
  {  0      ,  0      ,  8.6691 } }

Table of contents

Print/export