Section EE Eigenvalues and Eigenvectors
In this section, we will define the eigenvalues and eigenvectors of a matrix, and see how to compute them. More theoretical properties will be taken up in the next section.
Subsection EEM Eigenvalues and Eigenvectors of a Matrix
We start with the principal definition for this chapter.
Definition EEM. Eigenvalues and Eigenvectors of a Matrix.
Suppose that \(A\) is a square matrix of size \(n\text{,}\) \(\vect{x}\neq\zerovector\) is a vector in \(\complex{n}\text{,}\) and \(\lambda\) is a scalar in \(\complexes\text{.}\) Then we say \(\vect{x}\) is an eigenvector of \(A\) with eigenvalue \(\lambda\) if
Before going any further, perhaps we should convince you that such things ever happen at all. Understand the next example, but do not concern yourself with where the pieces come from. We will have methods soon enough to be able to discover these eigenvectors ourselves.
Example SEE. Some eigenvalues and eigenvectors.
Consider the matrix
and the vectors
Then
so \(\vect{x}\) is an eigenvector of \(A\) with eigenvalue \(\lambda=4\text{.}\)
Also,
so \(\vect{y}\) is an eigenvector of \(A\) with eigenvalue \(\lambda=0\text{.}\)
Also,
so \(\vect{z}\) is an eigenvector of \(A\) with eigenvalue \(\lambda=2\text{.}\)
Also,
so \(\vect{w}\) is an eigenvector of \(A\) with eigenvalue \(\lambda=2\text{.}\)
So we have demonstrated four eigenvectors of \(A\text{.}\) Are there more? Yes, any nonzero scalar multiple of an eigenvector is again an eigenvector. In this example, set \(\vect{u}=30\vect{x}\text{.}\) Then
so that \(\vect{u}\) is also an eigenvector of \(A\) for the same eigenvalue, \(\lambda=4\text{.}\)
The vectors \(\vect{z}\) and \(\vect{w}\) are both eigenvectors of \(A\) for the same eigenvalue \(\lambda=2\text{,}\) yet this is not as simple as the two vectors just being scalar multiples of each other (they are not). Look what happens when we add them together, to form \(\vect{v}=\vect{z}+\vect{w}\text{,}\) and multiply by \(A\text{,}\)
so that \(\vect{v}\) is also an eigenvector of \(A\) for the eigenvalue \(\lambda=2\text{.}\) So it would appear that the set of eigenvectors that are associated with a fixed eigenvalue is closed under the vector space operations of \(\complex{n}\text{.}\) Hmmm.
The vector \(\vect{y}\) is an eigenvector of \(A\) for the eigenvalue \(\lambda=0\text{,}\) so we can use Theorem ZSSM to write \(A\vect{y}=0\vect{y}=\zerovector\text{.}\) But this also means that \(\vect{y}\in\nsp{A}\text{.}\) There would appear to be a connection here also.
Sage EE. Eigenvalues and Eigenvectors.
Sage can compute eigenvalues and eigenvectors of matrices. We will see shortly that there are subtleties involved with using these routines, but here is a quick example to start. These two commands should be enough to get you started with most of the early examples in this section. See the end of the section for more comprehensive advice.
For a square matrix, the methods .eigenvalues()
and .eigenvectors_right()
will produce what you expect, though the format of the eigenvector output requires some explanation. Here is Example SEE from the start of this chapter.
The three eigenvalues we know are included in the output of eigenvalues()
, though for some reason the eigenvalue \(\lambda=2\) shows up twice.
The output of the eigenvectors_right()
method is a list of triples. Each triple begins with an eigenvalue. This is followed by a list of eigenvectors for that eigenvalue. Notice the first eigenvector is identical to the one we described in Example SEE. The eigenvector for \(\lambda=0\) is different, but is just a scalar multiple of the one from Example SEE. For \(\lambda=2\text{,}\) we now get two eigenvectors, and neither looks like either of the ones from Example SEE. (Hint: try writing each of the eigenvectors for \(\lambda=2\) from the example as linear combinations of the two eigenvectors provided by Sage.) An explanation of the third part of each triple (an integer) will have to wait, though it can be optionally suppressed if desired.
One cautionary note: The word lambda
has a special purpose in Sage, so do not try to use this as a name for your eigenvalues.
Example SEE hints at a number of intriguing properties, and there are many more. We will explore the general properties of eigenvalues and eigenvectors in Section PEE, but in this section we will concern ourselves with the question of actually computing eigenvalues and eigenvectors. First we need a bit of background material on polynomials and matrices.
Subsection PM Polynomials and Matrices
A polynomial is a combination of powers, multiplication by scalar coefficients, and addition (with subtraction just being the inverse of addition). We never have occasion to divide when computing the value of a polynomial. So it is with matrices. We can add and subtract matrices, we can multiply matrices by scalars, and we can form powers of square matrices by repeated applications of matrix multiplication. We do not normally divide matrices (though sometimes we can multiply by an inverse). If a matrix is square, all the operations constituting a polynomial will preserve the size of the matrix. So it is natural to consider evaluating a polynomial with a matrix, effectively replacing the variable of the polynomial by a matrix. We will demonstrate with an example.
Example PM. Polynomial of a matrix.
Let
and we will compute \(p(D)\text{.}\)
First, the necessary powers of \(D\text{.}\) Notice that \(D^0\) is defined to be the multiplicative identity, \(I_3\text{,}\) as will be the case in general. We have
Then
Notice that \(p(x)\) factors as
Because \(D\) commutes with itself (\(DD=DD\)), we can use distributivity of matrix multiplication across matrix addition (Theorem MMDAA) without being careful with any of the matrix products, and just as easily evaluate \(p(D)\) using the factored form of \(p(x)\text{,}\)
This example is not meant to be too profound. It is meant to show you that it is natural to evaluate a polynomial with a matrix, and that the factored form of the polynomial is as good as (or maybe better than) the expanded form. And do not forget that constant terms in polynomials are really multiples of the identity matrix when we are evaluating the polynomial with a matrix.
Subsection EEE Existence of Eigenvalues and Eigenvectors
Before we embark on computing eigenvalues and eigenvectors, we will prove that every matrix has at least one eigenvalue (and an eigenvector to go with it). Later, in Theorem MNEM, we will determine the maximum number of eigenvalues a matrix may have.
The determinant (Definition DM) will be a powerful tool in Subsection EE.CEE when it comes time to compute eigenvalues. However, it is possible, with some more advanced machinery, to compute eigenvalues without ever making use of the determinant. Sheldon Axler does just that in his book, Linear Algebra Done Right. Here and now, we give Axler's “determinant-free” proof that every matrix has an eigenvalue. The result is not too startling, but the proof is most enjoyable.
Theorem EMHE. Every Matrix Has an Eigenvalue.
Suppose \(A\) is a square matrix. Then \(A\) has at least one eigenvalue.
Proof.
Suppose that \(A\) has size \(n\text{,}\) and choose \(\vect{x}\) as any nonzero vector from \(\complex{n}\text{.}\) (Notice how much latitude we have in our choice of \(\vect{x}\text{.}\) Only the zero vector is off-limits.) Consider the set
This is a set of \(n+1\) vectors from \(\complex{n}\text{,}\) so by Theorem MVSLD, \(S\) is linearly dependent. Let \(a_0,\,a_1,\,a_2,\,\ldots,\,a_n\) be a collection of \(n+1\) scalars from \(\complexes\text{,}\) not all zero, that provide a relation of linear dependence on \(S\text{.}\) In other words,
Some of the \(a_i\) are nonzero. Suppose that just \(a_0\neq 0\text{,}\) and \(a_1=a_2=a_3=\cdots=a_n=0\text{.}\) Then \(a_0\vect{x}=\zerovector\) and by Theorem SMEZV, either \(a_0=0\) or \(\vect{x}=\zerovector\text{,}\) which are both contradictions. So \(a_i\neq 0\) for some \(i\geq 1\text{.}\) Let \(m\) be the largest integer such that \(a_m\neq 0\text{.}\) From this discussion we know that \(m\geq 1\text{.}\) We can also assume that \(a_m=1\text{,}\) for if not, replace each \(a_i\) by \(a_i/a_m\) to obtain scalars that serve equally well in providing a relation of linear dependence on \(S\text{.}\)
Define the polynomial
Because we have consistently used \(\complexes\) as our set of scalars (rather than \({\mathbb R}\)), we know that we can factor \(p(x)\) into linear factors of the form \((x-b_i)\text{,}\) where \(b_i\in\complexes\text{.}\) So there are scalars, \(\scalarlist{b}{m}\text{,}\) from \(\complexes\) so that,
Put it all together and
Let \(k\) be the smallest integer such that
From the preceding equation, we know that \(k\leq m\text{.}\) Define the vector \(\vect{z}\) by
Notice that by the definition of \(k\text{,}\) the vector \(\vect{z}\) must be nonzero. In the case where \(k=1\text{,}\) we understand that \(\vect{z}\) is defined by \(\vect{z}=\vect{x}\text{,}\) and \(\vect{z}\) is still nonzero. Now
which allows us to write
Since \(\vect{z}\neq\zerovector\text{,}\) this equation says that \(\vect{z}\) is an eigenvector of \(A\) for the eigenvalue \(\lambda=b_k\) (Definition EEM), so we have shown that any square matrix \(A\) does have at least one eigenvalue.
The proof of Theorem EMHE is constructive (it contains an unambiguous procedure that leads to an eigenvalue), but it is not meant to be practical. We will illustrate the theorem with an example, the purpose being to provide a companion for studying the proof and not to suggest this is the best procedure for computing an eigenvalue.
Example CASE. Computing a single eigenvalue.
This example illustrates the proof of Theorem EMHE, and so will employ the same notation as the proof — look there for full explanations. It is not meant to be a final example of a reasonable computational approach to finding eigenvalues and eigenvectors. OK, warnings in place, here we go.
Consider the matrix \(A\text{,}\) and choose the vector \(\vect{x}\text{,}\)
It is important to notice that the choice of \(\vect{x}\) could be anything, so long as it is not the zero vector. We have not chosen \(\vect{x}\) totally at random, but so as to make our illustration of the theorem as general as possible. You could replicate this example with your own choice and the computations are guaranteed to be reasonable, provided you have a computational tool that will factor a fifth degree polynomial for you.
The set
is guaranteed to be linearly dependent, as it has six vectors from \(\complex{5}\) (Theorem MVSLD).
We will search for a nontrivial relation of linear dependence by solving a homogeneous system of equations whose coefficient matrix has the vectors of \(S\) as columns through row operations,
There are four free variables for describing solutions to this homogeneous system, so we have our pick of solutions. The most expedient choice would be to set \(x_3=1\) and \(x_4=x_5=x_6=0\text{.}\) However, we will again opt to maximize the generality of our illustration of Theorem EMHE and choose \(x_3=-8\text{,}\) \(x_4=-3\text{,}\) \(x_5=1\) and \(x_6=0\text{.}\) This leads to a solution with \(x_1=16\) and \(x_2=12\text{.}\)
This relation of linear dependence then says that
So we define \(p(x)=16+12x-8x^2-3x^3+x^4\text{,}\) and as advertised in the proof of Theorem EMHE, we have a polynomial of degree \(m=4\geq 1\) such that \(p(A)\vect{x}=\zerovector\text{.}\) Now we need to factor \(p(x)\) over \(\complexes\text{.}\) If you made your own choice of \(\vect{x}\) at the start, this is where you might have a fifth degree polynomial, and where you might need to use a computational tool to find roots and factors. We have
So we know that
We apply one factor at a time, until we get the zero vector, so as to determine the value of \(k\) described in the proof of Theorem EMHE,
So \(k=3\) and
is an eigenvector of \(A\) for the eigenvalue \(\lambda=-2\text{,}\) as you can check by doing the computation \(A\vect{z}\text{.}\)
Using the same choice of \(\vect{x}\text{,}\) will lead to the same polynomial \(p(x)\text{,}\) but we can work with the factorization in a different order.
Now \(k=2\) and
is an eigenvector of \(A\) for the eigenvalue \(\lambda=-1\text{,}\) as you can check by doing the computation \(A\vect{z}\text{.}\)
Theorem EMHE guarantees the existence of an eigenvalue, and the constructive proof (see Proof Technique C) provides a procedure for finding an eigenvalue, provided we can factor a polynomial partway through. But it does not seem to offer much control. We choose (guess?) any vector \(\vect{x}\text{,}\) and the set of linearly dependent vectors created via powers of the matrix could have many different choices (guesses?) for relations of linear dependence leading to many different polynomials. In the extreme you could be unlucky (or lucky?) and end up with a degree 1 polynomial. For example, choose
and observe that the vectors \(A^i\vect{x}\) lead with
which is already a linearly dependent set. So a possible polynomial is \(p(x)=x-3\text{,}\) and we recognize that \(\vect{x}\) happens to be an eigenvector of \(A\text{!}\) If we want to find some of the other eigenvalues of \(A\) we need to start over with another choice of \(\vect{x}\text{.}\) (Why? Compute a few more \(A^i\vect{x}\) to see what happens.)
So the goal of this chapter is to make eigenvalues less mysterious, but knowing that they actually exist is a good start.
If you work through this example with your own choice of the vector \(\vect{x}\) (strongly recommended) then the eigenvalue you will find may be different, but will be in the set \(\set{3,\,0,\,1,\,-1,\,-2}\text{.}\) See Exercise EE.M60 for a suggested starting vector.
Subsection CEE Computing Eigenvalues and Eigenvectors
Fortunately, we need not rely on the procedure of Theorem EMHE each time we need an eigenvalue. It is the determinant, and specifically Theorem SMZD, that provides the main tool for computing eigenvalues. It may already be clear from Theorem EMHE and Example CASE that for an eigenvalue \(\lambda\) the matrix \(A-\lambda I\) plays an important role. Here is the formal version as a theorem.
Theorem ESM. Eigenvalues and Singular Matrices.
Suppose \(A\) is a square matrix of size \(n\text{.}\) Then \(\lambda\) is an eigenvalue of \(A\) if and only if \(A-\lambda I_n\) is a singular matrix.
Proof.
Both directions of the proof can be accomplished with the following chain of equivalences,
(⇒)
Suppose \(\lambda\) is an eigenvalue of \(A\) with eigenvector \(\vect{x}\neq\zerovector\text{.}\) Then the equivalences above and Definition NM show that \(A-\lambda I_n\) is singular.
(⇐)
Suppose that \(A-\lambda I_n\) is singular. Then Definition NM guarantees the existence of \(\vect{x}\text{,}\) a nonzero solution to \(\homosystem{A-\lambda I_n}\text{.}\) Then the equivalences above show that \(\vect{x}\) is an eigenvector of \(A\) with eigenvalue \(\lambda\text{.}\)
So, for an eigenvalue \(\lambda\) and associated eigenvector \(\vect{x}\neq\zerovector\text{,}\) the vector \(\vect{x}\) will be a nonzero element of the null space of \(A-\lambda I_n\text{,}\) while the matrix \(A-\lambda I_n\) will be singular and therefore have zero determinant. These ideas are made precise in Theorem EMRCP and Theorem EMNS, but for now this brief discussion should suffice as motivation for the following definition and example.
Definition CP. Characteristic Polynomial.
Suppose that \(A\) is a square matrix of size \(n\text{.}\) Then the characteristic polynomial of \(A\) is the polynomial \(\charpoly{A}{x}\) defined by
Example CPMS3. Characteristic polynomial of a matrix, size 3.
Consider
Then
The characteristic polynomial is our main computational tool for finding eigenvalues, and will sometimes be used to aid us in determining the properties of eigenvalues.
Theorem EMRCP. Eigenvalues of a Matrix are Roots of Characteristic Polynomials.
Suppose \(A\) is a square matrix. Then \(\lambda\) is an eigenvalue of \(A\) if and only if \(\charpoly{A}{\lambda}=0\text{.}\)
Proof.
Suppose \(A\) has size \(n\text{.}\) Then
Example EMS3. Eigenvalues of a matrix, size 3.
In Example CPMS3 we found the characteristic polynomial of
to be \(\charpoly{F}{x}=-(x-3)(x+1)^2\text{.}\) Factored, we can find all of its roots easily, they are \(x=3\) and \(x=-1\text{.}\) By Theorem EMRCP, \(\lambda=3\) and \(\lambda=-1\) are both eigenvalues of \(F\text{,}\) and these are the only eigenvalues of \(F\text{.}\) We have found them all.
Let us now turn our attention to the computation of eigenvectors.
Definition EM. Eigenspace of a Matrix.
Suppose that \(A\) is a square matrix and \(\lambda\) is an eigenvalue of \(A\text{.}\) Then the eigenspace of \(A\) for \(\lambda\text{,}\) \(\eigenspace{A}{\lambda}\text{,}\) is the set of all the eigenvectors of \(A\) for \(\lambda\text{,}\) together with the inclusion of the zero vector.
Example SEE hinted that the set of eigenvectors for a single eigenvalue might have some closure properties, and with the addition of the one eigenvector that is never an eigenvector, \(\zerovector\text{,}\) we indeed get a whole subspace.
Theorem EMS. Eigenspace for a Matrix is a Subspace.
Suppose \(A\) is a square matrix of size \(n\) and \(\lambda\) is an eigenvalue of \(A\text{.}\) Then the eigenspace \(\eigenspace{A}{\lambda}\) is a subspace of the vector space \(\complex{n}\text{.}\)
Proof.
We will check the three conditions of Theorem TSS. First, Definition EM explicitly includes the zero vector in \(\eigenspace{A}{\lambda}\text{,}\) so the set is nonempty.
Suppose that \(\vect{x},\,\vect{y}\in\eigenspace{A}{\lambda}\text{,}\) that is, \(\vect{x}\) and \(\vect{y}\) are two eigenvectors of \(A\) for \(\lambda\text{.}\) Then
So either \(\vect{x}+\vect{y}=\zerovector\text{,}\) or \(\vect{x}+\vect{y}\) is an eigenvector of \(A\) for \(\lambda\) (Definition EEM). So, in either event, \(\vect{x}+\vect{y}\in\eigenspace{A}{\lambda}\text{,}\) and we have additive closure.
Suppose that \(\alpha\in\complexes\text{,}\) and that \(\vect{x}\in\eigenspace{A}{\lambda}\text{,}\) that is, \(\vect{x}\) is an eigenvector of \(A\) for \(\lambda\text{.}\) Then
So either \(\alpha\vect{x}=\zerovector\text{,}\) or \(\alpha\vect{x}\) is an eigenvector of \(A\) for \(\lambda\) (Definition EEM). So, in either event, \(\alpha\vect{x}\in\eigenspace{A}{\lambda}\text{,}\) and we have scalar closure.
With the three conditions of Theorem TSS met, we know \(\eigenspace{A}{\lambda}\) is a subspace.
Theorem EMS tells us that an eigenspace is a subspace (and hence a vector space in its own right). Our next theorem tells us how to quickly construct this subspace.
Theorem EMNS. Eigenspace of a Matrix is a Null Space.
Suppose \(A\) is a square matrix of size \(n\) and \(\lambda\) is an eigenvalue of \(A\text{.}\) Then
Proof.
The conclusion of this theorem is an equality of sets, so normally we would follow the advice of Definition SE. However, in this case we can construct a sequence of equivalences which will together provide the two subset inclusions we need. First, notice that \(\zerovector\in\eigenspace{A}{\lambda}\) by Definition EM and \(\zerovector\in\nsp{A-\lambda I_n}\) by Theorem HSC. Now consider any nonzero vector \(\vect{x}\in\complex{n}\text{,}\)
You might notice the close parallels (and differences) between the proofs of Theorem EMRCP and Theorem EMNS. Since Theorem EMNS describes the set of all the eigenvectors of \(A\) as a null space we can use techniques such as Theorem BNS to provide concise descriptions of eigenspaces. Theorem EMNS also provides a trivial proof for Theorem EMS.
Example ESMS3. Eigenspaces of a matrix, size 3.
Example CPMS3 and Example EMS3 describe the characteristic polynomial and eigenvalues of the \(3\times 3\) matrix
We will now take each eigenvalue in turn and compute its eigenspace. To do this, we row-reduce the matrix \(F-\lambda I_3\) in order to determine solutions to the homogeneous system \(\homosystem{F-\lambda I_3}\) and then express the eigenspace as the null space of \(F-\lambda I_3\) (Theorem EMNS). Theorem BNS then tells us how to write the null space as the span of a basis. We have
Eigenspaces in hand, we can easily compute eigenvectors by forming nontrivial linear combinations of the basis vectors describing each eigenspace. In particular, notice that we can “pretty up” our basis vectors by using scalar multiples to clear out fractions.
Subsection ECEE Examples of Computing Eigenvalues and Eigenvectors
There are no theorems in this section, just a selection of examples meant to illustrate the range of possibilities for the eigenvalues and eigenvectors of a matrix. These examples can all be done by hand, though the computation of the characteristic polynomial would be very time-consuming and error-prone. It can also be difficult to factor an arbitrary polynomial, though if we were to suggest that most of our eigenvalues are going to be integers, then it can be easier to hunt for roots. These examples are meant to look similar to a concatenation of Example CPMS3, Example EMS3 and Example ESMS3. First, we will sneak in a pair of definitions so we can illustrate them throughout this sequence of examples.
Definition AME. Algebraic Multiplicity of an Eigenvalue.
Suppose that \(A\) is a square matrix and \(\lambda\) is an eigenvalue of \(A\text{.}\) Then the algebraic multiplicity of \(\lambda\text{,}\) \(\algmult{A}{\lambda}\text{,}\) is the highest power of \((x-\lambda)\) that divides the characteristic polynomial, \(\charpoly{A}{x}\text{.}\)
Since an eigenvalue \(\lambda\) is a root of the characteristic polynomial, there is always a factor of \((x-\lambda)\text{,}\) and the algebraic multiplicity is just the power of this factor in a factorization of \(\charpoly{A}{x}\text{.}\) So in particular, \(\algmult{A}{\lambda}\geq 1\text{.}\) Compare the definition of algebraic multiplicity with the next definition.
Definition GME. Geometric Multiplicity of an Eigenvalue.
Suppose that \(A\) is a square matrix and \(\lambda\) is an eigenvalue of \(A\text{.}\) Then the geometric multiplicity of \(\lambda\text{,}\) \(\geomult{A}{\lambda}\text{,}\) is the dimension of the eigenspace \(\eigenspace{A}{\lambda}\text{.}\)
Every eigenvalue must have at least one eigenvector, so the associated eigenspace cannot be trivial, and so \(\geomult{A}{\lambda}\geq 1\text{.}\)
Example EMMS4. Eigenvalue multiplicities, matrix of size 4.
Consider the matrix
then
So the eigenvalues are \(\lambda=1,\,2\) with algebraic multiplicities \(\algmult{B}{1}=1\) and \(\algmult{B}{2}=3\text{.}\)
Computing eigenvectors,
So each eigenspace has dimension 1 and so \(\geomult{B}{1}=1\) and \(\geomult{B}{2}=1\text{.}\) This example is of interest because of the discrepancy between the two multiplicities for \(\lambda=2\text{.}\) In many of our examples the algebraic and geometric multiplicities will be equal for all of the eigenvalues (as it was for \(\lambda=1\) in this example), so keep this example in mind. We will have some explanations for this phenomenon later (see Example NDMS4).
Example ESMS4. Eigenvalues, symmetric matrix of size 4.
Consider the matrix
then
So the eigenvalues are \(\lambda=3,\,1,\,-1\) with algebraic multiplicities \(\algmult{C}{3}=1\text{,}\) \(\algmult{C}{1}=2\) and \(\algmult{C}{-1}=1\text{.}\)
Computing eigenvectors,
So the eigenspace dimensions yield geometric multiplicities \(\geomult{C}{3}=1\text{,}\) \(\geomult{C}{1}=2\) and \(\geomult{C}{-1}=1\text{,}\) the same as for the algebraic multiplicities. This example is of interest because \(C\) is a symmetric matrix, and will be the subject of Theorem HMRE.
Example HMEM5. High multiplicity eigenvalues, matrix of size 5.
Consider the matrix
then
So the eigenvalues are \(\lambda=2,\,-1\) with algebraic multiplicities \(\algmult{E}{2}=4\) and \(\algmult{E}{-1}=1\text{.}\)
Computing eigenvectors,
So the eigenspace dimensions yield geometric multiplicities \(\geomult{E}{2}=2\) and \(\geomult{E}{-1}=1\text{.}\) This example is of interest because \(\lambda=2\) has such a large algebraic multiplicity, which is also not equal to its geometric multiplicity.
Example CEMS6. Complex eigenvalues, matrix of size 6.
Consider the matrix
then
So the eigenvalues are \(\lambda=2,\,-1,2+i,\,2-i\) with algebraic multiplicities \(\algmult{F}{2}=1\text{,}\) \(\algmult{F}{-1}=1\text{,}\) \(\algmult{F}{2+i}=2\) and \(\algmult{F}{2-i}=2\text{.}\)
We compute eigenvectors, noting that the last two basis vectors are each a scalar multiple of what Theorem BNS will provide,
Eigenspace dimensions yield geometric multiplicities of \(\geomult{F}{2}=1\text{,}\) \(\geomult{F}{-1}=1\text{,}\) \(\geomult{F}{2+i}=1\) and \(\geomult{F}{2-i}=1\text{.}\) This example demonstrates some of the possibilities for the appearance of complex eigenvalues, even when all the entries of the matrix are real. Notice how all the numbers in the analysis of \(\lambda=2-i\) are conjugates of the corresponding number in the analysis of \(\lambda=2+i\text{.}\) This is the content of the upcoming Theorem ERMCP.
Example DEMS5. Distinct eigenvalues, matrix of size 5.
Consider the matrix
then
So the eigenvalues are \(\lambda=2,\,1,\,0,\,-1,\,-3\) with algebraic multiplicities \(\algmult{H}{2}=1\text{,}\) \(\algmult{H}{1}=1\text{,}\) \(\algmult{H}{0}=1\text{,}\) \(\algmult{H}{-1}=1\) and \(\algmult{H}{-3}=1\text{.}\)
Computing eigenvectors,
So the eigenspace dimensions yield geometric multiplicities \(\geomult{H}{2}=1\text{,}\) \(\geomult{H}{1}=1\text{,}\) \(\geomult{H}{0}=1\text{,}\) \(\geomult{H}{-1}=1\) and \(\geomult{H}{-3}=1\text{,}\) identical to the algebraic multiplicities. This example is of interest for two reasons. First, \(\lambda=0\) is an eigenvalue, illustrating the upcoming Theorem SMZE. Second, all the eigenvalues are distinct, yielding algebraic and geometric multiplicities of 1 for each eigenvalue, illustrating Theorem DED.
Sage CEVAL. Computing Eigenvalues.
We can now give a more careful explanation about eigenvalues in Sage. Sage will compute the characteristic polynomial of a matrix, with amazing ease (in other words, quite quickly, even for large matrices). The two matrix methods .charpoly()
and .characteristic_polynomial()
do exactly the same thing. We will use the longer name just to be more readable, you may prefer the shorter.
We now can appreciate a very fundamental obstacle to determining the eigenvalues of a matrix, which is a theme that will run through any advanced study of linear algebra. Study this example carefully before reading the discussion that follows.
We know by Theorem EMRCP that to compute eigenvalues, we need the roots of the characteristic polynomial, and from basic algebra, we know these correspond to linear factors. However, with our matrix defined with entries from QQ
, the factorization of the characteristic polynomial does not “leave” that number system, only factoring “far enough” to retain factors with rational coefficients. The solutions to \(x^2 - 2 = 0\) are somewhat obvious (\(\pm\sqrt{2}\approx\pm 1.414213\)), but the roots of the cubic factor are more obscure.
But then we have QQbar
to the rescue. Since this number system contains the roots of every possible polynomial with integer coefficients, we can totally factor any characteristic polynomial that results from a matrix with entries from QQbar
. A common situation will be to begin with a matrix having rational entries, yet the matrix has a characteristic polynomial with roots that are complex numbers.
We can demonstrate this behavior with the extend
keyword option, which tells Sage whether or not to expand the number system to contain the eigenvalues.
For matrices with entries from QQ
, the default behavior is to extend to QQbar
when necessary. But for other number systems, you may need to explicitly use the extend=True
option.
From a factorization of the characteristic polynomial, we can see the algebraic multiplicity of each eigenvalue as the second entry of the each pair returned in the list. We demonstrate with Example SEE, extending to QQbar
, which is not strictly necessary for this simple matrix.
One more example, which illustrates the behavior when we use floating-point approximations as entries (in other words, we use CDF
as our number system). This is Example EMMS4, both as an exact matrix with entries from QQbar
and as an approximate matrix with entries from CDF
.
So, we see \(\lambda=2\) as an eigenvalue with algebraic multiplicity 3, while the numerical results contain three complex numbers, each very, very close to 2. The approximate nature of these eigenvalues may be disturbing (or alarming). However, their computation, as floating-point numbers, can be incredibly fast with sophisticated algorithms allowing the analysis of huge matrices with millions of entries. And perhaps your original matrix includes data from an experiment, and is not even exact in the first place. Designing and analyzing algorithms to perform these computations quickly and accurately is part of the field known as numerical linear algebra.
One cautionary note: Sage uses a definition of the characteristic polynomial slightly different than ours, namely \(\detname{xI_n-A}\text{.}\) This has the advantage that the \(x^n\) term always has a positive one as the leading coefficient. For even values of \(n\) the two definitions create the identical polynomial, and for odd values of \(n\text{,}\) the two polynomials differ only by a multiple of \(-1\text{.}\) The reason this is not very critical is that Theorem EMRCP is true in either case, and this is a principal use of the characteristic polynomial. Our definition is more amenable to computations by hand.
Sage CEVEC. Computing Eigenvectors.
There are three ways to get eigenvectors in Sage. For each eigenvalue, the method .eigenvectors_right()
will return a list of eigenvectors that is a basis for the associated eigenspace. The method .eigenspaces_right()
will return an eigenspace (in other words, a vector space, rather than a list of vectors) for each eigenvalue. There are also eigenmatrix
methods which we will describe at the end of the chapter in Sage MD.
The matrix method .eigenvectors_right()
(or equivalently the matrix method .right_eigenvectors()
) produces a list of triples, one triple per eigenvalue. Each triple has an eigenvalue, a list, and then the algebraic multiplicity of the eigenvalue. The list contains vectors forming a basis for the eigenspace. Notice that the length of the list of eigenvectors will be the geometric multiplicity (and there is no easier way to get this information).
Note that this is a good place to practice burrowing down into Sage output that is full of lists (and lists of lists). See if you can extract just the second eigenvector for \(\lambda=3\) using a single statement. Or perhaps try obtaining the geometric multiplicity of \(\lambda=-2i\text{.}\) Notice, too, that Sage has automatically upgraded to QQbar
to get the complex eigenvalues.
The matrix method .eigenspaces_right()
(equal to .right_eigenspaces()
) produces a list of pairs, one pair per eigenvalue. Each pair has an eigenvalue, followed by the eigenvalue's eigenspace. Notice that the basis matrix of the eigenspace may not have the same eigenvectors you might get from other methods. Similar to the eigenvectors
method, the dimension of the eigenspace will yield the geometric multiplicity (and there is no easier way to get this information). If you need the algebraic multiplicities, you can supply the keyword option algebraic_multiplicity=True
to get back triples with the algebraic multiplicity in the third entry of the triple. We will recycle the example above, and not demonstrate the algebraic multiplicity option. (We have formatted the one-row basis matrices over QQbar
across several lines.)
Notice how the output includes a subspace of dimension two over the rationals, and two subspaces of dimension one over the algebraic numbers.
The upcoming Subsection EE.ECEE has many examples, which mostly reflect techniques that might be possible to verify by hand. Here is the same matrix as above, analyzed in a similar way. Practicing the examples in this subsection, either directly with the higher-level Sage commands, and/or with more primitive commands (as below) would be an extremely good exercise at this point.
Notice how we changed the number system to the algebraic numbers before working with the complex eigenvalues. Also, we are using the basis='pivot'
keyword option so that bases for the eigenspaces look more like the bases described in Theorem BNS.
By now, it should be clear why we keep using the “right” variants of these methods. Eigenvectors can be defined “on the right”, \(A\vect{x}=\lambda\vect{x}\) as we have done, or “on the left,” \(\vect{x}A=\lambda\vect{x}\text{.}\) So use the “right” versions of the eigenvalue and eigenvector commands to stay consistent with the text. Recognize, too, that eigenspaces may be computed with different bases than those given in the text (typically like those for null spaces with the basis='echelon'
option).
Why does the .eigenvalues()
method not come in left and right versions? The upcoming Theorem ETM can be used to show that the two versions would have identical output, so there is no need.
Reading Questions EE Reading Questions
1.
Suppose \(A\) is the \(2\times 2\) matrix
Find the eigenvalues of \(A\text{.}\)
2.
For each eigenvalue of \(A\text{,}\) find the corresponding eigenspace.
3.
For the polynomial \(p(x)=3x^2-x+2\) and \(A\) from above, compute \(p(A)\text{.}\)
Exercises EE Exercises
C10.
Find the characteristic polynomial of the matrix
Answer: \(\charpoly{A}{x} = -2 - 5x + x^2\)
C11.
Find the characteristic polynomial of the matrix
Answer: \(\charpoly{A}{x} = -5 + 4x^2 - x^3\text{.}\)
C12.
Find the characteristic polynomial of the matrix
Answer: \(\charpoly{A}{x} = 2 + 2x - 2x^2 - 3x^3 + x^4\text{.}\)
C19.
Find the eigenvalues, eigenspaces, algebraic multiplicities and geometric multiplicities for the matrix below. It is possible to do all these computations by hand, and it would be instructive to do so.
First compute the characteristic polynomial,
So the eigenvalues of \(C\) are the solutions to \(\charpoly{C}{x}=0\text{,}\) namely, \(\lambda=2\) and \(\lambda=3\text{.}\) Each eigenvalue has a factor that appears just once in the characteristic polynomial, so \(\algmult{C}{2}=1\) and \(\algmult{C}{3}=1\text{.}\)
To obtain the eigenspaces, construct the appropriate singular matrices and find expressions for the null spaces of these matrices.
Each eigenspace has a single basis vector, so the dimensions are both \(1\) and the geometric multiplicities are \(\geomult{C}{2}=1\) and \(\geomult{C}{3}=1\text{.}\)
C20.
Find the eigenvalues, eigenspaces, algebraic multiplicities and geometric multiplicities for the matrix below. It is possible to do all these computations by hand, and it would be instructive to do so.
The characteristic polynomial of \(B\) is
From this we find eigenvalues \(\lambda=3,\,-2\) with algebraic multiplicities \(\algmult{B}{3}=1\) and \(\algmult{B}{-2}=1\text{.}\)
For eigenvectors and geometric multiplicities, we study the null spaces of \(B-\lambda I_2\) (Theorem EMNS).
Each eigenspace has dimension one, so we have geometric multiplicities \(\geomult{B}{3}=1\) and \(\geomult{B}{-2}=1\text{.}\)
C21.
The matrix \(A\) below has \(\lambda=2\) as an eigenvalue. Find the geometric multiplicity of \(\lambda=2\) using your calculator only for row-reducing matrices.
If \(\lambda=2\) is an eigenvalue of \(A\text{,}\) the matrix \(A-2I_4\) will be singular, and its null space will be the eigenspace of \(A\text{.}\) So we form this matrix and row-reduce,
With two free variables, we know a basis of the null space (Theorem BNS) will contain two vectors. Thus the null space of \(A-2I_4\) has dimension two, and so the eigenspace of \(\lambda=2\) has dimension two also (Theorem EMNS), \(\geomult{A}{2}=2\text{.}\)
C22.
Without using a calculator, find the eigenvalues of the matrix \(B\text{.}\)
The characteristic polynomial (Definition CP) is
where the factorization can be obtained by finding the roots of \(\charpoly{B}{x}=0\) with the quadratic equation. By Theorem EMRCP the eigenvalues of \(B\) are the complex numbers \(\lambda_1=\frac{3+\sqrt{3}i}{2}\) and \(\lambda_2=\frac{3-\sqrt{3}i}{2}\text{.}\)
C23.
Find the eigenvalues, eigenspaces, algebraic and geometric multiplicities for
Eigenvalue: \(\lambda = 0\)
\(\eigenspace{A}{0} = \spn{\set{\colvector{-1\\1}}}\text{,}\) \(\algmult{A}{0} = 1\text{,}\) \(\geomult{A}{0} = 1\)
Eigenvalue: \(\lambda = 2\)
\(\eigenspace{A}{2} = \spn{\set{\colvector{1\\1}}}\text{,}\) \(\algmult{A}{2} = 1\text{,}\) \(\geomult{A}{2} = 1\)
C24.
Find the eigenvalues, eigenspaces, algebraic and geometric multiplicities for
Eigenvalue: \(\lambda = 0\)
\(\eigenspace{A}{0} = \spn{\set{\colvector{1\\1\\0},\colvector{-1\\0\\1}}}\text{,}\) \(\algmult{A}{0} = 2\text{,}\) \(\geomult{A}{0} = 2\)
Eigenvalue: \(\lambda = 3\)
\(\eigenspace{A}{3} =\spn{\set{\colvector{1\\-1\\1}}}\text{,}\) \(\algmult{A}{3} = 1\text{,}\) \(\geomult{A}{3} = 1\)
C25.
Find the eigenvalues, eigenspaces, algebraic and geometric multiplicities for the \(3\times 3\) identity matrix \(I_3\text{.}\) Do your results make sense?
The characteristic polynomial for \(A = I_3\) is \(\charpoly{I_3}{x} = (1-x)^3\text{,}\) which has eigenvalue \(\lambda = 1\) with algebraic multiplicity \(\algmult{A}{1} = 3\text{.}\)Looking for eigenvectors, we find that
The null space of this matrix is all of \(\complex{3}\text{,}\) so that the eigenspace is \(\eigenspace{I_3}{1} = \spn{\set{\colvector{1\\0\\0},\colvector{0\\1\\0}, \colvector{0\\0\\1}}}\text{,}\) and the geometric multiplicity is \(\gamma_A(1) = 3\text{.}\)
Does this make sense? Yes! Every vector \(\vect{x}\) is a solution to \(I_3\vect{x} = 1\vect{x}\text{,}\) so every nonzero vector is an eigenvector with eigenvalue 1. Since every vector is unchanged when multiplied by \(I_3\text{,}\) it makes sense that \(\lambda = 1\) is the only eigenvalue.
C26.
For matrix
the characteristic polynomial of \(A\) is \(\charpoly{A}{x} = (4-x)(1-x)^2\text{.}\) Find the eigenvalues and corresponding eigenspaces of \(A\text{.}\)
Since we are given that the characteristic polynomial of \(A\) is \(\charpoly{A}{x} = (4-x)(1-x)^2\text{,}\) we see that the eigenvalues are \(\lambda = 4\) with algebraic multiplicity \(\algmult{A}{4} = 1\) and \(\lambda = 1\) with algebraic multiplicity \(\algmult{A}{1} = 2\text{.}\) The corresponding eigenspaces are
C27.
For the matrix
the characteristic polynomial of \(A\) is \(\charpoly{A}{x} = (x+2)(x-2)^2(x-4)\text{.}\) Find the eigenvalues and corresponding eigenspaces of \(A\text{.}\)
Since we are given that the characteristic polynomial of \(A\) is \(\charpoly{A}{x} = (x+2)(x-2)^2(x-4)\text{,}\) we see that the eigenvalues are \(\lambda = -2\text{,}\) \(\lambda = 2\) and \(\lambda = 4\text{.}\) The eigenspaces are
M60.
Repeat Example CASE by choosing \(\vect{x}=\colvector{0\\8\\2\\1\\2}\) and then arrive at an eigenvalue and eigenvector of the matrix \(A\text{.}\)
Form the matrix \(C\) whose columns are \(\vect{x},\,A\vect{x},\,A^2\vect{x},\,A^3\vect{x},\,A^4\vect{x},\,A^5\vect{x}\) and row-reduce the matrix,
The simplest possible relation of linear dependence on the columns of \(C\) comes from using scalars \(\alpha_4=1\) and \(\alpha_5=\alpha_6=0\) for the free variables in a solution to \(\homosystem{C}\text{.}\) The remainder of this solution is \(\alpha_1=3\text{,}\) \(\alpha_2=-1\text{,}\) \(\alpha_3=-3\text{.}\) This solution gives rise to the polynomial
which then has the property that \(p(A)\vect{x}=\zerovector\text{.}\)
No matter how you choose to order the factors of \(p(x)\text{,}\) the value of \(k\) (in the language of Theorem EMHE and Example CASE) is \(k=2\text{.}\) For each of the three possibilities, we list the resulting eigenvector and the associated eigenvalue:
Note that each of these eigenvectors can be simplified by an appropriate scalar multiple, but we have shown here the actual vector obtained by the product specified in the theorem.
T10.
A matrix \(A\) is idempotent if \(A^2=A\text{.}\) Show that the only possible eigenvalues of an idempotent matrix are \(\lambda=0\) and \(\lambda=1\text{.}\) Then give an example of a matrix that is idempotent and has both of these two values as eigenvalues.
Suppose that \(\lambda\) is an eigenvalue of \(A\text{.}\) Then there is an eigenvector \(\vect{x}\text{,}\) such that \(A\vect{x}=\lambda\vect{x}\text{.}\) We have,
From this we get
\begin{align*} \zerovector&=\lambda^2\vect{x}-\lambda\vect{x}\\ &=(\lambda^2-\lambda)\vect{x}&& \knowl{./knowl/property-DSAC.html}{\text{Property DSAC}}\text{.} \end{align*}Since \(\vect{x}\) is an eigenvector, it is nonzero, and Theorem SMEZV leaves us with the conclusion that \(\lambda^2-\lambda=0\text{,}\) and the solutions to this quadratic polynomial equation in \(\lambda\) are \(\lambda=0\) and \(\lambda=1\text{.}\)
The matrix
is idempotent (check this!) and since it is a diagonal matrix, its eigenvalues are the diagonal entries, \(\lambda=0\) and \(\lambda=1\text{,}\) so each of these possible values for an eigenvalue of an idempotent matrix actually occurs as an eigenvalue of some idempotent matrix. So we cannot state any stronger conclusion about the eigenvalues of an idempotent matrix, and we can say that this theorem is the “best possible.”
T15.
The characteristic polynomial of the square matrix \(A\) is usually defined as \(r_A(x)=\detname{xI_n-A}\text{.}\) Find a specific relationship between our characteristic polynomial, \(\charpoly{A}{x}\text{,}\) and \(r_A(x)\text{,}\) give a proof of your relationship, and use this to explain why Theorem EMRCP can remain essentially unchanged with either definition. Explain the advantages of each definition over the other. (Computing with both definitions, for a \(2\times 2\) and a \(3\times 3\) matrix, might be a good way to start.)
Note in the following that the scalar multiple of a matrix is equivalent to multiplying each of the rows by that scalar, so we actually apply Theorem DRCM multiple times below (and are passing up an opportunity to do a proof by induction in the process, which maybe you'd like to do yourself?).
Since the polynomials are scalar multiples of each other, their roots will be identical, so either polynomial could be used in Theorem EMRCP.
Computing by hand, our definition of the characteristic polynomial is easier to use, as you only need to subtract \(x\) down the diagonal of the matrix before computing the determinant. However, the price to be paid is that for odd values of \(n\text{,}\) the coefficient of \(x^{n}\) is \(-1\text{,}\) while \(r_A(x)\) always has the coefficient \(1\) for \(x^{n}\) (we say \(r_A(x)\) is “monic.”)
T20.
Suppose that \(\lambda\) and \(\rho\) are two different eigenvalues of the square matrix \(A\text{.}\) Prove that the intersection of the eigenspaces for these two eigenvalues is trivial. That is, \(\eigenspace{A}{\lambda}\cap\eigenspace{A}{\rho}=\set{\zerovector}\text{.}\)
This problem asks you to prove that two sets are equal, so use Definition SE.
First show that \(\set{\zerovector}\subseteq\eigenspace{A}{\lambda}\cap\eigenspace{A}{\rho}\text{.}\) Choose \(\vect{x}\in\set{\zerovector}\text{.}\) Then \(\vect{x}=\zerovector\text{.}\) Eigenspaces are subspaces (Theorem EMS), so both \(\eigenspace{A}{\lambda}\) and \(\eigenspace{A}{\rho}\) contain the zero vector, and therefore \(\vect{x}\in\eigenspace{A}{\lambda}\cap\eigenspace{A}{\rho}\) (Definition SI).
To show that \(\eigenspace{A}{\lambda}\cap\eigenspace{A}{\rho}\subseteq\set{\zerovector}\text{,}\) suppose that \(\vect{x}\in\eigenspace{A}{\lambda}\cap\eigenspace{A}{\rho}\text{.}\) Then \(\vect{x}\) is an eigenvector of \(A\) for both \(\lambda\) and \(\rho\) (Definition SI) and so
So \(\vect{x}=\zerovector\text{,}\) and trivially, \(\vect{x}\in\set{\zerovector}\text{.}\)