Eigenvalues and Eigenvectors

Eigenvalues[m]a list of the eigenvalues of m
Eigenvectors[m]a list of the eigenvectors of m
Eigensystem[m]a list of the form
Eigenvalues[N[m]], etc.numerical eigenvalues
Eigenvalues[N[m,p]], etc.numerical eigenvalues, starting with p-digit precision
CharacteristicPolynomial[m,x]the characteristic polynomial of m

Eigenvalues and eigenvectors.

The eigenvalues of a matrix are the values for which one can find nonzero vectors such that . The eigenvectors are the vectors .

The characteristic polynomial CharacteristicPolynomial[m, x] for an × matrix is given by Det[m-x IdentityMatrix[n]]. The eigenvalues are the roots of this polynomial.

Finding the eigenvalues of an × matrix in general involves solving an ^(th)-degree polynomial equation. For , therefore, the results cannot in general be expressed purely in terms of explicit radicals. Root objects can nevertheless always be used, although except for fairly sparse or otherwise simple matrices the expressions obtained are often unmanageably complex.

Even for a matrix as simple as this, the explicit form of the eigenvalues is quite complicated.
In[1]:=
Click for copyable input
Out[1]=

If you give a matrix of approximate real numbers, Mathematica will find the approximate numerical eigenvalues and eigenvectors.

Here is a 2×2 numerical matrix.
In[2]:=
Click for copyable input
Out[2]=
The matrix has two eigenvalues, in this case both real.
In[3]:=
Click for copyable input
Out[3]=
Here are the two eigenvectors of .
In[4]:=
Click for copyable input
Out[4]=
Eigensystem computes the eigenvalues and eigenvectors at the same time. The assignment sets to the list of eigenvalues, and to the list of eigenvectors.
In[5]:=
Click for copyable input
Out[5]=
This verifies that the first eigenvalue and eigenvector satisfy the appropriate condition.
In[6]:=
Click for copyable input
Out[6]=
This finds the eigenvalues of a random 4×4 matrix. For nonsymmetric matrices, the eigenvalues can have imaginary parts.
In[7]:=
Click for copyable input
Out[7]=

The function Eigenvalues always gives you a list of eigenvalues for an × matrix. The eigenvalues correspond to the roots of the characteristic polynomial for the matrix, and may not necessarily be distinct. Eigenvectors, on the other hand, gives a list of eigenvectors which are guaranteed to be independent. If the number of such eigenvectors is less than , then Eigenvectors appends zero vectors to the list it returns, so that the total length of the list is always .

Here is a 3×3 matrix.
In[8]:=
Click for copyable input
Out[8]=
The matrix has three eigenvalues, all equal to zero.
In[9]:=
Click for copyable input
Out[9]=
There is, however, only one independent eigenvector for the matrix. Eigenvectors appends two zero vectors to give a total of three vectors in this case.
In[10]:=
Click for copyable input
Out[10]=
This gives the characteristic polynomial of the matrix.
In[11]:=
Click for copyable input
Out[11]=
Eigenvalues[m,k]the largest k eigenvalues of m
Eigenvectors[m,k]the corresponding eigenvectors of m
Eigensystem[m,k]the largest k eigenvalues with corresponding eigenvectors
Eigenvalues[m,-k]the smallest k eigenvalues of m
Eigenvectors[m,-k]the corresponding eigenvectors of m
Eigensystem[m,-k]the smallest k eigenvalues with corresponding eigenvectors

Finding largest and smallest eigenvalues.

Eigenvalues sorts numeric eigenvalues so that the ones with large absolute value come first. In many situations, you may be interested only in the largest or smallest eigenvalues of a matrix. You can get these efficiently using Eigenvalues[m, k] and Eigenvalues[m, -k].

This computes the exact eigenvalues of an integer matrix.
In[12]:=
Click for copyable input
Out[12]=
The eigenvalues are sorted in decreasing order of size.
In[13]:=
Click for copyable input
Out[13]=
This gives the three eigenvalues with largest absolute value.
In[14]:=
Click for copyable input
Out[14]=
Eigenvalues[{m,a}]the generalized eigenvalues of m with respect to a
Eigenvectors[{m,a}]the generalized eigenvectors of m with respect to a
Eigensystem[{m,a}]the generalized eigensystem of m with respect to a
CharacteristicPolynomial[{m,a},x]the generalized characteristic polynomial of m with respect to a

Generalized eigenvalues, eigenvectors, and characteristic polynomial.

The generalized eigenvalues for a matrix with respect to a matrix are defined to be those for which .

The generalized eigenvalues correspond to zeros of the generalized characteristic polynomial Det[m-x a].

Note that while ordinary matrix eigenvalues always have definite values, some generalized eigenvalues will always be Indeterminate if the generalized characteristic polynomial vanishes, which happens if and share a null space. Note also that generalized eigenvalues can be infinite.

These two matrices share a one-dimensional null space, so one generalized eigenvalue is Indeterminate.
In[15]:=
Click for copyable input
Out[15]=
This gives a generalized characteristic polynomial.
In[16]:=
Click for copyable input
Out[16]=
New to Mathematica? Find your learning path »
Have a question? Ask support »