Worked examples
The question
Question: diagonalize A.
A = [2, 1; 1, 2]
Diagonalizing means writing A as P times D times P inverse.
The columns of P are eigenvectors.
D is diagonal: the eigenvalues down the diagonal, 0s elsewhere.
A = P D Pā1
P: eigenvectors as columns
D: their λs down the diagonal
1 Find the eigenvalues
As in the eigenvalue lesson: take Ī» off the diagonal of A.
A ā Ī»I = [2 ā Ī», 1; 1, 2 ā Ī»]
Its determinant, down minus up, must be 0.
So (2 ā Ī»)(2 ā Ī») ā 1 Ć 1 = 0.
(2 ā Ī»)(2 ā Ī») ā 1 Ć 1 = 0
Multiply out the brackets, and 1 Ć 1 = 1.
4 ā 2Ī» ā 2Ī» + Ī»2 ā 1 = 0
Like terms together, the highest power first: λ² ā 4Ī» + 3 = 0.
Ī»2 ā 4Ī» + 3 = 0
It factors, as in the factoring lesson.
(Ī» ā 1)(Ī» ā 3) = 0
So Ī» = 1 or Ī» = 3.
Ī» = 1 or Ī» = 3
2 Eigenvector for Ī» = 1
We take 1 off the diagonal: 2 ā 1 = 1 and 2 ā 1 = 1.
A ā 1I = [1, 1; 1, 1]
ā [1, 1; 0, 0]
A row of 0s: the letter y is free.
That is why there are eigenvectors.
Row 1 as an equation: x + y = 0.
x + y = 0
We want x alone.
To remove + y, we take away y on both sides.
x + y ā y = āy
They cancel on the left.
So x = āy.
x = āy
We pick y = 1.
So an eigenvector for Ī» = 1 is (ā1, 1).
v = [ā1; 1]
3 Eigenvector for Ī» = 3
We take 3 off the diagonal: 2 ā 3 = ā1 and 2 ā 3 = ā1.
A ā 3I = [ā1, 1; 1, ā1]
ā [1, ā1; ā1, 1]
ā [1, ā1; 0, 0]
A row of 0s: the letter y is free.
That is why there are eigenvectors.
Row 1 as an equation: x ā y = 0.
x ā y = 0
We want x alone.
To remove ā y, we add y on both sides.
x ā y + y = y
They cancel on the left.
So x = y.
x = y
We pick y = 1.
So an eigenvector for Ī» = 3 is (1, 1).
v = [1; 1]
4 Build P and D
P: the eigenvector for Ī» = 1 is column 1, the one for Ī» = 3 is column 2.
D: 1 first, then 3, in the same order.
P = [ā1, 1; 1, 1], D = [1, 0; 0, 3]
Careful!
The order matters.
The first Ī» in D goes with the first column of P.
Careful: D in the same order as the columns of P
So A = P D Pā»Ā¹, with this P and D.
A = P D Pā1
5 Check
Let's check without the inverse: A = P D Pā»Ā¹ means A P = P D.
We work out both sides.
First A times P.
A P = [2, 1; 1, 2] Ć [ā1, 1; 1, 1]
A P = [2 Ć (ā1) + 1 Ć 1, 2 Ć 1 + 1 Ć 1; 1 Ć (ā1) + 2 Ć 1, 1 Ć 1 + 2 Ć 1]
A P = [ā1, 3; 1, 3]
Now P times D.
P D = [ā1, 1; 1, 1] Ć [1, 0; 0, 3]
P D = [ā1 Ć 1 + 1 Ć 0, ā1 Ć 0 + 1 Ć 3; 1 Ć 1 + 1 Ć 0, 1 Ć 0 + 1 Ć 3]
P D = [ā1, 3; 1, 3]
Both give rows ā1, 3 and 1, 3.
So A P = P D, and the answer is right!
Let's look back.
First: find the eigenvalues.
Then: eigenvector for Ī» = 1.
Then: eigenvector for Ī» = 3.
Then: build P and D.
Last: check.
ā¶ Watch it solved
The question
Question: diagonalize A.
A = [5, ā2; 1, 2]
Diagonalizing means writing A as P times D times P inverse.
The columns of P are eigenvectors.
D is diagonal: the eigenvalues down the diagonal, 0s elsewhere.
A = P D Pā1
P: eigenvectors as columns
D: their λs down the diagonal
1 Find the eigenvalues
As in the eigenvalue lesson: take Ī» off the diagonal of A.
A ā Ī»I = [5 ā Ī», ā2; 1, 2 ā Ī»]
Its determinant, down minus up, must be 0.
So (5 ā Ī»)(2 ā Ī») ā 1 Ć (ā2) = 0.
(5 ā Ī»)(2 ā Ī») ā 1 Ć (ā2) = 0
Multiply out the brackets, and 1 Ć (ā2) = ā2.
10 ā 5Ī» ā 2Ī» + Ī»2 + 2 = 0
Like terms together, the highest power first: λ² ā 7Ī» + 12 = 0.
Ī»2 ā 7Ī» + 12 = 0
It factors, as in the factoring lesson.
(Ī» ā 3)(Ī» ā 4) = 0
So Ī» = 3 or Ī» = 4.
Ī» = 3 or Ī» = 4
2 Eigenvector for Ī» = 3
We take 3 off the diagonal: 5 ā 3 = 2 and 2 ā 3 = ā1.
A ā 3I = [2, ā2; 1, ā1]
ā [1, ā1; 2, ā2]
ā [1, ā1; 0, 0]
A row of 0s: the letter y is free.
That is why there are eigenvectors.
Row 1 as an equation: x ā y = 0.
x ā y = 0
We want x alone.
To remove ā y, we add y on both sides.
x ā y + y = y
They cancel on the left.
So x = y.
x = y
We pick y = 1.
So an eigenvector for Ī» = 3 is (1, 1).
v = [1; 1]
3 Eigenvector for Ī» = 4
We take 4 off the diagonal: 5 ā 4 = 1 and 2 ā 4 = ā2.
A ā 4I = [1, ā2; 1, ā2]
ā [1, ā2; 0, 0]
A row of 0s: the letter y is free.
That is why there are eigenvectors.
Row 1 as an equation: x ā 2y = 0.
x ā 2y = 0
We want x alone.
To remove ā 2y, we add 2y on both sides.
x ā 2y + 2y = 2y
They cancel on the left.
So x = 2y.
x = 2y
We pick y = 1.
So an eigenvector for Ī» = 4 is (2, 1).
v = [2; 1]
4 Build P and D
P: the eigenvector for Ī» = 3 is column 1, the one for Ī» = 4 is column 2.
D: 3 first, then 4, in the same order.
P = [1, 2; 1, 1], D = [3, 0; 0, 4]
Careful!
The order matters.
The first Ī» in D goes with the first column of P.
Careful: D in the same order as the columns of P
So A = P D Pā»Ā¹, with this P and D.
A = P D Pā1
5 Check
Let's check without the inverse: A = P D Pā»Ā¹ means A P = P D.
We work out both sides.
First A times P.
A P = [5, ā2; 1, 2] Ć [1, 2; 1, 1]
A P = [5 Ć 1 + (ā2) Ć 1, 5 Ć 2 + (ā2) Ć 1; 1 Ć 1 + 2 Ć 1, 1 Ć 2 + 2 Ć 1]
A P = [3, 8; 3, 4]
Now P times D.
P D = [1, 2; 1, 1] Ć [3, 0; 0, 4]
P D = [1 Ć 3 + 2 Ć 0, 1 Ć 0 + 2 Ć 4; 1 Ć 3 + 1 Ć 0, 1 Ć 0 + 1 Ć 4]
P D = [3, 8; 3, 4]
Both give rows 3, 8 and 3, 4.
So A P = P D, and the answer is right!
Let's look back.
First: find the eigenvalues.
Then: eigenvector for Ī» = 3.
Then: eigenvector for Ī» = 4.
Then: build P and D.
Last: check.
ā¶ Watch it solved
The question
Question: diagonalize A.
A = [3, 2; 2, 0]
Diagonalizing means writing A as P times D times P inverse.
The columns of P are eigenvectors.
D is diagonal: the eigenvalues down the diagonal, 0s elsewhere.
A = P D Pā1
P: eigenvectors as columns
D: their λs down the diagonal
1 Find the eigenvalues
As in the eigenvalue lesson: take Ī» off the diagonal of A.
A ā Ī»I = [3 ā Ī», 2; 2, āĪ»]
Its determinant, down minus up, must be 0.
So (3 ā Ī»)(āĪ») ā 2 Ć 2 = 0.
(3 ā Ī»)(āĪ») ā 2 Ć 2 = 0
Multiply out the brackets, and 2 Ć 2 = 4.
ā3Ī» + Ī»2 ā 4 = 0
Like terms together, the highest power first: λ² ā 3Ī» ā 4 = 0.
Ī»2 ā 3Ī» ā 4 = 0
It factors, as in the factoring lesson.
(Ī» + 1)(Ī» ā 4) = 0
So Ī» = ā1 or Ī» = 4.
Ī» = ā1 or Ī» = 4
2 Eigenvector for Ī» = ā1
We take ā1 off the diagonal: 3 ā (ā1) = 4 and 0 ā (ā1) = 1.
A ā (ā1)I = [4, 2; 2, 1]
ā [1, 1 over 2; 2, 1]
ā [1, 1 over 2; 0, 0]
A row of 0s: the letter y is free.
That is why there are eigenvectors.
Row 1 as an equation: x + y/2 = 0.
x + y2 = 0
We want x alone.
To remove + y/2, we take away y/2 on both sides.
x + y2 ā y2 = āy2
They cancel on the left.
So x = āy/2.
x = āy2
We pick y = 2 to keep whole numbers.
So an eigenvector for Ī» = ā1 is (ā1, 2).
v = [ā1; 2]
3 Eigenvector for Ī» = 4
We take 4 off the diagonal: 3 ā 4 = ā1 and 0 ā 4 = ā4.
A ā 4I = [ā1, 2; 2, ā4]
ā [1, ā2; 2, ā4]
ā [1, ā2; 0, 0]
A row of 0s: the letter y is free.
That is why there are eigenvectors.
Row 1 as an equation: x ā 2y = 0.
x ā 2y = 0
We want x alone.
To remove ā 2y, we add 2y on both sides.
x ā 2y + 2y = 2y
They cancel on the left.
So x = 2y.
x = 2y
We pick y = 1.
So an eigenvector for Ī» = 4 is (2, 1).
v = [2; 1]
4 Build P and D
P: the eigenvector for Ī» = ā1 is column 1, the one for Ī» = 4 is column 2.
D: ā1 first, then 4, in the same order.
P = [ā1, 2; 2, 1], D = [ā1, 0; 0, 4]
Careful!
The order matters.
The first Ī» in D goes with the first column of P.
Careful: D in the same order as the columns of P
So A = P D Pā»Ā¹, with this P and D.
A = P D Pā1
5 Check
Let's check without the inverse: A = P D Pā»Ā¹ means A P = P D.
We work out both sides.
First A times P.
A P = [3, 2; 2, 0] Ć [ā1, 2; 2, 1]
A P = [3 Ć (ā1) + 2 Ć 2, 3 Ć 2 + 2 Ć 1; 2 Ć (ā1) + 0 Ć 2, 2 Ć 2 + 0 Ć 1]
A P = [1, 8; ā2, 4]
Now P times D.
P D = [ā1, 2; 2, 1] Ć [ā1, 0; 0, 4]
P D = [ā1 Ć (ā1) + 2 Ć 0, ā1 Ć 0 + 2 Ć 4; 2 Ć (ā1) + 1 Ć 0, 2 Ć 0 + 1 Ć 4]
P D = [1, 8; ā2, 4]
Both give rows 1, 8 and ā2, 4.
So A P = P D, and the answer is right!
Let's look back.
First: find the eigenvalues.
Then: eigenvector for Ī» = ā1.
Then: eigenvector for Ī» = 4.
Then: build P and D.
Last: check.
ā¶ Watch it solved