This is documentation for Mathematica 4, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Wolfram Research, Inc.

Solving Linear SystemsAdvanced Topic: Matrix Decompositions

3.7.9 Eigenvalues and Eigenvectors

Eigenvalues and eigenvectors.

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

Finding the eigenvalues of an matrix in principle 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.

In[1]:= Eigenvalues[ {{a, b}, {-b, 2a}} ]


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

Here is a numerical matrix.

In[2]:= m = {{2.3, 4.5}, {6.7, -1.2}}


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

In[3]:= Eigenvalues[ m ]


Here are the two eigenvectors of m.

In[4]:= Eigenvectors[ m ]


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.

In[5]:= {vals, vecs} = Eigensystem[m]


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

In[6]:= m . vecs[[1]] == vals[[1]] vecs[[1]]


This finds the eigenvalues of a random matrix. For non-symmetric matrices, the eigenvalues can have imaginary parts.

In[7]:= Eigenvalues[ Table[Random[ ], {4}, {4}] ]


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 matrix.

In[8]:= mz = {{0, 1, 0}, {0, 0, 1}, {0, 0, 0}}


The matrix has three eigenvalues, all equal to zero.

In[9]:= Eigenvalues[mz]


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]:= Eigenvectors[mz]


Solving Linear SystemsAdvanced Topic: Matrix Decompositions