Unit 8, lesson 39

Calculating Eigenvalues and Eigenspaces

How the characteristic polynomial and the characteristic equation give the eigenvalues of a square matrix, how elimination gives a basis of each eigenspace, and how trace and determinant check the eigenvalues.

  • Video 39
  • Eigenvalues and Eigenspaces

Testing a guessed vector can confirm an eigenvector, but it can never show that no eigenvector was missed. For the matrix MM with rows (4,1)(4, 1) and (2,3)(2, 3), which numbers λ\lambda allow a nonzero solution of Mv=λvM\mathbf{v} = \lambda\mathbf{v}, and what are all the solutions for each of them? This lesson turns the first question into a polynomial equation in λ\lambda and the second into a homogeneous linear system, then checks the results with the trace and the determinant. Throughout, a tuple such as (1,1)(1, 1) stands for a column vector, and matrices and eigenvalues are real.

Key terms

Characteristic polynomial

Definition Let AA be a real n×nn \times n matrix. Its characteristic polynomial is

χA(t)=det⁡(tI−A),\chi_A(t) = \det(tI - A),

where tt is a scalar variable. Expanding the determinant gives a polynomial in tt of degree nn with leading coefficient 11. A real number λ\lambda is an eigenvalue of AA exactly when χA(λ)=0\chi_A(\lambda) = 0. Indeed, Av=λvA\mathbf{v} = \lambda\mathbf{v} is the same as (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0}, which has a nonzero solution exactly when the square matrix A−λIA - \lambda I is singular, that is, when det⁡(A−λI)=0\det(A - \lambda I) = 0. Since λI−A=−(A−λI)\lambda I - A = -(A - \lambda I), the two determinants differ only by the factor (−1)n(-1)^n and vanish together. For a 2×22 \times 2 matrix with rows (a,b)(a, b) and (c,d)(c, d),

χA(t)=(t−a)(t−d)−bc=t2−(a+d)t+(ad−bc).\begin{aligned} \chi_A(t) &= (t - a)(t - d) - bc \\[0.4em] &= t^2 - (a + d)t + (ad - bc). \end{aligned}

Only square matrices have a characteristic polynomial and eigenvalues.

In plain words The determinant of A−λIA - \lambda I is zero exactly when the shifted matrix crushes some nonzero vector to zero. Treating λ\lambda as an unknown turns that test into a single polynomial, and its real roots are the eigenvalues.

Example For

M=[4123],tI−M=[t−4−1−2t−3],\begin{aligned} M &= \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix}, \\[0.4em] tI - M &= \begin{bmatrix} t - 4 & -1 \\ -2 & t - 3 \end{bmatrix}, \end{aligned}

the determinant is

χM(t)=(t−4)(t−3)−2=t2−7t+10.\begin{aligned} \chi_M(t) &= (t - 4)(t - 3) - 2 \\[0.4em] &= t^2 - 7t + 10. \end{aligned}

Characteristic equation

Definition The characteristic equation of a real n×nn \times n matrix AA is χA(t)=0\chi_A(t) = 0, and its real solutions are exactly the real eigenvalues of AA. For a 2×22 \times 2 matrix it is a quadratic equation t2+pt+q=0t^2 + pt + q = 0. When the left side factors as (t−r)(t−s)(t - r)(t - s), the roots are rr and ss, because a product of real numbers is zero only when a factor is zero. Whether or not a factorization is easy to see, the number p2−4qp^2 - 4q, the discriminant, decides how many real roots there are. If it is positive there are two distinct real roots, if it is zero there is one repeated real root, and if it is negative there is no real root, so the matrix has no real eigenvalue. When p2−4q≥0p^2 - 4q \ge 0, the quadratic formula gives the real roots

t=−p±p2−4q2.t = \frac{-p \pm \sqrt{p^2 - 4q}}{2}.

In plain words The eigenvalues are the real solutions of one equation. For a 2×22 \times 2 matrix that equation is quadratic. Factor it when two numbers with the right sum and product are easy to see, and otherwise use the formula and keep both signs of the square root.

Example For MM the equation t2−7t+10=0t^2 - 7t + 10 = 0 factors as (t−5)(t−2)=0(t - 5)(t - 2) = 0, since 5+2=75 + 2 = 7 and 5⋅2=105 \cdot 2 = 10, so the eigenvalues are 55 and 22. The matrix NN with rows (2,1)(2, 1) and (1,1)(1, 1) has the characteristic equation t2−3t+1=0t^2 - 3t + 1 = 0, with discriminant 9−4=59 - 4 = 5, so

λ=3+52orλ=3−52.\lambda = \frac{3 + \sqrt{5}}{2} \quad \text{or} \quad \lambda = \frac{3 - \sqrt{5}}{2}.

The quarter turn with rows (0,−1)(0, -1) and (1,0)(1, 0) has χ(t)=t2+1\chi(t) = t^2 + 1, with discriminant −4-4, and so it has no real eigenvalue.

Eigenspace

Definition Let λ\lambda be an eigenvalue of a real n×nn \times n matrix AA. The eigenspace of AA for λ\lambda is

Eλ=Null⁡(A−λI)={v∈Rn:Av=λv}.\begin{aligned} E_\lambda &= \operatorname{Null}(A - \lambda I) \\[0.4em] &= \{\mathbf{v} \in \mathbb{R}^n : A\mathbf{v} = \lambda\mathbf{v}\}. \end{aligned}

As a null space it is a subspace of Rn\mathbb{R}^n. It contains 0\mathbf{0}, its nonzero vectors are exactly the eigenvectors of AA for λ\lambda, and it is not {0}\{\mathbf{0}\} because λ\lambda is an eigenvalue. The equation χA(λ)=0\chi_A(\lambda) = 0 says only that a nonzero solution exists. The homogeneous system (A−λI)v=0(A - \lambda I)\mathbf{v} = \mathbf{0} still has to be solved to find which vectors they are.

In plain words The eigenspace collects every vector that the matrix multiplies by λ\lambda, together with the zero vector. It is the whole answer to the question of which vectors belong to λ\lambda, not a single sample vector.

Example For MM and λ=5\lambda = 5,

M−5I=[−112−2].M - 5I = \begin{bmatrix} -1 & 1 \\ 2 & -2 \end{bmatrix}.

The equations −x+y=0-x + y = 0 and 2x−2y=02x - 2y = 0 both say y=xy = x. So E5E_5 consists of the vectors (x,x)(x, x), and E5=span⁡{(1,1)}E_5 = \operatorname{span}\{(1, 1)\}. Check in the original matrix that M(1,1)=(5,5)=5(1,1)M(1, 1) = (5, 5) = 5(1, 1).

Basis of an eigenspace

Definition To find a basis of EλE_\lambda, row reduce A−λIA - \lambda I to echelon form, solve for the pivot variables in terms of the free variables, and write the general solution as a linear combination with one vector for each free variable. Those vectors are linearly independent and span EλE_\lambda, so they form a basis, and

dim⁡Eλ=n−rank⁡(A−λI),\dim E_\lambda = n - \operatorname{rank}(A - \lambda I),

the number of free variables. A basis is not unique. Any nonzero multiple of a basis vector of a line spans the same line. A request to find the eigenspace asks for all solutions, usually given as a basis, and one eigenvector is not enough when the eigenspace has dimension greater than one.

In plain words Solving the null space once gives every eigenvector for λ\lambda. The basis is the short way to write all of them, one vector per free variable.

Example For MM and λ=2\lambda = 2, both rows of M−2IM - 2I are (2,1)(2, 1), so the only condition is 2x+y=02x + y = 0, that is y=−2xy = -2x. Then E2=span⁡{(−1,2)}E_2 = \operatorname{span}\{(-1, 2)\}, and (1,−2)(1, -2) would describe the same line. Check that M(−1,2)=(−2,4)=2(−1,2)M(-1, 2) = (-2, 4) = 2(-1, 2).

An eigenspace can be larger than a line. The matrix

A=[3−12204−110]A = \begin{bmatrix} 3 & -1 & 2 \\ 2 & 0 & 4 \\ -1 & 1 & 0 \end{bmatrix}

has χA(t)=t3−3t2+4=(t−2)2(t+1)\chi_A(t) = t^3 - 3t^2 + 4 = (t - 2)^2(t + 1). For λ=2\lambda = 2 the steps R2→R2−2R1R_2 \to R_2 - 2R_1 and R3→R3+R1R_3 \to R_3 + R_1 give

A−2I=[1−122−24−11−2]→[1−12000000].\begin{aligned} A - 2I &= \begin{bmatrix} 1 & -1 & 2 \\ 2 & -2 & 4 \\ -1 & 1 & -2 \end{bmatrix} \\[0.4em] &\to \begin{bmatrix} 1 & -1 & 2 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}. \end{aligned}

The single equation x−y+2z=0x - y + 2z = 0 leaves yy and zz free, and x=y−2zx = y - 2z, so

[xyz]=y[110]+z[−201].\begin{bmatrix} x \\ y \\ z \end{bmatrix} = y\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} + z\begin{bmatrix} -2 \\ 0 \\ 1 \end{bmatrix}.

The vectors (1,1,0)(1, 1, 0) and (−2,0,1)(-2, 0, 1) form a basis of E2E_2, which is a plane of dimension 22. Multiplying confirms A(1,1,0)=(2,2,0)A(1, 1, 0) = (2, 2, 0) and A(−2,0,1)=(−4,0,2)A(-2, 0, 1) = (-4, 0, 2). For λ=−1\lambda = -1 the same method gives E−1=span⁡{(1,2,−1)}E_{-1} = \operatorname{span}\{(1, 2, -1)\}, and A(1,2,−1)=(−1,−2,1)A(1, 2, -1) = (-1, -2, 1).

Trace and determinant checks

Definition The trace tr⁡A\operatorname{tr} A of a square matrix is the sum of its diagonal entries. For a real 2×22 \times 2 matrix,

χA(t)=t2−(tr⁡A) t+det⁡A.\chi_A(t) = t^2 - (\operatorname{tr} A)\,t + \det A.

If χA(t)=(t−λ1)(t−λ2)\chi_A(t) = (t - \lambda_1)(t - \lambda_2), comparing coefficients gives

λ1+λ2=tr⁡A,λ1λ2=det⁡A.\lambda_1 + \lambda_2 = \operatorname{tr} A, \qquad \lambda_1\lambda_2 = \det A.

The same holds for a real n×nn \times n matrix whose characteristic polynomial factors into linear factors over the scalars in use, χA(t)=(t−λ1)⋯(t−λn)\chi_A(t) = (t - \lambda_1)\cdots(t - \lambda_n), with each eigenvalue listed as many times as its factor appears. The coefficient of tn−1t^{n-1} in χA\chi_A is −tr⁡A-\operatorname{tr} A and the constant term is χA(0)=det⁡(−A)=(−1)ndet⁡A\chi_A(0) = \det(-A) = (-1)^n \det A, so the eigenvalues add up to tr⁡A\operatorname{tr} A and multiply to det⁡A\det A. If χA\chi_A has nonreal roots, the factorization needs complex scalars and the list λ1,…,λn\lambda_1, \dots, \lambda_n includes those roots, so the real eigenvalues alone cannot complete the check. The checks concern eigenvalues only. They say nothing about the eigenvectors, which are checked by computing AvA\mathbf{v}.

In plain words When χA\chi_A factors into linear factors and each eigenvalue is counted as often as its factor appears, the eigenvalues add up to the trace and multiply to the determinant. A wrong root usually breaks one of these two equations, so they make a quick test, but passing them does not confirm any eigenspace.

Example For MM the trace is 4+3=7=5+24 + 3 = 7 = 5 + 2 and the determinant is 12−2=10=5⋅212 - 2 = 10 = 5 \cdot 2. For the 3×33 \times 3 matrix AA above, the trace is 3+0+0=33 + 0 + 0 = 3 and the determinant is −4-4. The eigenvalues pass the check only when 22 is counted twice, since 2+2+(−1)=32 + 2 + (-1) = 3 and 2⋅2⋅(−1)=−42 \cdot 2 \cdot (-1) = -4. Counting 22 once would give the sum 11 and the product −2-2.

Check yourself

  1. Find the characteristic polynomial, the eigenvalues and a basis of each eigenspace of the matrix with rows (1,2)(1, 2) and (4,3)(4, 3).
Show the answer

Call the matrix AA. Then

χA(t)=(t−1)(t−3)−8=t2−4t−5=(t−5)(t+1),\begin{aligned} \chi_A(t) &= (t - 1)(t - 3) - 8 \\[0.4em] &= t^2 - 4t - 5 \\[0.4em] &= (t - 5)(t + 1), \end{aligned}

so the eigenvalues are 55 and −1-1. For λ=5\lambda = 5 the matrix A−5IA - 5I has rows (−4,2)(-4, 2) and (4,−2)(4, -2), both giving y=2xy = 2x, so E5=span⁡{(1,2)}E_5 = \operatorname{span}\{(1, 2)\}. For λ=−1\lambda = -1 the matrix A+IA + I has rows (2,2)(2, 2) and (4,4)(4, 4), both giving y=−xy = -x, so E−1=span⁡{(1,−1)}E_{-1} = \operatorname{span}\{(1, -1)\}. Check that A(1,2)=(5,10)A(1, 2) = (5, 10) and A(1,−1)=(−1,1)A(1, -1) = (-1, 1). The trace 44 equals 5+(−1)5 + (-1), and the determinant 3−8=−53 - 8 = -5 equals 5⋅(−1)5 \cdot (-1).

  1. Let AA be the 3×33 \times 3 matrix with every entry equal to 11. A student finds the eigenvalue 00 and reports its eigenspace as span⁡{(1,−1,0)}\operatorname{span}\{(1, -1, 0)\}. What is missing? Find all eigenvalues and eigenspaces.
Show the answer

The student found one eigenvector, not the eigenspace. Here A−0I=AA - 0I = A, and row reduction leaves the single equation x+y+z=0x + y + z = 0 with yy and zz free. So

E0=span⁡{(−1,1,0),(−1,0,1)},\begin{aligned} E_0 = \operatorname{span}\{&(-1, 1, 0), \\[0.4em] &(-1, 0, 1)\}, \end{aligned}

a plane of dimension 22. The student’s vector lies in it, but it gives only one of two independent directions.

To find the characteristic polynomial, add the second and third rows of tI−AtI - A to its first row, which makes every entry of the first row equal to t−3t - 3. Factoring out t−3t - 3 leaves the first row (1,1,1)(1, 1, 1), and adding it to the other two rows leaves a triangular matrix with diagonal entries 11, tt and tt. So χA(t)=t2(t−3)=t3−3t2\chi_A(t) = t^2(t - 3) = t^3 - 3t^2, and the other eigenvalue is 33. Every row of A−3IA - 3I sums to zero, so (1,1,1)(1, 1, 1) is in its null space, and its first two rows (−2,1,1)(-2, 1, 1) and (1,−2,1)(1, -2, 1) are independent, so its rank is 22 and E3=span⁡{(1,1,1)}E_3 = \operatorname{span}\{(1, 1, 1)\}. Indeed A(1,1,1)=(3,3,3)A(1, 1, 1) = (3, 3, 3). The eigenvalues 0,0,30, 0, 3 add up to the trace 33 and multiply to det⁡A=0\det A = 0.

  1. For the matrix with rows (3,1)(3, 1) and (1,1)(1, 1), find the eigenvalues and an eigenvector for each eigenvalue. Keep the answers exact, and check them with the trace and the determinant.
Show the answer

Call the matrix AA. Its characteristic polynomial is (t−3)(t−1)−1=t2−4t+2(t - 3)(t - 1) - 1 = t^2 - 4t + 2, with discriminant 16−8=816 - 8 = 8, so

λ=4±82=2±2.\lambda = \frac{4 \pm \sqrt{8}}{2} = 2 \pm \sqrt{2}.

The first row of A−λIA - \lambda I says (3−λ)x+y=0(3 - \lambda)x + y = 0, so y=(λ−3)xy = (\lambda - 3)x, and (1,λ−3)(1, \lambda - 3) spans each eigenspace. This gives (1,−1+2)(1, -1 + \sqrt{2}) for λ=2+2\lambda = 2 + \sqrt{2} and (1,−1−2)(1, -1 - \sqrt{2}) for λ=2−2\lambda = 2 - \sqrt{2}. The second row agrees, because 1+(1−λ)(λ−3)=−(λ2−4λ+2)=01 + (1 - \lambda)(\lambda - 3) = -(\lambda^2 - 4\lambda + 2) = 0. As a direct check,

A[1−1+2]=[2+22]=(2+2)[1−1+2].\begin{aligned} A\begin{bmatrix} 1 \\ -1 + \sqrt{2} \end{bmatrix} &= \begin{bmatrix} 2 + \sqrt{2} \\ \sqrt{2} \end{bmatrix} \\[0.4em] &= (2 + \sqrt{2})\begin{bmatrix} 1 \\ -1 + \sqrt{2} \end{bmatrix}. \end{aligned}

The eigenvalues add up to 44, the trace, and multiply to 4−2=24 - 2 = 2, which is det⁡A=3−1\det A = 3 - 1.

How this lesson connects

It also uses solving quadratic equations by factoring or the quadratic formula.