Index <book-index.html>`__

8.4 Computation of Eigenvalues and EigenvectorsΒΆ

In this section we show you some of FriCAS’s facilities for computing and eigenvalue manipulating eigenvalues and eigenvectors, also called eigenvector characteristic values and characteristic vectors, characteristic:value respectively. characteristic:vector

Let’s first create a matrix with integer entries.

m1 := matrix [ [1,2,1],[2,1,-2],[1,-2,4] ]

Type: Matrix Integer

To get a list of the rational eigenvalues, use the operation eigenvalues.

leig := eigenvalues(m1)

Type: List Union(Fraction Polynomial Integer,SuchThat(Symbol,Polynomial Integer))

Given an explicit eigenvalue, eigenvector computes the eigenvectors corresponding to it.


Type: List Matrix Fraction Polynomial Fraction Integer

The operation eigenvectors returns a list of pairs of values and vectors. When an eigenvalue is rational, FriCAS gives you the value explicitly; otherwise, its minimal polynomial is given, (the polynomial of lowest degree with the eigenvalues as roots), together with a parametric representation of the eigenvector using the eigenvalue. This means that if you ask FriCAS to solve the minimal polynomial, then you can substitute these roots polynomial:minimal into the parametric form of the corresponding eigenvectors. minimal polynomial

You must be aware that unless an exact eigenvalue has been computed, the eigenvector may be badly in error.


Type: List Record(eigval: Union(Fraction Polynomial Integer,SuchThat(Symbol,Polynomial Integer)),eigmult: NonNegativeInteger,eigvec: List Matrix Fraction Polynomial Integer)

Another possibility is to use the operation radicalEigenvectors tries to compute explicitly the eigenvectors in terms of radicals. radical


Type: List Record(radval: Expression Integer,radmult: Integer,radvect: List Matrix Expression Integer)

Alternatively, FriCAS can compute real or complex approximations to the approximation eigenvectors and eigenvalues using the operations realEigenvectors or complexEigenvectors. They each take an additional argument to specify the precision required. precision In the real case, this means that each approximation will be within of the actual result. In the complex case, this means that each approximation will be within of the actual result in each of the real and imaginary parts.

The precision can be specified as a Float if the results are desired in floating-point notation, or as Fraction Integer if the results are to be expressed using rational (or complex rational) numbers.


Type: List Record(outval: Fraction Integer,outmult: Integer,outvect: List Matrix Fraction Integer)

If an n by n matrix has n distinct eigenvalues (and therefore n eigenvectors) the operation eigenMatrix gives you a matrix of the eigenvectors.


Type: Union(Matrix Expression Integer,...)

m2 := matrix [ [-5,-2],[18,7] ]

Type: Matrix Integer


Type: Union(“failed”,...)

If a symmetric matrix matrix:symmetric has a basis of orthonormal eigenvectors, then basis:orthonormal orthonormalBasis computes a list of these vectors. orthonormal basis

m3 := matrix [ [1,2],[2,1] ]

Type: Matrix Integer


Type: List Matrix Expression Integer

Index <book-index.html>`__