Diagonalization of Matrices

Definition and Theorem of Diagonalizable Matrices

Definition: An \( n \times n \) matrix \( A \) is said to be diagonalizable if there exists an invertible matrix \( P \) (having an inverse) and a diagonal matrix \( D \) such that :

$$ A = P D P^{-1} $$

Theorem: An \( n \times n \) square matrix \( A \) is diagonalizable if and only if it has \( n \) linearly independent eigenvectors. Matrix \( P \) consists of the \( n \) eigenvectors as its columns, and matrix \( D \) is a diagonal matrix whose entries are the corresponding eigenvalues of \( A \) .

Examples with Solutions

Example 1

Let \( A = \begin{bmatrix} -1 & 2 \\ 0 & 1 \end{bmatrix} \) .

a) Find the eigenvalues of \( A \) and their corresponding eigenvectors .
b) Show that the eigenvectors form a basis for \( \mathbb{R}^2 \) .
c) Diagonalize matrix \( A \) if possible .

View Solution to Example 1

a) Eigenvalues and Eigenvectors

Find the eigenvalues using the characteristic polynomial \( \det(A - \lambda I) = 0 \) :

$$ \det \left( \begin{bmatrix} -1 & 2 \\ 0 & 1 \end{bmatrix} - \lambda \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \right) = \det \begin{bmatrix} -1-\lambda & 2 \\ 0 & 1-\lambda \end{bmatrix} = (-1-\lambda)(1-\lambda) = 0 $$

Solving gives the eigenvalues: \( \lambda_1 = -1 \) and \( \lambda_2 = 1 \) .

Eigenvector for \( \lambda_1 = -1 \): Solving \( (A + I)\mathbf{x} = 0 \):

$$ \begin{bmatrix} 0 & 2 \\ 0 & 2 \end{bmatrix} \sim \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} \implies x_1 \text{ is free, } x_2 = 0 \implies \mathbf{x}_1 = \begin{bmatrix} 1 \\ 0 \end{bmatrix} $$

Eigenvector for \( \lambda_2 = 1 \): Solving \( (A - I)\mathbf{x} = 0 \):

$$ \begin{bmatrix} -2 & 2 \\ 0 & 0 \end{bmatrix} \sim \begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix} \implies x_2 \text{ is free, } x_1 = x_2 \implies \mathbf{x}_2 = \begin{bmatrix} 1 \\ 1 \end{bmatrix} $$

b) Basis for \( \mathbb{R}^2 \)

To show the eigenvectors \( \left\{ \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \end{bmatrix} \right\} \) form a basis, we test for linear independence using an augmented matrix :

$$ \begin{bmatrix} 1 & 1 & | & 0 \\ 0 & 1 & | & 0 \end{bmatrix} \sim \begin{bmatrix} 1 & 0 & | & 0 \\ 0 & 1 & | & 0 \end{bmatrix} $$

The system has only the trivial solution \( \mathbf{0} \), confirming they are linearly independent and thus form a basis for \( \mathbb{R}^2 \) .


c) Diagonalization

Construct \( P \) from the eigenvectors and find \( P^{-1} \) :

$$ P = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}, \quad P^{-1} = \begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix} $$

Form matrix \( D \) using the corresponding eigenvalues on the diagonal :

$$ A = P D P^{-1} = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & -1 \\ 0 & 1 \end{bmatrix} $$

Example 2

Let \( A = \begin{bmatrix} 2 & -3 & 0 \\ 0 & -1 & 0 \\ 1 & 3 & 1 \end{bmatrix} \) .

a) Find the eigenvalues of \( A \) and their corresponding eigenvectors .
b) Show that the eigenvectors form a basis for \( \mathbb{R}^3 \) .
c) Diagonalize matrix \( A \) if possible .

View Solution to Example 2

a) Eigenvalues and Eigenvectors

Evaluating the characteristic polynomial \( \det(A - \lambda I) = (2-\lambda)(-1-\lambda)(1-\lambda) = 0 \), we find eigenvalues :

\( \lambda_1 = -1, \quad \lambda_2 = 1, \quad \lambda_3 = 2 \)

Solving the respective homogeneous systems for each eigenvalue yields the eigenvectors :

$$ \lambda_1 = -1 \implies \mathbf{x}_1 = \begin{bmatrix} -1 \\ -1 \\ 2 \end{bmatrix}, \quad \lambda_2 = 1 \implies \mathbf{x}_2 = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}, \quad \lambda_3 = 2 \implies \mathbf{x}_3 = \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} $$

b) Basis for \( \mathbb{R}^3 \)

Row reducing the augmented matrix formed by the three eigenvectors shows they are linearly independent and form a basis for \( \mathbb{R}^3 \) .


c) Diagonalization

$$ P = \begin{bmatrix} -1 & 0 & 1 \\ -1 & 0 & 0 \\ 2 & 1 & 1 \end{bmatrix}, \quad P^{-1} = \begin{bmatrix} 0 & -1 & 0 \\ -1 & 3 & 1 \\ 1 & -1 & 0 \end{bmatrix} $$ $$ A = P D P^{-1} = \begin{bmatrix} -1 & 0 & 1 \\ -1 & 0 & 0 \\ 2 & 1 & 1 \end{bmatrix} \begin{bmatrix} -1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \end{bmatrix} \begin{bmatrix} 0 & -1 & 0 \\ -1 & 3 & 1 \\ 1 & -1 & 0 \end{bmatrix} $$

Example 3 (Non-Diagonalizable Matrix)

Find the eigenvalues and corresponding eigenvectors of matrix \( A = \begin{bmatrix} 2 & 0 & 4 \\ 2 & -1 & 3 \\ -2 & 1 & -3 \end{bmatrix} \) and diagonalize it if possible .

View Solution to Example 3

Solving the characteristic polynomial \( -\lambda^3 - 2\lambda^2 = 0 \), we obtain eigenvalues :

\( \lambda_1 = 0 \) (multiplicity 2) and \( \lambda_3 = -2 \)

For \( \lambda = 0 \), row-reducing \( A - 0I \) yields only one linearly independent eigenvector: \( \mathbf{x} = \begin{bmatrix} -2 \\ -1 \\ 1 \end{bmatrix} \) .

Because the eigenvalue \( \lambda = 0 \) has an algebraic multiplicity of 2 but only 1 associated linearly independent eigenvector, the vectors cannot span \( \mathbb{R}^3 \). Therefore, matrix \( A \) is not diagonalizable .

Example 4

Knowing that \( 1 \) and \( 3 \) are eigenvalues of matrix \( A = \begin{bmatrix} 2 & 0 & 0 & 1 \\ 0 & 0 & 4 & 0 \\ 0 & 3 & 0 & 0 \\ 1 & 0 & 0 & 2 \end{bmatrix} \), find all eigenvalues and eigenvectors, and diagonalize it .

View Solution to Example 4
To find the eigenvalues, we solve the characteristic equation $\det(A - \lambda I) = 0$: $$\det(A - \lambda I) = \det \begin{bmatrix} 2-\lambda & 0 & 0 & 1 \\ 0 & -\lambda & 4 & 0 \\ 0 & 3 & -\lambda & 0 \\ 1 & 0 & 0 & 2-\lambda \end{bmatrix} = 0$$ Using block-matrix determinant properties, this expands to: $$\det(A - \lambda I) = \det \begin{bmatrix} 2-\lambda & 1 \\ 1 & 2-\lambda \end{bmatrix} \cdot \det \begin{bmatrix} -\lambda & 4 \\ 3 & -\lambda \end{bmatrix} = 0$$ $$( (2-\lambda)^2 - 1 ) \cdot (\lambda^2 - 12) = 0$$ $$(1-\lambda)(3-\lambda)(\lambda^2 - 12) = 0$$ Solving this yields the four distinct eigenvalues: $$\lambda_1 = -2\sqrt{3}, \quad \lambda_2 = 1, \quad \lambda_3 = 3, \quad \lambda_4 = 2\sqrt{3}$$ Find Corresponding Eigenvectors By solving $(A - \lambda I)\mathbf{x} = 0$ for each eigenvalue, we find the corresponding eigenvectors:
For $\lambda_1 = -2\sqrt{3}$: $$\mathbf{x}_1 = \begin{bmatrix} 0 \\ -\frac{2}{\sqrt{3}} \\ 1 \\ 0 \end{bmatrix}$$
For $\lambda_2 = 1$: $$\mathbf{x}_2 = \begin{bmatrix} -1 \\ 0 \\ 0 \\ 1 \end{bmatrix}$$
For $\lambda_3 = 3$: $$\mathbf{x}_3 = \begin{bmatrix} 1 \\ 0 \\ 0 \\ 1 \end{bmatrix}$$
For $\lambda_4 = 2\sqrt{3}$: $$\mathbf{x}_4 = \begin{bmatrix} 0 \\ \frac{2}{\sqrt{3}} \\ 1 \\ 0 \end{bmatrix}$$
Diagonalization Matrices ($P$, $D$, and $P^{-1}$)
Matrix $P$ (formed by the eigenvectors as columns): $$P = \begin{bmatrix} 0 & -1 & 1 & 0 \\ -\frac{2}{\sqrt{3}} & 0 & 0 & \frac{2}{\sqrt{3}} \\ 1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 0 \end{bmatrix}$$
Matrix $D$ (diagonal matrix of eigenvalues): $$D = \begin{bmatrix} -2\sqrt{3} & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 3 & 0 \\ 0 & 0 & 0 & 2\sqrt{3} \end{bmatrix}$$
Matrix $P^{-1}$ (inverse of $P$): $$P^{-1} = \begin{bmatrix} 0 & -\frac{\sqrt{3}}{4} & \frac{1}{2} & 0 \\ -\frac{1}{2} & 0 & 0 & \frac{1}{2} \\ \frac{1}{2} & 0 & 0 & \frac{1}{2} \\ 0 & \frac{\sqrt{3}}{4} & \frac{1}{2} & 0 \end{bmatrix}$$
Final Diagonalization Expression $$A = P D P^{-1} = \begin{bmatrix} 0 & -1 & 1 & 0 \\ -\frac{2}{\sqrt{3}} & 0 & 0 & \frac{2}{\sqrt{3}} \\ 1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 0 \end{bmatrix} \begin{bmatrix} -2\sqrt{3} & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 3 & 0 \\ 0 & 0 & 0 & 2\sqrt{3} \end{bmatrix} \begin{bmatrix} 0 & -\frac{\sqrt{3}}{4} & \frac{1}{2} & 0 \\ -\frac{1}{2} & 0 & 0 & \frac{1}{2} \\ \frac{1}{2} & 0 & 0 & \frac{1}{2} \\ 0 & \frac{\sqrt{3}}{4} & \frac{1}{2} & 0 \end{bmatrix}$$

Example 5

Calculate \( A^{10} \) where \( A \) is the matrix from Example 4 .

View Solution to Example 5

Using the property \( A^n = P D^n P^{-1} \), we raise the diagonal matrix entries to the 10th power :

$$ D^{10} = \begin{bmatrix} (-2\sqrt{3})^{10} & 0 & 0 & 0 \\ 0 & 1^{10} & 0 & 0 \\ 0 & 0 & 3^{10} & 0 \\ 0 & 0 & 0 & (2\sqrt{3})^{10} \end{bmatrix} = \begin{bmatrix} 248832 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 59049 & 0 \\ 0 & 0 & 0 & 248832 \end{bmatrix} $$

Multiplying \( P D^{10} P^{-1} \) yields :

$$ A^{10} = \begin{bmatrix} 29525 & 0 & 0 & 29524 \\ 0 & 248832 & 0 & 0 \\ 0 & 0 & 248832 & 0 \\ 29524 & 0 & 0 & 29525 \end{bmatrix} $$

Questions (with Solutions)

Note: These exercises demonstrate that matrix invertibility and matrix diagonalization are independent properties.

  1. Part 1: Show that matrix \( A = \begin{bmatrix} 4 & -1 \\ 1 & 2 \end{bmatrix} \) is invertible but not diagonalizable .

  2. Part 2: Show that matrix \( A = \begin{bmatrix} -1 & -2 \\ 0 & 0 \end{bmatrix} \) is not invertible (singular) but diagonalizable .

  3. Part 3: Show that matrix \( A = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} \) is neither invertible nor diagonalizable .

  4. Part 4: Show that matrix \( A = \begin{bmatrix} -1 & 1 \\ 0 & 1 \end{bmatrix} \) is both invertible and diagonalizable .

View Solutions to Questions

Solution to Part 1:

\( \det(A) = 9 \neq 0 \), so \( A \) is invertible . However, eigenvalue \( \lambda = 3 \) has multiplicity 2 but yields only one independent eigenvector, so it is not diagonalizable .


Solution to Part 2:

\( \det(A) = 0 \), making it not invertible . Its eigenvalues are \( \lambda = -1, 0 \) with two independent eigenvectors, making it diagonalizable with \( A = P D P^{-1} \) :

$$ \begin{bmatrix} 1 & -2 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} -1 & 0 \\ 0 & 0 \end{bmatrix} \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} $$

Solution to Part 3:

\( \det(A) = 0 \) (not invertible) . Eigenvalue \( \lambda = 0 \) has multiplicity 2 with only one independent eigenvector, so it is not diagonalizable .


Solution to Part 4:

\( \det(A) = -1 \neq 0 \) (invertible) . Eigenvalues \( \lambda = -1, 1 \) yield two independent eigenvectors \( \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 2 \end{bmatrix} \), making it diagonalizable :

$$ A = \begin{bmatrix} 1 & 1 \\ 0 & 2 \end{bmatrix} \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & -\frac{1}{2} \\ 0 & \frac{1}{2} \end{bmatrix} $$

More References and Links