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

From ApCoCoAWiki
(update description)
Line 10: Line 10:
 
It is implemented in the ApCoCoA server, so you need a running server. It was not implemented in version 0.99.4 or previous. Also please keep in mind this method is based on blas/Lapack's eigenvalue solver and uses floating point arithmetic. This is not an exact, algebraic method!
 
It is implemented in the ApCoCoA server, so you need a running server. It was not implemented in version 0.99.4 or previous. Also please keep in mind this method is based on blas/Lapack's eigenvalue solver and uses floating point arithmetic. This is not an exact, algebraic method!
 
The output list contains first a matrix B. Each row of B describe one of A's eigenvalues. The first column contains the eigenvalue's real part, the second the imaginary.
 
The output list contains first a matrix B. Each row of B describe one of A's eigenvalues. The first column contains the eigenvalue's real part, the second the imaginary.
The second element of the list is a matrix of the size of A, containing A's left hand eigenvectors, while the third element in the list is a matrix containing the right hand eigenvectors.
+
The second element of the list is a matrix of the size of A, containing A's left hand eigenvectors, while the third element in the list is a matrix containing the right hand eigenvectors. Column j contains the eigenvector corresponding to eigenvalue j if the imaginary part of j is zero. If eigenvalue  j had also an imaginary part, then eigenvalue j+1 is the complex conjugate of j and the eigenvector of j is composed of the real part stored in column j and the imaginary part stored in column j+1. The eigenvector of j+1 is the complex conjugate of eigenvector j.
 
<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 17: Line 17:
 
-------------------------------
 
-------------------------------
 
[Mat([
 
[Mat([
   [2038617447977453/70368744177664, 1593056728295919/4503599627370496, 0, 1717983664400761/562949953421312],
+
   [4077234895954899/140737488355328, -3850002255576291/281474976710656, 3186113456591853/9007199254740992, 3186113456591853/9007199254740992],
   [-3850002255576293/281474976710656, 1593056728295919/4503599627370496, 0, -1717983664400761/562949953421312]
+
   [0, 0, 6871934657603045/2251799813685248, -6871934657603045/2251799813685248]
 
]), Mat([
 
]), Mat([
   [-4846625556027553/9007199254740992, -675715895173401/1125899906842624, 6285574018989927/36028797018963968, -7024364631742823/18014398509481984],
+
   [1211656389006889/2251799813685248, 5405727161387211/9007199254740992, 1571393504747479/9007199254740992, -7024364631742825/18014398509481984],
   [-5611119929071853/18014398509481984, -8025389267782659/36028797018963968, -630161806301403/4503599627370496, 7963794620848619/18014398509481984],
+
   [350694995566991/1125899906842624, 4012694633891333/18014398509481984, -5041294450411215/36028797018963968, 7963794620848619/18014398509481984],
   [-3851121972702563/9007199254740992, 6293666352540409/36028797018963968, -2394868378529203/9007199254740992, -1824257157284653/36028797018963968],
+
   [7702243945405117/18014398509481984, -6293666352540407/36028797018963968, -4789736757058405/18014398509481984, -3648514314569325/72057594037927936],
   [-5910799605047357/9007199254740992, 6738448111784605/9007199254740992, 6552680769135833/9007199254740992, 0]
+
   [5910799605047357/9007199254740992, -6738448111784603/9007199254740992, 3276340384567917/4503599627370496, 0]
 
]), Mat([
 
]), Mat([
   [-7110239176083849/18014398509481984, -5241040126502889/9007199254740992, -569232410323621/18014398509481984, 4695168387448581/18014398509481984],
+
   [1777559794020963/4503599627370496, 5241040126502889/9007199254740992, -4553859282588877/144115188075855872, 4695168387448585/18014398509481984],
   [-7846388397589843/18014398509481984, -3981313256671163/9007199254740992, -2719422585742633/9007199254740992, -4930385173711605/9007199254740992],
+
   [7846388397589841/18014398509481984, 3981313256671163/9007199254740992, -5438845171485265/18014398509481984, -4930385173711607/9007199254740992],
   [-3437594604471165/4503599627370496, 2800381393796867/4503599627370496, 6128985174171139/9007199254740992, 0],
+
   [6875189208942329/9007199254740992, -5600762787593733/9007199254740992, 11970674168303/17592186044416, 0],
   [-1207381852306067/4503599627370496, 634514467740541/2251799813685248, -2469130937097749/9007199254740992, 6644460631770309/144115188075855872]
+
   [2414763704612135/9007199254740992, -5076115741924331/18014398509481984, -2469130937097749/9007199254740992, 3322230315885151/72057594037927936]
 
])]
 
])]
 
-------------------------------
 
-------------------------------

Revision as of 14:16, 19 October 2008

Numerical.EigenValuesAndAllVectors

eigenvalues and left and right eigenvectors of a matrix

Syntax

$numerical.EigenValues(A:Matrix):List

Description

This function returns a List of three matrices, containing numerical approximation to A's eigenvalues and right and left eigenvectors.

Therefore the input matrix A has to be rectangular!

It is implemented in the ApCoCoA server, so you need a running server. It was not implemented in version 0.99.4 or previous. Also please keep in mind this method is based on blas/Lapack's eigenvalue solver and uses floating point arithmetic. This is not an exact, algebraic method! The output list contains first a matrix B. Each row of B describe one of A's eigenvalues. The first column contains the eigenvalue's real part, the second the imaginary. The second element of the list is a matrix of the size of A, containing A's left hand eigenvectors, while the third element in the list is a matrix containing the right hand eigenvectors. Column j contains the eigenvector corresponding to eigenvalue j if the imaginary part of j is zero. If eigenvalue j had also an imaginary part, then eigenvalue j+1 is the complex conjugate of j and the eigenvector of j is composed of the real part stored in column j and the imaginary part stored in column j+1. The eigenvector of j+1 is the complex conjugate of eigenvector j.

Example

A:=Mat([[1,2,7,18],[2,4,9,12],[23,8,9,10],[7,5,3,2]]); 
Numerical.EigenValuesAndAllVectors(A);
-- CoCoAServer: computing Cpu Time = 0.0031
-------------------------------
[Mat([
  [4077234895954899/140737488355328, -3850002255576291/281474976710656, 3186113456591853/9007199254740992, 3186113456591853/9007199254740992],
  [0, 0, 6871934657603045/2251799813685248, -6871934657603045/2251799813685248]
]), Mat([
  [1211656389006889/2251799813685248, 5405727161387211/9007199254740992, 1571393504747479/9007199254740992, -7024364631742825/18014398509481984],
  [350694995566991/1125899906842624, 4012694633891333/18014398509481984, -5041294450411215/36028797018963968, 7963794620848619/18014398509481984],
  [7702243945405117/18014398509481984, -6293666352540407/36028797018963968, -4789736757058405/18014398509481984, -3648514314569325/72057594037927936],
  [5910799605047357/9007199254740992, -6738448111784603/9007199254740992, 3276340384567917/4503599627370496, 0]
]), Mat([
  [1777559794020963/4503599627370496, 5241040126502889/9007199254740992, -4553859282588877/144115188075855872, 4695168387448585/18014398509481984],
  [7846388397589841/18014398509481984, 3981313256671163/9007199254740992, -5438845171485265/18014398509481984, -4930385173711607/9007199254740992],
  [6875189208942329/9007199254740992, -5600762787593733/9007199254740992, 11970674168303/17592186044416, 0],
  [2414763704612135/9007199254740992, -5076115741924331/18014398509481984, -2469130937097749/9007199254740992, 3322230315885151/72057594037927936]
])]
-------------------------------

See also

Introduction to CoCoAServer

Numerical.QR

Numerical.SVD

Numerical.EigenValues

Numerical.EigenValuesAndVectors