MAT1041 · Week 13 · - Eigenvalues and Eigenvectors
Diagonalization and matrix powers
You learn to test whether a matrix is diagonalizable by counting eigenvectors, to build P and D and write A = PDP⁻¹, and to use it to compute high powers of A quickly.
Working with a diagonal matrix is child’s play: its product, inverse, power and determinant are visible at a glance. Diagonalization means transforming a matrix into a diagonal matrix in a suitable basis. We saw in week 12 that the matrices of the same transformation in different bases are similar (A′=P−1AP). If we choose the eigenvectors as the basis, A′ is diagonal and the eigenvalues stand on the diagonal. This page answers two questions: when is this possible, and what is it good for when it is possible.
Golden rules:
An n×n matrix is diagonalizable ⟺ it has n independent eigenvectors.
n distinct eigenvalues are enough. For a repeated eigenvalue, compute the dimension of the eigenspace.
The columns of P are the eigenvectors, the eigenvalues in D in the same order.
Check without taking A−1: AP=PD.
Definition and the main theorem
A square matrix A is diagonalizable if there is an invertible P such that P−1AP=D is diagonal. Equivalently: A=PDP−1.
Theorem. If A is n×n: A is diagonalizable ⟺A has n linearly independent eigenvectors. In that case
P is not unique: you can scale the eigenvectors or change their order. If you change the order, the diagonal of D changes in the same way.
Example 2 (a repeated eigenvalue, still diagonalizable). The A=322232−2−2−1 from the previous page: two independent eigenvectors (−1,1,0), (1,0,1) for λ=1 (algebraic 2); (1,1,1) for λ=3. In total 3:
P=−110101111,D=100010003.
When is it not diagonalizable?
If the geometric multiplicity of an eigenvalue is smaller than its algebraic multiplicity, there are not enough eigenvectors.
Example 3.A=[2012]. Eigenvalue 2 (algebraic 2). A−2I=[0010], E2=span{(1,0)}. Only one independent eigenvector: not diagonalizable. A matrix of this kind is called defective.
Case
Decision
n distinct eigenvalues
diagonalizable
repeated eigenvalue, geometric = algebraic for each
diagonalizable
geometric < algebraic for some eigenvalue
not diagonalizable
a non-real eigenvalue (for real diagonalization)
not diagonalizable
PITFALL · saying “not diagonalizable” when you see a repeated root. A repeated eigenvalue alone says nothing. Example 2 is diagonalizable, Q9 is not; both have a double root. Don’t decide without computing the dimension of the eigenspace.
Powers: Aᵏ = PDᵏP⁻¹
If A=PDP−1 then
A2=PDP−1PDP−1=PD2P−1,Ak=PDkP−1.
The P−1P in the middle disappear. And Dk is just the kth power of the diagonal entries. A5 for Example 1:
Check: trace 614+409=1023=45+(−1)5. A single chain of products instead of multiplying directly five times.
The same idea extends to polynomials: p(A)=Pp(D)P−1. Applications such as systems of differential equations and Markov chains rest on this formula.
In the language of linear transformations
If T(x)=Ax and A is diagonalizable, then in the basis B made of eigenvectors the matrix of T is D (week 12, A′=P−1AP). That is, in this basis T multiplies each coordinate separately by a number. Diagonalization is finding the coordinate system that shows the transformation in its simplest form.
Common mistakes
Wrong
Right
Writing the eigenvectors as rows of P
Columns
Writing the order in D different from the column order of P
The same order
A=P−1DP
A=PDP−1 (if the eigenvectors are columns)
Repeated eigenvalue = not diagonalizable
Compute the dimension of the eigenspace
Ak=PkDkP−k
PDkP−1
Putting the diagonal of A into D
The eigenvalues
Finishing Ak without computing P−1
Ak=PDkP−1, P−1 is required
Test yourself
Exam-style questions. Solve them on paper first, then reveal the answer.
Question 1easy
Is A=[1023] diagonalizable?
Show answer
Yes
Triangular: the eigenvalues are 1 and 3, and they are distinct. If an n×n matrix has n distinct eigenvalues it is diagonalizable (the eigenvectors of distinct eigenvalues are independent).
Question 2easy
Is A=[5015] diagonalizable?
Show answer
No
The only eigenvalue is 5, with algebraic multiplicity 2. A−5I=[0010]: y=0, E5=span{(1,0)}, dimension 1. There are not two independent eigenvectors. (If it were diagonalizable, D=5I and A=P(5I)P−1=5I would follow, but A=5I.)
Question 3medium
Diagonalize A=[1243]: find P and D with P−1AP=D.
Show answer
P=[112−1],D=[500−1]
The eigenvalues are 5,−1. E5: (1,1). E−1: x+2y=0, for example (2,−1). The eigenvectors are the columns of P, the eigenvalues in Din the same order. Check: AP=[55−21]=PD.
Question 4medium
Use the diagonalization of the previous question to compute A4.
λ=2: algebraic 2, but E2=span{(1,0,0)}, geometric 1. λ=3: 1 eigenvector. The total number of independent eigenvectors is 1+1=2<3. Not diagonalizable.
Question 7hard
For which values of k is [10k1] diagonalizable?
Show answer
k=0 only
The only eigenvalue is 1 (algebraic 2). A−I=[00k0].k=0: y=0, the eigenspace has dimension 1, not diagonalizable. k=0: A=I is already diagonal.
Question 8medium
True or false: A 3×3 matrix with eigenvalues 1,2,3 is diagonalizable.
Show answer
True
Three distinct eigenvalues, each has at least one eigenvector, and eigenvectors of distinct eigenvalues are independent. 3 independent eigenvectors: it is diagonalizable. The converse is not true: a matrix with a repeated eigenvalue can also be diagonalizable (for example I).
Question 9hard
Is B=311021012 diagonalizable? (Its characteristic polynomial is (λ−1)(λ−3)2.)
Show answer
No
λ=3 has algebraic multiplicity 2. B−3I=0110−1101−1. R1↔R2, R3←R3−R1: (0,2,−2), then move the zero row to the bottom. Rank 2, dimE3=3−2=1<2. E3=span{(0,1,1)}. Not diagonalizable. Trap: the matrix "looks like a symmetric one" but is not (row 1 and column 1 differ).
Question 10hard
Compute A10 for A=[1102].
Show answer
[1102301024]
The eigenvalues are 1 and 2. E1: x+y=0, (−1,1). E2: x=0, (0,1).P=[−1101]=P−1. A10=Pdiag(1,1024)P−1=[−1101024][−1101]=[1102301024]. Pattern: the (2,1) entry is 210−1.
Question 11easy
A=PDP−1 with D=diag(2,−1,3). Find detA.
Show answer
-6
detA=detPdetDdetP−1=detD=2⋅(−1)⋅3=−6. Similar matrices have the same determinant; the determinant is the product of the eigenvalues.
Verification: All diagonalizations were verified in node by computing the product P⁻¹AP = D exactly with BigInt fractions; matrix powers were computed both with P·Dᵏ·P⁻¹ and by direct repeated multiplication and compared; in the non-diagonalizable examples the eigenspace dimensions were found with the exact null space (verify/MAT1041/13.mjs).
Review card
A is diagonalizable ⇔ A = PDP⁻¹ (P⁻¹AP = D) ⇔ A has n INDEPENDENT eigenvectors.
The COLUMNS of P = eigenvectors; the diagonal of D = the corresponding eigenvalues (SAME ORDER).
Recipe: (1) solve det(λI - A) = 0 (2) a basis of E_λ for each λ (3) are there n vectors in total?
yes → write P and D; no → not diagonalizable.
n DISTINCT eigenvalues → definitely diagonalizable.
Repeated λ: geometric = algebraic is required (for every λ).
A matrix of the type [λ 1; 0 λ] (Jordan block) → NOT DIAGONALIZABLE.
Check: AP = PD (without taking an inverse).
Powers: A^k = P D^k P⁻¹, D^k = the k-th power of the numbers on the diagonal.
det A = Πλ, tr A = Σλ (read from D).
Similar matrices: same eigenvalues, det, trace, rank.
Symmetric matrices are ALWAYS diagonalizable (week 14).