Eigenvalues and Eigenvectors
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


-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.
| 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.
| Out[2]= |  |
The matrix has two eigenvalues, in this case both real.
| Out[3]= |  |
Here are the two eigenvectors of

.
| 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.
| Out[5]= |  |
This verifies that the first eigenvalue and eigenvector satisfy the appropriate condition.
| Out[6]= |  |
This finds the eigenvalues of a random 4×4 matrix. For nonsymmetric matrices, the eigenvalues can have imaginary parts.
| 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

.
| Out[8]= |  |
The matrix has three eigenvalues, all equal to zero.
| 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.
| Out[10]= |  |
This gives the characteristic polynomial of the matrix.
| 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
and
Eigenvalues
.
This computes the exact eigenvalues of an integer matrix.
| Out[12]= |  |
The eigenvalues are sorted in decreasing order of size.
| Out[13]= |  |
This gives the three eigenvalues with largest absolute value.
| 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
.
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.
| Out[15]= |  |
This gives a generalized characteristic polynomial.
| Out[16]= |  |