Eigenvalues and Eigenvectors

Eigenvalues and eigenvectors.

The eigenvalues of a matrix m are the values (Subscript[λ, i]) for which one can find nonzero vectors (Subscript[v, i]) such that m.(Subscript[v, i])==(Subscript[λ, i])(Subscript[v, i]). The eigenvectors are the vectors (Subscript[v, i]).

The characteristic polynomial  (RefLink[CharacteristicPolynomial, paclet:ref/CharacteristicPolynomial])[m,x] for an n×n matrix is given by (RefLink[Det, paclet:ref/Det])[m-x (RefLink[IdentityMatrix, paclet:ref/IdentityMatrix])[n]]. The eigenvalues are the roots of this polynomial.

Finding the eigenvalues of an n×n matrix in general involves solving an n(^th)-degree polynomial equation. For n≥5, therefore, the results cannot in general be expressed purely in terms of explicit radicals. (RefLink[Root, paclet:ref/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:

Eigenvalues[{{a,b},{-b,2a}}]

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

Here is a 2×2 numerical matrix:

m={{2.3,4.5},{6.7,-1.2}}

The matrix has two eigenvalues, in this case both real:

Eigenvalues[m]

Here are the two eigenvectors of m:

Eigenvectors[m]

(RefLink[Eigensystem, paclet:ref/Eigensystem]) computes the eigenvalues and eigenvectors at the same time. The assignment sets vals to the list of eigenvalues, and vecs to the list of eigenvectors:

{vals,vecs}=Eigensystem[m]

This verifies that the first eigenvalue and eigenvector satisfy the appropriate condition:

m.vecs[[1]]==vals[[1]] vecs[[1]]

This finds the eigenvalues of a random 4×4 matrix. For nonsymmetric matrices, the eigenvalues can have imaginary parts:

Eigenvalues[Table[RandomReal[],{4},{4}]]

The function (RefLink[Eigenvalues, paclet:ref/Eigenvalues]) always gives you a list of n eigenvalues for an n×n matrix. The eigenvalues correspond to the roots of the characteristic polynomial for the matrix, and may not necessarily be distinct. (RefLink[Eigenvectors, paclet:ref/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 n, then (RefLink[Eigenvectors, paclet:ref/Eigenvectors]) supplements the list with zero vectors, so that the total length of the list is always n.

Here is a 3×3 matrix:

mz={{0,1,0},{0,0,1},{0,0,0}}

The matrix has three eigenvalues, all equal to zero:

Eigenvalues[mz]

There is, however, only one independent eigenvector for the matrix. (RefLink[Eigenvectors, paclet:ref/Eigenvectors]) appends two zero vectors to give a total of three vectors in this case:

Eigenvectors[mz]

This gives the characteristic polynomial of the matrix:

CharacteristicPolynomial[mz,x]

Finding largest and smallest eigenvalues.

(RefLink[Eigenvalues, paclet:ref/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 (RefLink[Eigenvalues, paclet:ref/Eigenvalues])[m,k] and (RefLink[Eigenvalues, paclet:ref/Eigenvalues])[m,-k].

This computes the exact eigenvalues of an integer matrix:

Eigenvalues[{{1,2},{3,4}}]

The eigenvalues are sorted in decreasing order of size:

N[%]

This gives the three eigenvalues with largest absolute value:

Eigenvalues[Table[N[Tan[i/j]],{i,10},{j,10}],3]

Generalized eigenvalues, eigenvectors, and characteristic polynomial.

The generalized eigenvalues for a matrix m with respect to a matrix a are defined to be those (Subscript[λ, i]) for which m.(Subscript[v, i])==(Subscript[λ, i])a.(Subscript[v, i]).

The generalized eigenvalues correspond to zeros of the generalized characteristic polynomial (RefLink[Det, paclet:ref/Det])[m-x a].

Note that while ordinary matrix eigenvalues always have definite values, some generalized eigenvalues will always be (RefLink[Indeterminate, paclet:ref/Indeterminate]) if the generalized characteristic polynomial vanishes, which happens if m and a 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 (RefLink[Indeterminate, paclet:ref/Indeterminate]):

Eigenvalues[{{{1.5,0},{0,0}},{{2,0},{1,0}}}]

This gives a generalized characteristic polynomial:

CharacteristicPolynomial[{{{1.5, 0}, {0, 1}}, {{2, 0}, {1, 0}}},x]