In this topic, we will finally delve into the practical procedure of diagonalizing matrices. Our focus is to provide you with the necessary tools and steps to successfully carry out the diagonalization process.
But first, let's develop the necessary theoretical results. Please remember that a square matrix of dimension is diagonalizable if there exists a diagonal matrix and an invertible one such that .
The surprising connection with eigenvectors
Let us first carefully analyze the definition of diagonalizability. Let's write the columns of as and the diagonal entries of as .
If we multiply the equation on the right by , then we simply have that:For these two matrices to be equal, it is enough that their columns are equal, so we will focus on them. In fact, we only need to consider the first column, since the reasoning is the same for all the others.
First, from the properties of matrix multiplication, we know that the first column of the product is simply the product of with the first column of , that is, . On the other hand, we can follow the same reasoning for the first column of ; but since we also know that is diagonal, we obtain the first column of is . Therefore, we are looking for:But wait just a moment... that equation looks like one we already know... what that expression means is that is an eigenvector of with eigenvalue !
Thus, is diagonalizable if and only if the columns of are eigenvectors of whose corresponding eigenvalues are the diagonal entries of .
Thanks to our surprising result, to construct and all we need is to calculate all the eigenvalues of together with their eigenvectors:
-
Put the eigenvalues as the entries of the diagonal of .
-
Put the respective eigenvectors as the columns of .
How to detect diagonalizability
Not every matrix is diagonalizable, but the connection with eigenvectors is so deep that it allows us to fully understand when a matrix can be diagonalizable.
Before, remember each eigenvalue has an associated eigenspace (the subspace spanned by its eigenvectors), which has a certain dimension. We call this number the geometric multiplicity of the eigenvalue. The characterization theorem is:
The following are equivalent:
a) is diagonalizable.
b) There exists a basis consisting of eigenvectors of .
c) The sum of the geometric multiplicities of the eigenvalues of is
The simplest case when diagonalizability exists for sure is when an matrix has exactly eigenvalues. If not, then you have to get the sum of the geometric multiplicities of the eigenvalues.
In short, when you don't have distinct eigenvalues, you need to calculate all geometric multiplicities and check if they sum to .
Steps to diagonalize
Combining everything we discovered, we now have a straightforward and elegant procedure for diagonalizing any square matrix (as long as it is):
-
Find all the eigenvalues of the matrix.
-
Determine the eigenvectors corresponding to each eigenvalue.
-
Find the dimension of each eigenspace.
-
Add the geometric multiplicities of each eigenvalue. If the sum is exactly , then it is diagonalizable, and we can go to the next step. Otherwise, the matrix is not diagonalizable.
-
Build : its columns are the eigenvectors.
-
Build : the entries on its diagonal are the eigenvalues corresponding to the eigenvectors in the same order. If an eigenvalue has more than one eigenvector, then it is repeated as many times as many eigenvectors it has.
Let's put our brand-new procedure into practice!
A simple diagonalization
Let's start with a simple matrix: The first thing you have to do is find its eigenvalues, for this, first calculate its characteristic polynomial . The roots of the polynomial are the eigenvalues, so we get that they are and . Thanks to our shortcut, we notice that there are as many eigenvalues as the dimension of , so it is diagonalizable!
Now you have to find the eigenvectors. Starting with , you need the solutions of the system of equations , that is:
A possible solution would be . Now, for the eigenvalue , you need to solve :
An easy solution is be . All ready! You only have to create whose diagonal entries are the eigenvalues and whose columns are the eigenvectors in the same order:Feel free to verify that .
A more challenging diagonalization
Let's analyze the following matrix:Calculating its characteristic polynomial , we see that the eigenvalues are 2 and -1. Until now, you cannot know if A is diagonalizable, you must find all the eigenvectors.
Starting with , the eigenvectors are the solutions to the system:
You know that the solutions of a system of linear equations is a vector subspace, in this case, it is of the form:
According to our characterization theorem, you need a basis, so you can take and .
Finally, for the eigenvalue, you must solve the system:
A solution would be . And now, you can build and :
Not all matrices are diagonalizable
Not every matrix is diagonalizable. Think about this simple one:
Its only eigenvalue is but the dimension of its eigenspace is , so the matrix is not diagonalizable. But if we still built we would get that:
This is a clear contradiction!
Conclusion
-
A square matrix of dimension is diagonalizable if there exists a diagonal matrix and an invertible one such that .
-
The diagonal entries of are the eigenvalues of , while the columns of are its eigenvectors.
-
The matrix is diagonalizable if and only if there is a basis formed by its eigenvectors, which is also equivalent to the fact that the geometric multiplicities of its eigenvalues add up to .
-
If has eigenvalues, then it is diagonalizable.
-
To diagonalize , first calculate its eigenvalues, then the associated eigenvectors, and finally get and .