Skip to content

Diagonalization of matrices ​

Introduction ​

Matrix diagonalization is the process of taking a square matrix and converting it into a special type of matrix - a so-called diagonal matrix - that shares the same fundamental properties of the underlying matrix. The diagonal matrix is a matrix where all the elements are zero except for the elements along the diagonal.

The diagonal matrix is a special case of a triangular matrix, which is a matrix where all the elements above or below the diagonal are zero.

The diagonal matrix is also a special case of a symmetric matrix, which is a matrix where the elements above the diagonal are the same as the elements below the diagonal.

Calculation ​

Let

A∈Kn×n

be a square matrix.

λi - are the eigenvalues of A. vi - are the eigenvectors of A.

The diagonalization of A is calculated using the following steps:

  1. Calculate the eigenvalues of A
  2. Calculate the eigenvectors of A
  3. Calculate the diagonal matrix

Calculation of eigenvalues and eigenvectors is described in Eigenvalues and eigenvectors.

Diagonal matrix ​

The formula for diagonal matrix is:

D=C−1⋅A⋅C

where

C=[v1v2⋯vn]

is the matrix of eigenvectors of A.

C is called similarity matrix.

Resulting diagonal matrix is comprised of eigenvalues of A on the diagonal and zeros elsewhere:

D=[λ10⋯00λ2⋯0⋮⋮⋱⋮00⋯λn]

Example ​

Let

A=[1−1111−12−10]

be a square matrix.

Eigenvalues ​

Characteristic polynomial of A is:

det(A−λI)=0

where λ is the eigenvalue of A.

λI=[λ000λ000λ]det(A−λI)=|1−λ−1111−λ−12−1−λ|=0

Using diagonal rule:

−λ⋅(1−2λ+λ2)−1+2−(1−λ)−(1−λ)−1=0−λ+2λ2−λ3−2+2λ=0−λ3+2λ2+λ−2=0(λ−1)⋅(λ+1)⋅(λ−2)=0

So, the eigenvalues of A are:

λ1=1λ2=−1λ3=2

Eigenvectors ​

Calculate for λ1=1:

(A−λ∗1I)⋅v∗1=0[1−1−1111−1−12−10−1]⋅v1=0[0−1110−12−1−1]⋅v1=0[0−1110−12−1−1]→R3+R1R2+R1[0−111−102−20]→R3−2R2[0−111−10000]{−y+z=0x−y=0 → {z=yx=y → x=y=z

Eigenspace Eλ1 is:

Eλ1=(y⋅[111]| y∈K)dim⁡(E∗λ∗1)=1Eλ1=Span([111])

Therefore

v1=[111]

Calculate for λ2=−1:

(A−λ∗2I)⋅v∗2=0[1−(−1)−1111−(−1)−12−10−(−1)]⋅v2=0[2−1112−12−11]⋅v2=0[2−1112−12−11]→R3−R1R2+R1[2−11310000]{2x−y+z=03x+y=0 → {z=−2x+yy=−3x → {z=−5xy=−3x

Eigenspace Eλ2 is:

Eλ2=(x⋅[1−3−5]| x∈K)dim⁡(E∗λ∗2)=1Eλ2=Span([1−3−5])

Therefore

v2=[1−3−5]

Calculate for λ3=2:

(A−λ∗3I)⋅v∗3=0[1−2−1111−2−12−10−2]⋅v3=0[−1−111−1−12−1−2]⋅v3=0[−1−111−1−12−1−2]→R3+2R1R2+R1[−1−110−200−30]→R3−32R2R2⋅1−2[−1−11010000]{−x−y+z=0y=0 → {z=x+yy=0 → {z=xy=0

Eigenspace Eλ3 is:

Eλ3=(x⋅[101]| x∈K)dim⁡(Eλ3)=1Eλ3=Span([101])

Therefore

v3=[101]

Diagonal matrix ​

Eigenbasis B is:

B=(v1,v2,v3)=([111],[1−3−5],[101])

A is diagonalizable because ∃B∈K3

C=[1111−301−51]

and

C−1⋅A⋅C=D=[1000−10002]