Professor Dave again, let’s get diagonal.
Now that we have learned about eigenvalues and eigenvectors, it’s time to learn about their applications, so let’s start by learning
about something called diagonalization. Diagonalization involves taking a matrix and
writing it as a product of matrices, one of which only has values along the diagonal.
For example, if we have matrix A, we will write it as X D X-1 where D is a diagonal
matrix. If we move the X matrices to the other side, we see that X-1 A X = D. The X matrix
is said to diagonalize A, because multiplying A in this way gives us the diagonal matrix
D. This process only works for matrices that have unique eigenvalues, or if there are duplicate
eigenvalues then there must exist linearly independent eigenvectors for the duplicate
values. The reason for this is that the diagonal matrix D is simply made up of the eigenvalues
of A, while the matrix X is made up of the eigenvectors.
So fortunately, once we know the eigenvalues and eigenvectors of a matrix, the diagonalization
process is easy. Let’s assume an n by n matrix A, which has eigenvalues λ1, λ2,
to λn. Then the diagonal matrix D is just those eigenvalues placed along the diagonal,
with zeros for all the off-diagonal elements. Now if x1, x2, to xn are the eigenvectors
for those eigenvalues, the matrix X will have columns made up of those vectors, in the same
order as the eigenvalues, going down the diagonal, (x1, x2, to xn). It’s important to note
that while we can place the eigenvalues and eigenvectors in any order we want once we
find them, we must remain consistent in how we order them in these matrices. The first
column of the X matrix must be the eigenvector associated with the eigenvalue in the first
term for the diagonal of D, same with the second column of X and the second term for
the diagonal of D, and so on. Let’s look at an example. Consider the matrix
A, with entries -3, -4; 5, 6. We must first find the eigenvalues, which means we must
solve for the values of lambda that satisfy this expression, where the determinant of
A - λI = 0. Taking this determinant, we get (-3 - λ)(6 - λ) - (-4)(5) = 0. Foiling these
binomials we get -18 + 3λ - 6λ + λ2 + 20 = 0, which when simplified gives us λ2 - 3λ
+ 2 = 0. Now by factoring this we see that (λ - 1)(λ - 2) = 0, which means our solutions
and eigenvalues are λ = 1 and λ = 2. Now to find the eigenvectors, we will plug in
these values of λ into the equation (A - λI)x = 0, and solve for a possible vector x. Starting
with λ = 1, our matrix A - λI becomes -4, -4; 5, 5. The top row ends up telling us that
-4x1 - 4x2 = 0. Dividing by -4 we get x1 + x2 = 0, or simply x1 = -x2. We don’t have
to worry about the second row here because it ends up giving us the same thing. We will
choose x2 = 1, which makes x1 equal to -1, so our eigenvector for λ = 1 is (-1, 1).
Now we will plug in λ = 2. Our matrix A - λI becomes -5, -4; 5, 4. Both rows will again
give the same result, but looking at the top row we get -5x1 - 4x2 = 0. Solving for x1
we get x1 = (-4/5)x2. Choosing x2 = 1, we get x1 = -4/5, making our eigenvector for
λ = 2 equal to (-4/5, 1). Now that we have all of our eigenvalues and eigenvectors, we
can write out the diagonal matrix D and the matrix X. D will simply be the eigenvalues
along the diagonal: D = 1, 0; 0, 2. X will have the eigenvectors as columns, but now
that we have chosen an order for the eigenvalues we must keep that order in mind. The eigenvector
for λ = 1 must be our first column, while the eigenvector for λ = 2 will be our second,
making our matrix X = -1, -4/5; 1, 1. We have obtained the main matrices for diagonalizing
the matrix A. The only remaining piece is the inverse of X. Since X is a 2 by 2 matrix,
we simply swap the top left and bottom right elements, multiply the off-diagonal elements
by -1, and divide the whole matrix by the determinant. The determinant will be (-1 times
1) - (-4/5 times 1) which is -1 + 4/5, which equals -1/5. The inverse will therefore be
the matrix 1, 4/5; -1, -1, divided by the determinant -1/5, which means we just multiply
by -5, giving us -5, -4; 5, 5. We have found all the components to diagonalize
A, those being X, D, and the inverse of X. But in order to show that setting up the matrices
in this way does in fact give back A, following the equation A = XDX-1, let’s do the multiplication
to verify. First take D times X-1 and we get -5, -4; 10, 10. Next we will multiply X by
this new matrix, giving us 5 minus (4/5 times 10), 4 minus (4/5 times 10); -5 + 10, -4 +
10. This becomes 5 - 8, 4 - 8; 5, 6. We end up with -3, -4; 5, 6, which was indeed the
matrix A we started with. Diagonalization helps make computations with
matrices much easier and computer friendly, making it a valuable process to remember,
so let’s check comprehension.