up previous next
 eigenvectors    --    eigenvalues and eigenvectors of a matrix

 Syntax
 `eigenvectors(M: MAT, X: RINGELEM): LIST of RECORD`

 Description
M must be a matrix of numbers, and X an indeterminate.

This function determines the eigenvalues of M , and for each eigenvalue gives a basis of the corresponding eigenspace -- note that the basis is probably not orthogonal. For irrational eigenvalues, the minimal polynomial of the eigenvalue is given (as a polynomial in X ), along with the eigenvectors expressed in terms of a root of the minimal polynomial (represented as X ).

 Example
 ```/**/ use R ::= QQ[x]; /**/ M := mat([[1,2,3],[4,5,6],[7,8,9]]); /**/ eigenvectors(M, x); [record[MinPoly := x, eigenspace := matrix(QQ, [[-1], [2], [-1]])], record[MinPoly := x^2 -15*x -18, eigenspace := [[1, (1/8)*x +1/4, (1/4)*x -1/2]]] ] /**/ M := mat([[0,2,0,0],[1,0,0,0],[0,0,0,2],[0,0,1,0]]); eigenvectors(M, x); -- two irrational eigenvalues, each with eigenspace of dimension 2 [record[MinPoly := x^2 -2, eigenspace := [[1, (1/2)*x, 0, 0], [0, 0, 1, (1/2)*x]]]] ```