Difference between revisions of "ApCoCoA-1:Num.EigenValuesAndAllVectors"

From ApCoCoAWiki
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
   <command>
 
   <command>
 
     <title>Num.EigenValuesAndAllVectors</title>
 
     <title>Num.EigenValuesAndAllVectors</title>
     <short_description>Computes eigenvalues and left and right eigenvectors of a matrix</short_description>
+
     <short_description>Computes eigenvalues and left and right eigenvectors of a matrix.</short_description>
 
<syntax>
 
<syntax>
Num.EigenValuesAndAllVectors(A:Matrix):[B:Matrix, C:Matrix, D:Matrix, E:Matrix, F:Matrix]
+
Num.EigenValuesAndAllVectors(A:MAT):[B:MAT, C:MAT, D:MAT, E:MAT , F:MAT]
 
</syntax>
 
</syntax>
 
     <description>
 
     <description>
{{ApCoCoAServer}} Please also note that you will have to use an ApCoCoAServer with enabled BLAS/LAPACK support.
+
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. 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 to A's eigenvalues and right and left eigenvectors.  
+
This function returns a list of five matrices, containing numerical approximation of the eigenvalues of the matrix <tt>A</tt> and right and left eigenvectors.  
  
 
<itemize>
 
<itemize>
<item>@param <em>A</em> A square matrix with rational entries.</item>
+
<item>@param <em>A</em> A quadratic matrix with rational entries.</item>
<item>@return The output [B:Matrix, C:Matrix, D:Matrix, E:Matrix, F:Matrix] contains a matrix B, where each column contains one of A's eigenvalues. The first row contains the eigenvalue's real part, the second row the imaginary. The matrices C, D, E and F all have the same dimensions as A. Column j of matrix C contains the real part of the right eigenvector corresponding to eigenvalue j and column j of matrix D contains the imaginary part of the right eigenvector correspsonding to eigenvalue j. The matrices E and F store the left eigenvectors in the same way as C and D.</item>
+
<item>@return The output is a list of five matrices <tt>[B:MAT, C:MAT, D:MAT, E:MAT, F:MAT]</tt>. The first matrix <tt>B</tt> contains the complex eigenvalues of the matrix <tt>A</tt>, 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 <tt>C</tt> and <tt>D</tt> represent the right eigenvectors of <tt>A</tt>, i.e. the <tt>j</tt>-th column of <tt>C</tt> contains the real part of the right eigenvector corresponding to eigenvalue <tt>j</tt> and the <tt>j</tt>-th column of D contains the imaginary part of the same right eigenvector corresponding to eigenvalue <tt>j</tt>. The matrices <tt>E</tt> and <tt>F</tt> store the left eigenvectors analogue to <tt>C</tt> and <tt>D</tt>.</item>
 
</itemize>
 
</itemize>
  
Line 22: Line 22:
 
-------------------------------
 
-------------------------------
 
[Mat([
 
[Mat([
   ["28.970", "-13.677", "0.353", "0.353"],
+
   [<quotes>28.970</quotes>, <quotes>-13.677</quotes>, <quotes>0.353</quotes>, <quotes>0.353</quotes>],
   ["0", "0", "3.051", "-3.051"]
+
   [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>3.051</quotes>, <quotes>-3.051</quotes>]
 
]), Mat([
 
]), Mat([
   ["0.538", "-0.600", "0.389", "0.389"],
+
   [<quotes>0.538</quotes>, <quotes>-0.600</quotes>, <quotes>0.389</quotes>, <quotes>0.389</quotes>],
   ["0.311", "-0.222", "-0.442", "-0.442"],
+
   [<quotes>0.311</quotes>, <quotes>-0.222</quotes>, <quotes>-0.442</quotes>, <quotes>-0.442</quotes>],
   ["0.427", "0.174", "0.050", "0.050"],
+
   [<quotes>0.427</quotes>, <quotes>0.174</quotes>, <quotes>0.050</quotes>, <quotes>0.050</quotes>],
   ["0.656", "0.748", "0", "0"]
+
   [<quotes>0.656</quotes>, <quotes>0.748</quotes>, <quotes>0</quotes>, <quotes>0</quotes>]
 
]), Mat([
 
]), Mat([
   ["0", "0", "-0.174", "0.174"],
+
   [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>-0.174</quotes>, <quotes>0.174</quotes>],
   ["0", "0", "0.139", "-0.139"],
+
   [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>0.139</quotes>, <quotes>-0.139</quotes>],
   ["0", "0", "0.265", "-0.265"],
+
   [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>0.265</quotes>, <quotes>-0.265</quotes>],
   ["0", "0", "-0.727", "0.727"]
+
   [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>-0.727</quotes>, <quotes>0.727</quotes>]
 
]), Mat([
 
]), Mat([
   ["0.394", "-0.581", "0.260", "0.260"],
+
   [<quotes>0.394</quotes>, <quotes>-0.581</quotes>, <quotes>0.260</quotes>, <quotes>0.260</quotes>],
   ["0.435", "-0.442", "-0.547", "-0.547"],
+
   [<quotes>0.435</quotes>, <quotes>-0.442</quotes>, <quotes>-0.547</quotes>, <quotes>-0.547</quotes>],
   ["0.763", "0.621", "0", "0"],
+
   [<quotes>0.763</quotes>, <quotes>0.621</quotes>, <quotes>0</quotes>, <quotes>0</quotes>],
   ["0.268", "0.281", "0.046", "0.046"]
+
   [<quotes>0.268</quotes>, <quotes>0.281</quotes>, <quotes>0.046</quotes>, <quotes>0.046</quotes>]
 
]), Mat([
 
]), Mat([
   ["0", "0", "-0.031", "0.031"],
+
   [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>-0.031</quotes>, <quotes>0.031</quotes>],
   ["0", "0", "-0.301", "0.301"],
+
   [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>-0.301</quotes>, <quotes>0.301</quotes>],
   ["0", "0", "0.680", "-0.680"],
+
   [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>0.680</quotes>, <quotes>-0.680</quotes>],
   ["0", "0", "-0.274", "0.274"]
+
   [<quotes>0</quotes>, <quotes>0</quotes>, <quotes>-0.274</quotes>, <quotes>0.274</quotes>]
 
])]
 
])]
 
-------------------------------
 
-------------------------------
Line 50: Line 50:
 
     <seealso>
 
     <seealso>
 
       <see>Introduction to CoCoAServer</see>
 
       <see>Introduction to CoCoAServer</see>
       <see>Numerical.QR</see>
+
       <see>Num.QR</see>
       <see>Numerical.SVD</see>
+
       <see>Num.SVD</see>
       <see>Numerical.EigenValues</see>
+
       <see>Num.EigenValues</see>
       <see>Numerical.EigenValuesAndVectors</see>
+
       <see>Num.EigenValuesAndVectors</see>
 
     </seealso>
 
     </seealso>
 
     <types>
 
     <types>
       <type>cocoaserver</type>
+
       <type>apcocoaserver</type>
 +
      <type>matrix</type>
 
     </types>
 
     </types>
 +
    <key>EigenValuesAndAllVectors</key>
 
     <key>Num.EigenValuesAndAllVectors</key>
 
     <key>Num.EigenValuesAndAllVectors</key>
     <key>EigenValuesAndAllVectors</key>
+
     <key>numerical.eigenvaluesandallvectors</key>
 
     <wiki-category>Package_numerical</wiki-category>
 
     <wiki-category>Package_numerical</wiki-category>
 
   </command>
 
   </command>

Revision as of 07:48, 8 July 2009

Num.EigenValuesAndAllVectors

Computes eigenvalues and left and right eigenvectors of a matrix.

Syntax

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

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.

This function returns a list of five matrices, containing numerical approximation of the eigenvalues of the matrix A and right and left eigenvectors.

  • @param A A quadratic matrix with rational entries.

  • @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.


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>]
])]
-------------------------------

See also

Introduction to CoCoAServer

Num.QR

Num.SVD

Num.EigenValues

Num.EigenValuesAndVectors