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

Line 3: | Line 3: | ||

<short_description>Computes the eigenvalues and eigenvectors of a matrix.</short_description> | <short_description>Computes the eigenvalues and eigenvectors of a matrix.</short_description> | ||

<syntax> | <syntax> | ||

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

</syntax> | </syntax> | ||

<description> | <description> | ||

<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. | <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/> | <par/> | ||

− | This function returns a list of three matrices | + | This function returns a list of three matrices containing the numerical approximations of the complex eigenvalues and right eigenvectors of <tt>A</tt>. |

<itemize> | <itemize> | ||

− | <item>@param <em>A</em> A | + | <item>@param <em>A</em> A quadratic matrix with rational entries.</item> |

− | <item>@return The output [B:Matrix, C:Matrix, D:Matrix] | + | <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> | </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>Transposed</ref>). | |

<example> | <example> |

## Revision as of 09:06, 8 July 2009

## 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([ [<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.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