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

From ApCoCoAWiki
m (replaced <quotes> tag by real quotes)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
   <command>
+
   {{Version|1}}
     <title>Numerical.EigenValuesAndVectors</title>
+
<command>
     <short_description>Computes the eigenvalues and eigenvectors of a matrix</short_description>
+
     <title>Num.EigenValuesAndVectors</title>
 +
     <short_description>Computes the eigenvalues and eigenvectors of a matrix.</short_description>
 
<syntax>
 
<syntax>
Num.EigenValuesAndVectors(A:Matrix):[B:Matrix, C:Matrix, D:Matrix]
+
Num.EigenValuesAndVectors(A:MAT):[B:MAT, C:MAT, D:Matrix]
 
</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 three matrices containing the numerical approximations of the complex eigenvalues and right eigenvectors of <tt>A</tt>.
 +
 
 +
<itemize>
 +
<item>@param <em>A</em> A quadratic matrix with rational entries.</item>
 +
<item>@return The output is a list of three matrices <tt>[B:Matrix, C:Matrix, D:Matrix]</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 <tt>D</tt> contains the imaginary part of the same right eigenvector corresponding to eigenvalue <tt>j</tt>.</item>
 +
</itemize>
 +
 
 +
In order to compute the left hand eigenvectors of <tt>A</tt>, apply this command to the transposed matrix of <tt>A</tt> (see <ref>ApCoCoA-1:Transposed|Transposed</ref>).
  
This function returns a list of three matrices, containing numerical approximation to A's eigenvalues and (right hand) eigenvectors.
 
The input matrix A has to be a square matrix!
 
The output [B:Matrix, C:Matrix, D: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 and D both have the same dimensions as A. Column j of matrix C contains the real part of the eigenvector corresponding to eigenvalue j and column j of matrix D contains the imaginary part of the eigenvector correspsonding to eigenvalue j.
 
To compute only the left hand's eigenvectors apply this method to Transposed(A).
 
 
<example>
 
<example>
 
A:=Mat([[1,2,7,18],[2,4,9,12],[23,8,9,10],[7,5,3,2]]);  
 
A:=Mat([[1,2,7,18],[2,4,9,12],[23,8,9,10],[7,5,3,2]]);  
Line 37: Line 42:
 
     </description>
 
     </description>
 
     <seealso>
 
     <seealso>
       <see>Introduction to CoCoAServer</see>
+
       <see>ApCoCoA-1:Introduction to CoCoAServer|Introduction to CoCoAServer</see>
       <see>Numerical.QR</see>
+
       <see>ApCoCoA-1:Num.QR|Num.QR</see>
       <see>Numerical.SVD</see>
+
       <see>ApCoCoA-1:Num.SVD|Num.SVD</see>
       <see>Numerical.EigenValues</see>
+
       <see>ApCoCoA-1:Num.EigenValues|Num.EigenValues</see>
       <see>Numerical.EigenValuesAndAllVectors</see>
+
       <see>ApCoCoA-1:Num.EigenValuesAndAllVectors|Num.EigenValuesAndAllVectors</see>
 
     </seealso>
 
     </seealso>
 
     <types>
 
     <types>
Line 49: Line 54:
 
     <key>Num.EigenValuesAndVectors</key>
 
     <key>Num.EigenValuesAndVectors</key>
 
     <key>EigenValuesAndVectors</key>
 
     <key>EigenValuesAndVectors</key>
     <wiki-category>Package_numerical</wiki-category>
+
    <key>numerical.eigenvaluesandvectors</key>
 +
     <wiki-category>ApCoCoA-1:Package_numerical</wiki-category>
 
   </command>
 
   </command>

Latest revision as of 13:47, 29 October 2020

This article is about a function from ApCoCoA-1.

Num.EigenValuesAndVectors

Computes the eigenvalues and eigenvectors of a matrix.

Syntax

Num.EigenValuesAndVectors(A:MAT):[B:MAT, C:MAT, D:Matrix]

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 three matrices containing the numerical approximations of the complex eigenvalues and right eigenvectors of A.

  • @param A A quadratic matrix with rational entries.

  • @return The output is a list of three matrices [B:Matrix, C:Matrix, D:Matrix]. 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.

In order to compute the left hand eigenvectors of A, apply this command to the transposed matrix of A (see Transposed).

Example

A:=Mat([[1,2,7,18],[2,4,9,12],[23,8,9,10],[7,5,3,2]]); 
Dec(Num.EigenValuesAndVectors(A),3); 

-- CoCoAServer: computing Cpu Time = 0.016
-------------------------------
[Mat([
  ["28.970", "-13.677", "0.353", "0.353"],
  ["0", "0", "3.051", "-3.051"]
]), Mat([
  ["0.394", "-0.581", "0.260", "0.260"],
  ["0.435", "-0.442", "-0.547", "-0.547"],
  ["0.763", "0.621", "0", "0"],
  ["0.268", "0.281", "0.046", "0.046"]
]), Mat([
  ["0", "0", "-0.031", "0.031"],
  ["0", "0", "-0.301", "0.301"],
  ["0", "0", "0.680", "-0.680"],
  ["0", "0", "-0.274", "0.274"]
])]
--------------------------------------------------------------

See also

Introduction to CoCoAServer

Num.QR

Num.SVD

Num.EigenValues

Num.EigenValuesAndAllVectors