How to diagonalize a matrix (diagonalizable matrix)

On this post you will find everything about diagonalizable matrices: what diagonalizable matrices are, when a matrix can and cannot be diagonalized, how to to diagonalize matrices,… And you even have several problems solved step by step so that you can practice and understand perfectly how to do it. Finally, you will see the applications that matrix diagonalization has and the properties of diagonalizable matrices.

What is a diagonalizable matrix?

As we will see below, diagonalizing a matrix is very useful in the field of linear algebra. So you may be wondering… what is diagonalizing a matrix? Well, the definition of diagonalizable matrix is as follows:

A diagonalizable matrix is a square matrix that can be transformed into a diagonal matrix, that is, a matrix filled with zeros except for the main diagonal. The mathematical relation between a matrix and its diagonalized matrix is:

A = PDP^{-1}

Or equivalently:

D = P^{-1}AP

Where A is the matrix to be diagonalized, P is the matrix whose columns are the eigenvectors of A, P-1 its inverse matrix, and D is the diagonal matrix composed by the eigenvalues of A.

Matrix P acts as a change of basis matrix, so in reality with this formula we are actually changing basis to matrix A so that the matrix becomes a diagonal matrix (D) in the new basis.

Thus, matrix A and matrix D are similar matrices. And, logically, P is an invertible matrix.

When is a matrix diagonalizable?

Not all matrices are diagonalizable, only matrices that meet certain characteristics can be diagonalized. There are three ways to know whether a matrix is diagonalizable:

  1. A square matrix of order n is diagonalizable if it has n linearly independent eigenvectors, in other words, if these vectors form a basis. That is because matrix P is formed by the eigenvectors of that matrix. To know whether the eigenvectors meet this condition, it is enough that the determinant of the matrix P is nonzero, which means that the matrix has maximum rank.

 \text{if} \quad det(P)\neq 0 \ \color{orange}\bm{\longrightarrow}\color{black} \ \text{diagonalizable matrix}

  1. One property of eigenvalues and eigenvectors is that eigenvectors of different eigenvalues are linearly independent. Therefore, if all eigenvalues of the matrix are unique the matrix is diagonalizable.
  1. Another way to determine whether a matrix can be factored into a diagonal matrix is by using the algebraic and geometric multiplicities. The algebraic multiplicity is the number of times an eigenvalue is repeated, and the geometric multiplicity is the dimension of the nullspace of matrix (A-λI). Thus, if the algebraic multiplicity is equal to the geometric multiplicity for each eigenvalue, the matrix is diagonalizable.

\alpha_\lambda= \text{algebraic multiplicity} = \text{multiplicity of eigenvalue }\lambda

m_\lambda = \text{geometric multiplicity} = \text{dim } Ker(A-\lambda I) = n -rk(A-\lambda I)

 \alpha_\lambda \geq m_\lambda \geq 1

\text{if} \quad \alpha_\lambda = m_\lambda \quad \forall \lambda \ \color{orange}\bm{\longrightarrow}\color{black} \ \text{diagonalizable matrix}

  1. Finally, the spectral theorem states that every real symmetric matrix is diagonalizable.

How to diagonalize a matrix

The process of diagonalizing a matrix is based on computing the eigenvalues and eigenvectors of a matrix. So, to diagonalize a matrix you must first know how to find the eigenvalues and the eigenvectors of a matrix.

With the following method you can diagonalize a matrix of any dimension: 2×2, 3×3, 4×4, etc. The steps to diagonalize a matrix are:

  1. Find the eigenvalues of the matrix.
  2. Calculate the eigenvector associated with each eigenvalue.
  3. Form matrix P, whose columns are the eigenvectors of the matrix to be diagonalized.
  4. Verify that the matrix can be diagonalized (it must satisfy one of the conditions explained in the previous section).
  5. Form diagonal matrix D, whose elements are all 0 except those on the main diagonal, which are the eigenvalues found in step 1.

Note: The eigenvectors of matrix P can be placed in any order, but the eigenvalues of diagonal matrix D must be placed in that same order. For example, the first eigenvalue of diagonal matrix D must correspond to the eigenvector of the first column of matrix P.

Below you have several step-by-step solved exercises of matrix diagonalization with which you can practice.

Practice problems on matrix diagonalization

Problem 1

Diagonalize the following 2×2 dimension matrix:

\displaystyle A= \begin{pmatrix}2&2\\[1.1ex] 1&3\end{pmatrix}

First we must determine the eigenvalues of matrix A. So we calculate the characteristic polynomial solving the following determinant:

\displaystyle \text{det}(A-\lambda I)= \begin{vmatrix}2- \lambda &2\\[1.1ex] 1&3-\lambda \end{vmatrix} = \lambda^2-5\lambda +4

Now we calculate the roots of the characteristic polynomial:

\displaystyle \lambda^2-5\lambda +4=0 \ \longrightarrow \ \begin{cases} \lambda = 4 \\[2ex] \lambda = 1 \end{cases}

Then, we calculate the eigenvector associated with each eigenvalue. First the eigenvector corresponding to eigenvalue 1:

 \displaystyle (A-I)v=0

\displaystyle \begin{pmatrix}1&2\\[1.1ex] 1&2\end{pmatrix}\begin{pmatrix}x \\[1.1ex] y \end{pmatrix} =}\begin{pmatrix}0 \\[1.1ex] 0 \end{pmatrix}

\displaystyle \left.\begin{array}{l} x+2y = 0 \\[2ex] x+2y = 0\end{array}\right\} \longrightarrow \ x=-2y

\displaystyle v = \begin{pmatrix}-2 \\[1.1ex] 1 \end{pmatrix}

And secondly we calculate the eigenvector associated with the eigenvalue 4:

\displaystyle (A-4I)v=0

\displaystyle \begin{pmatrix}-2&2\\[1.1ex] 1&-1\end{pmatrix}\begin{pmatrix}x \\[1.1ex] y \end{pmatrix} =}\begin{pmatrix}0 \\[1.1ex] 0 \end{pmatrix}

\displaystyle \left.\begin{array}{l} -2x+2y = 0 \\[2ex] x-y = 0\end{array}\right\} \longrightarrow \ y=x

\displaystyle v = \begin{pmatrix}1 \\[1.1ex] 1 \end{pmatrix}

We form matrix P, made up of the eigenvectors:

\displaystyle P = \begin{pmatrix}-2&1 \\[1.1ex] 1&1 \end{pmatrix}

Since all eigenvalues are different, matrix A is diagonalizable. So the corresponding diagonal matrix is the one with the eigenvalues on the main diagonal:

 \displaystyle D= \begin{pmatrix}1&0\\[1.1ex] 0&4\end{pmatrix}

Remember to place the eigenvalues in the same order as the eigenvectors are placed in matrix P.

In conclusion, the change-of-basis matrix and the diagonalized matrix are:

 \displaystyle P = \begin{pmatrix}-2&1 \\[1.1ex] 1&1 \end{pmatrix} \qquad D= \begin{pmatrix}1&0\\[1.1ex] 0&4\end{pmatrix}

 

Problem 2

Diagonalize the following square matrix of order 2:

\displaystyle A= \begin{pmatrix}3&4\\[1.1ex] -1&-2\end{pmatrix}

Firstly, we must find the eigenvalues of matrix A. So we calculate the characteristic equation solving the following determinant:

\displaystyle \text{det}(A-\lambda I)= \begin{vmatrix}3- \lambda &4\\[1.1ex] -1&-2-\lambda \end{vmatrix} = \lambda^2-\lambda -2.

Now we calculate the roots of the characteristic polynomial:

 \displaystyle \lambda^2-\lambda -2=0 \ \longrightarrow \ \begin{cases} \lambda = -1 \\[2ex] \lambda = 2 \end{cases}

Once the eigenvalues hace been found, we calculate the eigenvector associated with each one. First the eigenvector corresponding to eigenvalue -1:

\displaystyle (A+I)v=0

\displaystyle \begin{pmatrix}4&4\\[1.1ex] -1&-1\end{pmatrix}\begin{pmatrix}x \\[1.1ex] y \end{pmatrix} =}\begin{pmatrix}0 \\[1.1ex] 0 \end{pmatrix}

\displaystyle \left.\begin{array}{l} 4x+4y = 0 \\[2ex] -x-y = 0\end{array}\right\} \longrightarrow \ x=-y

\displaystyle v = \begin{pmatrix}-1 \\[1.1ex] 1 \end{pmatrix}

And then we calculate the eigenvector associated with the eigenvalue of value 2:

\displaystyle (A-2I)v=0

\displaystyl \begin{pmatrix}1&4\\[1.1ex] -1&-4\end{pmatrix}\begin{pmatrix}x \\[1.1ex] y \end{pmatrix} =}\begin{pmatrix}0 \\[1.1ex] 0 \end{pmatrix}

\displaystyl \left.\begin{array}{l} x+4y = 0 \\[2ex] -x-4y = 0\end{array}\right\} \longrightarrow \ x=-4y

\displaystyle v = \begin{pmatrix}-4 \\[1.1ex] 1 \end{pmatrix}

We form matrix P, composed by the eigenvectors of the matrix:

\displaystyle P = \begin{pmatrix}-1&-4 \\[1.1ex] 1&1 \end{pmatrix}

As all eigenvalues are different from each other, matrix A is diagonalizable. Thus, the diagonalized matrix is the one that contains the eigenvalues on the main diagonal:

\displaystyle D= \begin{pmatrix}-1&0\\[1.1ex] 0&2\end{pmatrix}

Remember to place the eigenvalues in the same order as the eigenvectors are placed in matrix P.

In conclusion, the change-of-basis matrix and the diagonalized matrix are:

 \displaystyle P = \begin{pmatrix}-1&-4 \\[1.1ex] 1&1\end{pmatrix} \qquad D= \begin{pmatrix}-1&0\\[1.1ex] 0&2\end{pmatrix}

 

Problem 3

Diagonalize the following 3×3 dimension matrix:

 \displaystyle A= \begin{pmatrix}2&0&2\\[1.1ex] -1&2&1\\[1.1ex] 0&1&4\end{pmatrix}

The first step is to find the eigenvalues of matrix A. So we calculate the characteristic polynomial solving the determinant of the following matrix:

 \displaystyle \text{det}(A-\lambda I)= \begin{vmatrix}2-\lambda&0&2\\[1.1ex] -1&2-\lambda&1\\[1.1ex] 0&1&4-\lambda \end{vmatrix} = -\lambda^3+8\lambda^2-19\lambda+12

The roots of the third degree polynomial are:

 \lambda=1 \qquad \lambda =3 \qquad \lambda = 4

Now find the eigenvector of each eigenvalue. First, we calculate the eigenvector that corresponds to eigenvalue 1:

 \displaystyle (A-I)v=0

 \displaystyle \begin{pmatrix}1&0&2\\[1.1ex] -1&1&1\\[1.1ex] 0&1&3\end{pmatrix}\begin{pmatrix}x \\[1.1ex] y \\[1.1ex] z \end{pmatrix} =\begin{pmatrix}0 \\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

 \displaystyle \left.\begin{array}{l} x+2z = 0 \\[2ex] -x+y+z = 0\\[2ex] y+3z = 0\end{array}\right\} \longrightarrow \ \begin{array}{l}x=-2z \\[2ex] y = -3z \end{array}

 \displaystyle v = \begin{pmatrix}-2 \\[1.1ex] -3 \\[1.1ex] 1\end{pmatrix}

Then we calculate the eigenvector associated with the eigenvalue 3:

 \displaystyle (A-3I)v=0

 \displaystyle \begin{pmatrix}-1&0&2\\[1.1ex] -1&-1&1\\[1.1ex] 0&1&1\end{pmatrix}\begin{pmatrix}x \\[1.1ex] y \\[1.1ex] z \end{pmatrix} =\begin{pmatrix}0 \\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

 \displaystyle \left.\begin{array}{l} -x+2z = 0 \\[2ex] -x-y+z = 0\\[2ex] y+z = 0\end{array}\right\} \longrightarrow \ \begin{array}{l}x=2z \\[2ex] y = -z \end{array}

 \displaystyle v = \begin{pmatrix}2 \\[1.1ex] -1 \\[1.1ex] 1\end{pmatrix}

And, finally, we calculate the eigenvector associated with the eigenvalue 4:

 \displaystyle (A-4I)v=0

 \displaystyle \begin{pmatrix}-2&0&2\\[1.1ex] -1&-2&1\\[1.1ex] 0&1&0\end{pmatrix}\begin{pmatrix}x \\[1.1ex] y \\[1.1ex] z \end{pmatrix} =\begin{pmatrix}0 \\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

 \displaystyle \left.\begin{array}{l} -2x+2z = 0 \\[2ex] -x-2y+z = 0\\[2ex] y = 0\end{array}\right\} \longrightarrow \ \begin{array}{l}x=z \\[2ex] y = 0 \end{array}

 \displaystyle v = \begin{pmatrix}1 \\[1.1ex] 0 \\[1.1ex] 1\end{pmatrix}

We construct matrix P, formed by the eigenvectors of the matrix:

 \displaystyle  P = \begin{pmatrix}-2&2&1 \\[1.1ex] -3&-1&0 \\[1.1ex] 1&1&1 \end{pmatrix}

All eigenvalues are different from each other which means that matrix A is diagonalizable. So the corresponding diagonal matrix is the one that has the eigenvalues on the main diagonal:

 \displaystyle D= \begin{pmatrix}1&0&0\\[1.1ex] 0&3&0 \\[1.1ex] 0&0&4\end{pmatrix}

Remember to place the eigenvalues in the same order as the eigenvectors are placed in matrix P.

Therefore, matrices P and D are:

 \displaystyle P = \begin{pmatrix}-2&2&1 \\[1.1ex] -3&-1&0 \\[1.1ex] 1&1&1\end{pmatrix} \qquad D= \begin{pmatrix}1&0&0\\[1.1ex] 0&3&0 \\[1.1ex] 0&0&4\end{pmatrix}

 

Problem 4

Diagonalize, if possible, the following square matrix of order 3:

 \displaystyle A= \begin{pmatrix}-1&3&1\\[1.1ex] 0&2&0\\[1.1ex] 3&-1&1\end{pmatrix}

The first step is to find the eigenvalues of matrix A. So we calculate the characteristic polynomial solving the determinant of the following matrix:

 \displaystyle \text{det}(A-\lambda I)= \begin{vmatrix}-1-\lambda&3&1\\[1.1ex] 0&2-\lambda&0\\[1.1ex] 3&-1&1-\lambda \end{vmatrix} = -\lambda^3+2\lambda^2+4\lambda-8

Whose roots are:

 \lambda=2 \qquad \lambda =2 \qquad \lambda = -2

The eigenvalue -2 has simple algebraic multiplicity, on the other hand, the eigenvalue 2 has double multiplicity.

We calculate the eigenvector associated with each eigenvalue. First, the eigenvector corresponding to the eigenvalue -2:

 \displaystyle (A+2I)v=0

 \displaystyle \begin{pmatrix}1&3&1\\[1.1ex] 0&4&0\\[1.1ex] 3&-1&3\end{pmatrix}\begin{pmatrix}x \\[1.1ex] y \\[1.1ex] z \end{pmatrix} =\begin{pmatrix}0 \\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

 \displaystyle \left.\begin{array}{l} x+3y+z = 0 \\[2ex] 4y = 0\\[2ex] 3x-y+3z = 0\end{array}\right\} \longrightarrow \ \begin{array}{l}y=0 \\[2ex] x = -z \end{array}

 \displaystyle v = \begin{pmatrix}1 \\[1.1ex] 0 \\[1.1ex] -1\end{pmatrix}

Now we calculate the eigenvectors associated with the eigenvalues 2:

 \displaystyle (A-2I)v=0

 \displaystyle \begin{pmatrix}-3&3&1\\[1.1ex] 0&0&0\\[1.1ex] 3&-1&-1\end{pmatrix}\begin{pmatrix}x \\[1.1ex] y \\[1.1ex] z \end{pmatrix} =\begin{pmatrix}0 \\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

 \displaystyle \left.\begin{array}{l} -3x+3y+z = 0 \\[2ex] 0= 0\\[2ex] 3x-y-z = 0\end{array}\right\} \longrightarrow \ \begin{array}{l}y=0 \\[2ex] z=3x \end{array}

 \displaystyle v = \begin{pmatrix}1 \\[1.1ex] 0 \\[1.1ex] 3\end{pmatrix}

Since the eigenvalue 2 is repeated twice, we have to calculate another eigenvector that satisfies the equations of the eigenspace:

 \displaystyle v = \begin{pmatrix}-1 \\[1.1ex] 0 \\[1.1ex] -3\end{pmatrix}

We form matrix P with all the eigenvectors:

 \displaystyle  P = \begin{pmatrix}1&1&-1 \\[1.1ex] 0&0&0 \\[1.1ex] -1&3&-3 \end{pmatrix}

However, the three vectors are not linearly independent, since obviously the two eigenvectors of the eigenvalue 2 are a linear combination of each other. This can also be shown because the determinant of matrix P is equal to 0 (it has a row full of zeros):

 \displaystyle \text{det}(P) = \begin{vmatrix}1&1&-1 \\[1.1ex] 0&0&0 \\[1.1ex] -1&3&-3 \end{vmatrix}=0

Consequently, since the eigenvectors are linearly dependent, matrix A is not diagonalizable.

 

Problem 5

Diagonalize, if possible, the following 3×3 dimension matrix:

 \displaystyle A= \begin{pmatrix}3&0&0\\[1.1ex] 0&2&1\\[1.1ex] 0&1&2\end{pmatrix}

The first step is to find the eigenvalues of matrix A. So we calculate the characteristic polynomial solving the determinant of the following matrix:

 \displaystyle \text{det}(A-\lambda I)= \begin{vmatrix}3-\lambda&0&0\\[1.1ex] 0&2-\lambda&1\\[1.1ex] 0&1&2-\lambda \end{vmatrix} =(3-\lambda)[\lambda^2 -4\lambda +3]

The roots of the characteristic polynomial, and therefore the eigenvalues of matrix A, are:

 \lambda=1 \qquad \lambda =3 \qquad \lambda = 3

Now we calculate the eigenvector associated with each eigenvalue. First, the eigenvector corresponding to the eigenvalue 1:

 \displaystyle (A-I)v=0

 \displaystyle \begin{pmatrix}2&0&0\\[1.1ex] 0&1&1\\[1.1ex] 0&1&1\end{pmatrix}\begin{pmatrix}x \\[1.1ex] y \\[1.1ex] z \end{pmatrix} =\begin{pmatrix}0 \\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

 \displaystyle \left.\begin{array}{l} 2x = 0 \\[2ex] y+z = 0\\[2ex] y+z = 0\end{array}\right\} \longrightarrow \ \begin{array}{l}x=0 \\[2ex] y = -z \end{array}

 \displaystyle v = \begin{pmatrix}0 \\[1.1ex] -1 \\[1.1ex] 1\end{pmatrix}

Then we calculate the eigenvectors associated with the eigenvalues 3:

 \displaystyle (A-3I)v=0

 \displaystyle \begin{pmatrix}0&0&0\\[1.1ex] 0&-1&1\\[1.1ex] 0&1&-1\end{pmatrix}\begin{pmatrix}x \\[1.1ex] y \\[1.1ex] z \end{pmatrix} =\begin{pmatrix}0 \\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

 \displaystyle \left.\begin{array}{l} 0 = 0 \\[2ex] -y+z = 0\\[2ex] y-z = 0\end{array}\right\} \longrightarrow \ \begin{array}{l}y=z  \end{array}

 \displaystyle v = \begin{pmatrix}0 \\[1.1ex] 1 \\[1.1ex] 1\end{pmatrix}

Since the eigenvalue 3 is repeated twice, we have to calculate another eigenvector that complies with the equations of the eigenspace:

 \displaystyle v = \begin{pmatrix}1 \\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

We form matrix P with the eigenvectors of the matrix:

 \displaystyle  P = \begin{pmatrix}0&0&1 \\[1.1ex] -1&1&0 \\[1.1ex] 1&1&0 \end{pmatrix}

Unlike exercise 4, in this case we have been able to form 3 linearly independent vectors even though eigenvalue 3 has double algebraic multiplicity. We can check this condition by solving determinant of matrix P (it is different from zero):

 \displaystyle \text{det}(P) = \begin{vmatrix}0&0&1 \\[1.1ex] -1&1&0 \\[1.1ex] 1&1&0 \end{vmatrix} =-2 \neq 0

So it is possible to perform the diagonal decomposition of matrix A. And the corresponding diagonal matrix is the one that has the eigenvalues on the main diagonal:

 \displaystyle D= \begin{pmatrix}1&0&0\\[1.1ex] 0&3&0 \\[1.1ex] 0&0&3\end{pmatrix}

Remember to place the eigenvalues in the same order as the eigenvectors are placed in matrix P.

Therefore, matrices P and D are:

 \displaystyle P = \begin{pmatrix}0&0&1 \\[1.1ex] -1&1&0 \\[1.1ex] 1&1&0 \end{pmatrix}\qquad D= \begin{pmatrix}1&0&0\\[1.1ex] 0&3&0 \\[1.1ex] 0&0&3\end{pmatrix}

 

Problem 6

Diagonalize, if possible, the following 4×4 dimension matrix:

 \displaystyle A=\begin{pmatrix}2&1&2&0\\[1.1ex] 1&-3&1&0\\[1.1ex] 0&-1&0&0\\[1.1ex] 0&0&0&5\end{pmatrix}

The first step is to find the eigenvalues of matrix A. So we determine the characteristic polynomial solving the determinant of the following matrix:

 \displaystyle \text{det}(A-\lambda I)= \begin{vmatrix}2-\lambda&1&2&0\\[1.1ex] 1&-3-\lambda&1&0\\[1.1ex] 0&-1&-\lambda&0\\[1.1ex] 0&0&0&5-\lambda\end{vmatrix} =(5-\lambda)[-\lambda^3 -\lambda^2 +6\lambda]

The roots of the fourth degree polynomial, and therefore the eigenvalues of matrix A, are:

 \lambda=0 \qquad \lambda =-3 \qquad \lambda = 2\qquad \lambda = 5

Once all the eigenvalues have been calculated, we are going to find the eigenvectors. We determine the eigenvector associated with the eigenvalue 0:

 \displaystyle (A-0I)v=0

 \displaystyle \begin{pmatrix} 2&1&2&0\\[1.1ex] 1&-3&1&0\\[1.1ex] 0&-1&0&0\\[1.1ex] 0&0&0&5\end{pmatrix}\begin{pmatrix}w \\[1.1ex] x \\[1.1ex] y\\[1.1ex] z \end{pmatrix} =\begin{pmatrix}0 \\[1.1ex] 0\\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

 \displaystyle \left.\begin{array}{l} 2w+x+2y = 0 \\[2ex] w-3x+y = 0\\[2ex] -x=0 \\[2ex] 5z=0 \end{array}\right\} \longrightarrow \ \begin{array}{l} x=0 \\[2ex] z=0  \\[2ex]w=-y \end{array}

 \displaystyle v = \begin{pmatrix}-1 \\[1.1ex] 0 \\[1.1ex] 1  \\[1.1ex]0 \end{pmatrix}

We calculate the eigenvector associated with the eigenvalue -3:

 \displaystyle (A+3I)v=0

 \displaystyle \begin{pmatrix} 5&1&2&0\\[1.1ex] 1&0&1&0\\[1.1ex] 0&-1&3&0\\[1.1ex] 0&0&0&8\end{pmatrix}\begin{pmatrix}w \\[1.1ex] x \\[1.1ex] y\\[1.1ex] z \end{pmatrix} =\begin{pmatrix}0 \\[1.1ex] 0\\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

 \displaystyle \left.\begin{array}{l} 5w+x+2y = 0 \\[2ex] w+y = 0\\[2ex] -x+3y=0 \\[2ex] 8z=0 \end{array}\right\} \longrightarrow \ \begin{array}{l} w=-y  \\[2ex]x=3y \\[2ex] z=0 \end{array}

 \displaystyle v = \begin{pmatrix}-1 \\[1.1ex] 3 \\[1.1ex] 1  \\[1.1ex]0 \end{pmatrix}

We calculate the eigenvector associated with the eigenvalue 2:

 \displaystyle (A-2I)v=0

 \displaystyle \begin{pmatrix} 0&1&2&0\\[1.1ex] 1&-5&1&0\\[1.1ex] 0&-1&-2&0\\[1.1ex] 0&0&0&3\end{pmatrix}\begin{pmatrix}w \\[1.1ex] x \\[1.1ex] y\\[1.1ex] z \end{pmatrix} =\begin{pmatrix}0 \\[1.1ex] 0\\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

 \displaystyle \left.\begin{array}{l} x+2y = 0 \\[2ex] w-5x+y = 0\\[2ex] -x-2y=0 \\[2ex] 3z=0 \end{array}\right\} \longrightarrow \ \begin{array}{l} x=-2y \\[2ex] w=-11y \\[2ex] z=0  \end{array}

 \displaystyle v = \begin{pmatrix}-11 \\[1.1ex] -2 \\[1.1ex] 1  \\[1.1ex]0 \end{pmatrix}

We calculate the eigenvector associated with the eigenvalue 5:

 \displaystyle (A-5I)v=0

 \displaystyle \begin{pmatrix} -3&1&2&0\\[1.1ex] 1&-8&1&0\\[1.1ex] 0&-1&-5&0\\[1.1ex] 0&0&0&0\end{pmatrix}\begin{pmatrix}w \\[1.1ex] x \\[1.1ex] y\\[1.1ex] z \end{pmatrix} =\begin{pmatrix}0 \\[1.1ex] 0\\[1.1ex] 0 \\[1.1ex] 0\end{pmatrix}

 \displaystyle \left.\begin{array}{l} -3w+x+2y = 0 \\[2ex] w-8x+y = 0\\[2ex] -x-5y=0 \\[2ex] 0=0 \end{array}\right\} \longrightarrow \ \begin{array}{l} w=x=y=0 \end{array}

 \displaystyle v = \begin{pmatrix}0 \\[1.1ex] 0 \\[1.1ex] 0 \\[1.1ex]1 \end{pmatrix}

We form matrix P, composed of the eigenvectors of the matrix:

 \displaystyle  P = \begin{pmatrix}-1&-1&-11&0 \\[1.1ex] 0&3&-2&0 \\[1.1ex] 1&1&1&0  \\[1.1ex]0&0&0&1\end{pmatrix}

Since all eigenvalues are different from each other, matrix A is diagonalizable. And the corresponding diagonal matrix is the one that has the eigenvalues on the main diagonal:

 \displaystyle D= \begin{pmatrix}0&0&0&0\\[1.1ex] 0&-3&0&0 \\[1.1ex] 0&0&2&0\\[1.1ex] 0&0&0&5\end{pmatrix}

Remember to place the eigenvalues in the same order as the eigenvectors are placed in matrix P.

In conclusion, the change-of-basis matrix and the diagonalized matrix are:

 \displaystyle P = \begin{pmatrix}-1&-1&-11&0 \\[1.1ex] 0&3&-2&0 \\[1.1ex] 1&1&1&0  \\[1.1ex]0&0&0&1\end{pmatrix} \qquad D=\begin{pmatrix}0&0&0&0\\[1.1ex] 0&-3&0&0 \\[1.1ex] 0&0&2&0\\[1.1ex] 0&0&0&5\end{pmatrix}

 

Applications of diagonalizable matrices

If you’ve gotten this far, I’m sure you’re wondering: what is a diagonalizable matrix for?

Well, diagonalizable matrices are very useful and are used a lot in mathematics. The reason is that a diagonal matrix is practically full of zeros and therefore makes calculations much easier.

A clear example of this is the power of a diagonalizable matrix, since its result is simplified by the following formula:

 \displaystyle  A^k=PD^kP^{-1}

So it is only necessary to raise matrix D to the exponent. And since it is a diagonal matrix, the operation consists of only raising each term on the main diagonal to the exponent:

 \displaystyle  D^k = diag(\lambda_1^k,\lambda_2^k, \ldots , \lambda_n^k)

Example of the power of a diagonalizable matrix

For a better understanding, we will calculate the power of a matrix that is diagonalizable as an example:

 \displaystyle A= \begin{pmatrix}2&0\\[1.1ex] 3&1\end{pmatrix}

The change-of-basis matrix P, made up of its eigenvectors, and the diagonalized matrix D, made up of its eigenvalues, are:

 \displaystyle P = \begin{pmatrix}0&1 \\[1.1ex] 1&3 \end{pmatrix} \qquad D= \begin{pmatrix}1&0\\[1.1ex] 0&2\end{pmatrix}

So, to give an example, matrix A raised to 7 is equivalent to:

 \displaystyle  A^7=PD^7P^{-1}

 \displaystyle  A^7=PD^7P^{-1}

 \displaystyle  A^7=\begin{pmatrix}0&1 \\[1.1ex] 1&3\end{pmatrix}\begin{pmatrix}1&0\\[1.1ex] 0&2\end{pmatrix}^7\left.\begin{pmatrix}0&1 \\[1.1ex] 1&3 \end{pmatrix}\right.^{-1}

Now we calculate the inverse of matrix P:

 \displaystyle  A^7=\begin{pmatrix}0&1 \\[1.1ex] 1&3 \end{pmatrix}\begin{pmatrix}1&0\\[1.1ex] 0&2\end{pmatrix}^7\begin{pmatrix}-3&1 \\[1.1ex] 1&0 \end{pmatrix}

Then we solve the power of the matrix D:

 \displaystyle  A^7=\begin{pmatrix}0&1 \\[1.1ex] 1&3\end{pmatrix}\begin{pmatrix}1^7&0\\[1.1ex] 0&2^7\end{pmatrix} \begin{pmatrix}-3&1 \\[1.1ex] 1&0 \end{pmatrix}

 \displaystyle  A^7=\begin{pmatrix}0&1 \\[1.1ex] 1&3 \end{pmatrix}\begin{pmatrix}1&0\\[1.1ex] 0&128\end{pmatrix} \begin{pmatrix}-3&1 \\[1.1ex] 1&0 \end{pmatrix}

And, finally, we perform the matrix multiplications:

 \displaystyle  \bm{A^7=}\begin{pmatrix}\bm{128}&\bm{0}\\[1.1ex] \bm{381}&\bm{1}\end{pmatrix}

As you have seen, it is more convenient to calculate the power with a diagonal matrix than to multiply the same matrix seven times in a row. Imagine then with much higher exponent values.

Properties of diagonalizable matrices

The characteristics of this type of matrices are:

  • If matrix A is diagonalizable, then so is any power of A.
  • Almost all matrices can be diagonalized over a complex \mathbb{C} environment. Although some matrices can never be diagonalized.
  • If matrix P is an orthogonal matrix, then matrix A is said to be orthogonally diagonalizable and, therefore, the equation can be rewritten:

 \displaystyle  A=PDP^t

  • A matrix is diagonalizable by a unitary matrix if and only if it is a normal matrix.
  • Given two diagonalizable matrices, they commute if and only if they can be diagonalized simultaneously, that is, if they share the same orthonormal basis of eigenvectors.
  • If an endomorphism is diagonalizable, it is said to be diagonalizable by similarity. However, not all endomorphisms are diagonalizable.

Leave a Comment

Your email address will not be published.

Scroll to Top