Diagonalization of a Matrix

Last Updated : 25 Sep, 2026

The process of converting a square matrix into diagonal form using a similarity transformation is called diagonalization. A matrix A is diagonalizable if there exists an invertible matrix P and a diagonal matrix D such that:


Where:

  • D contains the eigenvalues of A along its diagonal.
  • P is the change of basis matrix, whose columns are the corresponding eigenvectors of A.

Diagonalization is useful because diagonal matrices are much easier to work with. For instance, raising a diagonal matrix to a power simply means raising its diagonal entries to that power, and its determinant is just the product of the diagonal entries.

Conditions

  • A matrix is diagonalizable if and only if each eigenvalue’s geometric multiplicity (number of linearly independent eigenvectors) equals its algebraic multiplicity (its multiplicity as a root of the characteristic polynomial).
  • An nƗn matrix over a field F is diagonalizable if it has n linearly independent eigenvectors in F. This is always true if it has n distinct eigenvalues.

Change of Basis

Suppose we have a vector space V of dimension n over a field F.

How do we convert the coordinates of v in basis F into coordinates in the standard basis.

  • The change-of-basis matrix P contains the basis vectors of F expressed in terms of the standard basis.

When we multiply a vector v with the change-of-basis matrix, which is the matrix having basis vectors as columns, we get the coordinates of vector v in the standard basis.

Example: A vector in F-basis is converted to standard basis using the change-of-basis matrix.

F-to-standard

How do we convert the coordinates of v in the standard basis into coordinates in basis F.

  • When we multiply a vector v with the inverse of the change-of-basis matrix, we get the coordinates of vector v in the F basis.

Example: A vector in F-basis is converted to standard basis using the change-of-basis matrix.

standard-to-f

Procedure

The process of diagonalization can be visualized as switching into the eigenbasis, applying a simple scaling transformation, and then switching back to the standard basis. The following steps illustrate this process:


We write a matrix as:

A = PDPāˆ’1

Where:

  • P (Change-of-Basis Matrix):Ā This matrix transforms coordinatesĀ intoĀ the new eigenvector system. Its columns are the eigenvectors ofĀ A.
  • P⁻¹ (Inverse of P):Ā This matrix transforms coordinatesĀ back fromĀ the eigenvector system to the standard system.
  • D (Diagonal Matrix):Ā This is the simple, "core" transformation in the new coordinate system. Its diagonal entries are the eigenvalues ofĀ A.

Steps:

  • Find the eigenvalues (Ī»):Ā Solve det(A - Ī»I) = 0.
  • Find the eigenvectors (v):Ā For each eigenvalue Ī», solve (A - Ī»I)Ā vĀ =Ā 0.
  • Check for diagonalizability:Ā Ensure you foundĀ nĀ linearly independent eigenvectors. (If an eigenvalue with multiplicityĀ mĀ has fewer thanĀ mĀ independent eigenvectors,Ā AĀ is not diagonalizable.)
  • Construct matrix PĀ that has theĀ nĀ eigenvectors as its columns.
  • Construct matrix DĀ is a diagonal matrix with the corresponding eigenvalues on the diagonal.
  • FindĀ P⁻¹.
  • Write the factorization:Ā A = PDP⁻¹

Diagonalizing a 2 Ɨ 2 matrix

A = \begin{bmatrix} 4 & 1\\ 2 & 3 \end{bmatrix}

A = PDPāˆ’1

1. Find the eigenvalues:

det(Aāˆ’Ī»I) = 0

Aāˆ’Ī»I = \begin{bmatrix} 4 - \lambda & 1\\ 2 & 3 - \lambda \end{bmatrix}

det(Aāˆ’Ī»I) = (4 āˆ’ Ī»)(3 āˆ’ Ī») - (1)(2) = Ī»2 āˆ’ 7Ī» + 12 āˆ’ 2 = Ī»2 āˆ’ 7Ī» + 10

Ī»2 āˆ’ 7Ī» + 10 = 0 ⇒ (Ī» āˆ’ 2)(Ī» āˆ’ 5) = 0

Eigenvalues: λ1 = 2, λ2 = 5

2. Find the eigenvectors:

For λ1 = 2,
SolveĀ (Aāˆ’2I)v = 0

A - 2I = \begin{bmatrix} 2 & 1\\ 2 & 1 \end{bmatrix}

2x + y = 0
2x + y = 0

v = \begin{bmatrix} x\\ -2x \end{bmatrix} = x \begin{bmatrix} 1\\ -2 \end{bmatrix}

v1 = \begin{bmatrix} 1\\ -2 \end{bmatrix}

For λ2 = 5,
SolveĀ (A āˆ’ 5I)v = 0

A - 5I = \begin{bmatrix} -1 & 1\\ 2 & -2 \end{bmatrix}

-x + y = 0
2x - 2y = 0

x = y

v = \begin{bmatrix} x\\ x \end{bmatrix} = x \begin{bmatrix} 1\\ 1 \end{bmatrix}

v2 = \begin{bmatrix} 1\\ 1 \end{bmatrix}

3. Constructing P and D:

P matrix: \begin{bmatrix} 1 & 1 \\ -2 & 1 \end{bmatrix}

D matrix: \begin{bmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{bmatrix} = \begin{bmatrix} 2 & 0 \\ 0 & 5 \end{bmatrix}

4. Finding P-1:

P = \begin{bmatrix} 1 & 1 \\ -2 & 1 \end{bmatrix} ⇒ P-1 = \begin{bmatrix} \frac{1}{3} & -\frac{1}{3} \\ \frac{2}{3} & \frac{1}{3} \end{bmatrix}

5. Combining the terms:

PDP-1 = \begin{bmatrix} 1 & 1 \\ -2 & 1 \end{bmatrix} \begin{bmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{bmatrix} = \begin{bmatrix} 2 & 0 \\ 0 & 5 \end{bmatrix} \begin{bmatrix} \frac{1}{3} & -\frac{1}{3} \\ \frac{2}{3} & \frac{1}{3} \end{bmatrix} = \begin{bmatrix} 4 & 1\\ 2 & 3 \end{bmatrix}

Diagonalizing a 3 Ɨ 3 matrix

A = \begin{bmatrix} -1 & 0 & 1\\3 & 0 & -3 \\ 1 & 0 & -1 \end{bmatrix}

A = PDPāˆ’1

1. Find the eigenvalues:

det(Aāˆ’Ī»I) = 0

Aāˆ’Ī»I = \begin{bmatrix} -1 - \lambda & 0 & 1\\ 3 & - \lambda & -3 \\ 1 & 0 & -1-\lambda \end{bmatrix}

det(Aāˆ’Ī»I) = (āˆ’Ī»)ā‹…(1)ā‹…[(āˆ’1āˆ’Ī»)(āˆ’1āˆ’Ī»)āˆ’(1)(1)] = āˆ’Ī»3 - 2Ī»2

āˆ’Ī»3 - 2Ī»2 = 0 ⇒ Ī»2 (Ī» + 2)= 0

Eigenvalues: λ1 = -2, λ2 = 0, λ3 = 0 (Note: λ = 0is an eigenvalue with algebraic multiplicity 2)

2. Find the eigenvectors:

For λ1 = -2,
SolveĀ (Aāˆ’(-2)I)v = 0

A + 2I = \begin{bmatrix} 1 & 0 & 1\\ 3 & 2 & -3 \\ 1 & 0 & 1 \end{bmatrix}

x+z = 0 ⇒ x = āˆ’z

y āˆ’ 3z = 0 ⇒ y = 3z

v = \begin{bmatrix} -z\\ 3z \\ z\end{bmatrix} = z \begin{bmatrix} -1\\ 3 \\ 1\end{bmatrix}

v1 = \begin{bmatrix} -1\\ 3 \\ 1 \end{bmatrix}

For λ2 =  λ3 = 0,
SolveĀ (A āˆ’ 0I)v = 0

A = \begin{bmatrix} -1 & 0 & 1\\3 & 0 & -3 \\ 1 & 0 & -1 \end{bmatrix}

x āˆ’ z = 0 ⇒ x = z

v = \begin{bmatrix} z\\ y \\z \end{bmatrix} = y \begin{bmatrix} 0\\ 1 \\0\end{bmatrix} + z \begin{bmatrix} 1\\ 0 \\1\end{bmatrix}

v2 = \begin{bmatrix} 0\\ 1 \\ 0 \end{bmatrix}

v3 = \begin{bmatrix} 1\\ 0 \\ 1 \end{bmatrix}

3. Constructing P and D:

P matrix: \begin{bmatrix} -1 & 0 & 1 \\ 3 & 1 & 0 \\ 1 & 0 & 1\end{bmatrix}

D matrix: \begin{bmatrix} -2 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0\end{bmatrix}

4. Finding P-1:

P = \begin{bmatrix} -1 & 0 & 1 \\ 3 & 1 & 0 \\ 1 & 0 & 1\end{bmatrix} ⇒ P-1 = \begin{bmatrix} -\frac{1}{2} & 0 & \frac{1}{2} \\ \frac{3}{2} & 1 & -\frac{3}{2} \\ \frac{1}{2} & 0 & \frac{1}{2} \end{bmatrix}

5. Combining the terms:

PDP-1 = \begin{bmatrix} -1 & 0 & 1 \\ 3 & 1 & 0 \\ 1 & 0 & 1\end{bmatrix} \begin{bmatrix} -2 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0\end{bmatrix} \begin{bmatrix} -\frac{1}{2} & 0 & \frac{1}{2} \\ \frac{3}{2} & 1 & -\frac{3}{2} \\ \frac{1}{2} & 0 & \frac{1}{2} \end{bmatrix} = \begin{bmatrix} -1 & 0 & 1\\3 & 0 & -3 \\ 1 & 0 & -1 \end{bmatrix}

Practice Questions

Question 1: Ā Determine if the given matrix is diagonalizable. If it is, find matricesĀ P,Ā D, andĀ Pāˆ’1Ā such thatĀ A = PDPāˆ’1. A = \begin{bmatrix} 5 & -1\\ -1 & 5 \end{bmatrix}.

Question 2: Determine if the given matrix is diagonalizable. If it is, find matricesĀ P,Ā D, andĀ Pāˆ’1Ā such thatĀ A = PDPāˆ’1. A = \begin{bmatrix} 4 & 0\\ 0 & 4 \end{bmatrix}.

Question 3: Determine if the given matrix is diagonalizable. If it is, find matricesĀ P,Ā D, andĀ Pāˆ’1Ā such thatĀ A = PDPāˆ’1. A = \begin{bmatrix} 3 & 1\\ 0 & 3 \end{bmatrix}.

Question 4: Determine if the given matrix is diagonalizable. If it is, find matricesĀ P,Ā D, andĀ Pāˆ’1Ā such thatĀ A = PDPāˆ’1. A = \begin{bmatrix} 1 & 2 & 2\\ 2 & 1 & 2\\2 & 2 & 1 \end{bmatrix}.

Answers:

1. P = \begin{bmatrix} 1 & -1\\ 1 & 1 \end{bmatrix}. D = \begin{bmatrix} 4 & 0\\ 0 & 6 \end{bmatrix}, P -1 =\begin{bmatrix} 1/2 & 1/2\\ -1/2 & 1/2 \end{bmatrix}

2. P = \begin{bmatrix} 1 & 0\\ 0 & 1 \end{bmatrix}. D = \begin{bmatrix} 4 & 0\\ 0 & 4 \end{bmatrix}, P -1 =\begin{bmatrix} 1 & 0\\ 0 & 1\end{bmatrix}

3. The matrix is non-diagonalizable because there is only one linearly independent eigenvectors for 2 x 2 matrix.

4. P = \begin{bmatrix} 1 & 1 & 1\\ 1 & -1 & 0\\ 1 & 0 & -1 \end{bmatrix}. D = \begin{bmatrix} 5 & 0 & 0\\ 0 & -1 & 0 \\ 0 & 0 & -1 \end{bmatrix}, P -1 =\frac{1}{3}\begin{bmatrix} 1 & 2 & 1\\ 1 & -2 & 1 \\ 1 & 1 & -2\end{bmatrix}

Comment

Explore