ApCoCoA:Num.EigenValuesAndAllVectors

From CoCoAWiki
Jump to: navigation, search
 <command>
   <title>Num.EigenValuesAndAllVectors</title>
   <short_description>Computes eigenvalues and left and right eigenvectors of a matrix.</short_description>

<syntax> Num.EigenValuesAndAllVectors(A:MAT):[B:MAT, C:MAT, D:MAT, E:MAT , F:MAT] </syntax>

   <description>

Please note: The function(s) explained on this page is/are using the ApCoCoAServer. You will have to start the ApCoCoAServer in order to use it/them. <par/> This function returns a list of five matrices, containing numerical approximation of the eigenvalues of the matrix A and right and left eigenvectors.

<itemize> <item>@param A A quadratic matrix with rational entries.</item> <item>@return The output is a list of five matrices [B:MAT, C:MAT, D:MAT, E:MAT, F:MAT]. The first matrix B contains the complex eigenvalues of the matrix A, i.e. the first entry of a column is the real part and the second entry of the same column is the imaginary part of the eigenvalue. The matrices C and D represent the right eigenvectors of A, i.e. the j-th column of C contains the real part of the right eigenvector corresponding to eigenvalue j and the j-th column of D contains the imaginary part of the same right eigenvector corresponding to eigenvalue j. The matrices E and F store the left eigenvectors analogue to C and D.</item> </itemize>


<example> A:=Mat([[1,2,7,18],[2,4,9,12],[23,8,9,10],[7,5,3,2]]); Dec(Num.EigenValuesAndAllVectors(A),3); -- CoCoAServer: computing Cpu Time = 0.016


[Mat([

 [<quotes>28.970</quotes>, <quotes>-13.677</quotes>, <quotes>0.353</quotes>, <quotes>0.353</quotes>],
 [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>3.051</quotes>, <quotes>-3.051</quotes>]

]), Mat([

 [<quotes>0.538</quotes>, <quotes>-0.600</quotes>, <quotes>0.389</quotes>, <quotes>0.389</quotes>],
 [<quotes>0.311</quotes>, <quotes>-0.222</quotes>, <quotes>-0.442</quotes>, <quotes>-0.442</quotes>],
 [<quotes>0.427</quotes>, <quotes>0.174</quotes>, <quotes>0.050</quotes>, <quotes>0.050</quotes>],
 [<quotes>0.656</quotes>, <quotes>0.748</quotes>, <quotes>0</quotes>, <quotes>0</quotes>]

]), Mat([

 [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>-0.174</quotes>, <quotes>0.174</quotes>],
 [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>0.139</quotes>, <quotes>-0.139</quotes>],
 [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>0.265</quotes>, <quotes>-0.265</quotes>],
 [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>-0.727</quotes>, <quotes>0.727</quotes>]

]), Mat([

 [<quotes>0.394</quotes>, <quotes>-0.581</quotes>, <quotes>0.260</quotes>, <quotes>0.260</quotes>],
 [<quotes>0.435</quotes>, <quotes>-0.442</quotes>, <quotes>-0.547</quotes>, <quotes>-0.547</quotes>],
 [<quotes>0.763</quotes>, <quotes>0.621</quotes>, <quotes>0</quotes>, <quotes>0</quotes>],
 [<quotes>0.268</quotes>, <quotes>0.281</quotes>, <quotes>0.046</quotes>, <quotes>0.046</quotes>]

]), Mat([

 [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>-0.031</quotes>, <quotes>0.031</quotes>],
 [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>-0.301</quotes>, <quotes>0.301</quotes>],
 [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>0.680</quotes>, <quotes>-0.680</quotes>],
 [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>-0.274</quotes>, <quotes>0.274</quotes>]

])]


</example>

   </description>
   <seealso>
     <see>Introduction to CoCoAServer</see>
     <see>Num.QR</see>
     <see>Num.SVD</see>
     <see>Num.EigenValues</see>
     <see>Num.EigenValuesAndVectors</see>
   </seealso>
   <types>
     <type>apcocoaserver</type>
     <type>matrix</type>
   </types>
   <key>EigenValuesAndAllVectors</key>
   <key>Num.EigenValuesAndAllVectors</key>
   <key>numerical.eigenvaluesandallvectors</key>
   <wiki-category>Package_numerical</wiki-category>
 </command>