Diagonalization

Determine if the linear transformation f is diagonalizable, in which case find the basis and the diagonal matrix.

f(x, y, z) = (-x+2y+4z; -2x+4y+2z; -4x+2y+7z)

How to solve this problem?

A linear transformation f from a finite vector space is diagonalizable, if there exists a basis B of the vector space such that the matrix of the linear transformation with respect to B is a diagonal matrix. This basis B exists if the sum of all of the dimensions of the eigenspaces of f is equal to the dimension of the vector space. A necessary condition, that can be check before finding the eigenspaces, is that all the roots of the characteristic polynomial belong to R (the field that it is used in this software). The basis B is made up with the basis for the eigenspaces, and the diagonal matrix is made up with the eigenvalues repeated as many times as their multiplicity as root of the characteristic polynomial.

Step 1: Write the matrix of the linear transformation f. Let's call it A.

    ┌          ┐
    │ -1  2  4 │
A = │ -2  4  2 │
    │ -4  2  7 │
    └          ┘
Step 2: Find the characteristic polynomial.

Write the formula of the characteristic equation.

Q(λ)= det(A - λI)

Substitute the matrix into the formula.

           ┌          ┐    ┌         ┐
           │ -1  2  4 │    │ 1  0  0 │
Q(λ)= det( │ -2  4  2 │ - λ│ 0  1  0 │ )
           │ -4  2  7 │    │ 0  0  1 │
           └          ┘    └         ┘

Multiply and subtract.

           ┌                ┐
           │ -1-λ   2    4  │
Q(λ)= det( │  -2   4-λ   2  │ )
           │  -4    2   7-λ │
           └                ┘

Calculate the determinant.

Q(λ) = - λ3 + 10 λ2 - 33 λ + 36

Decompose the polynomial.

Q(λ)= (λ - 3)(λ - 3)(λ - 4)
Step 3: The eigenvalues are the roots of the polynomial.

λ1 = 3
λ2 = 4
Step 4: For each eigenvalue find the null space of the matrix A - λ•I

The expression is equal to the matrix A, minus the eigenvalue times the Identity matrix, which is an homogeneous system of linear equations where the augmented matrix is the following:


┌                     ┐
│ -1-λ   2    4  |  0 │
│  -2   4-λ   2  |  0 │
│  -4    2   7-λ |  0 │
└                     ┘

For λ1 = 3

┌               ┐
│ -4  2  4 |  0 │
│ -2  1  2 |  0 │
│ -4  2  4 |  0 │
└               ┘

Transform the matrix to row echelon form.

r1 <———> r2
┌               ┐
│ -2  1  2 |  0 │
│ -4  2  4 |  0 │
│ -4  2  4 |  0 │
└               ┘
r2 <———> r2 - 2•r1
r3 <———> r3 - 2•r1
┌               ┐
│ -2  1  2 |  0 │
│  0  0  0 |  0 │
│  0  0  0 |  0 │
└               ┘

Translate the row echelon form matrix to the associated system of linear equations, eliminating the null equations.

-2x+y+2z = 0

The resulting equations are the implicit equations of the eigenspace associated to the eigenvalue.

E1 =  {(x, y, z)∈ R3 | -2x+y+2z = 0 }

Find a basis.

Select the free variables.

{ y, z }

Back substitution.

-2x+y+2z = 0
x = (y+2z)/2

Parametric representation.

E1 =  {((y+2z)/2 ; y ; z) | y, z ∈ R }

For each free variable, give the value 1 to that variable and value 0 to the others, obtaining a vector of the eigenspace. The set of vectors obtained is a basis for the eigenspace.

Basis(E1) = {(2  0  2); (1  2  0)}

dim(E1) = 2

For λ2 = 4

┌               ┐
│ -5  2  4 |  0 │
│ -2  0  2 |  0 │
│ -4  2  3 |  0 │
└               ┘

Transform the matrix to row echelon form.

r1 <———> r2
┌               ┐
│ -2  0  2 |  0 │
│ -5  2  4 |  0 │
│ -4  2  3 |  0 │
└               ┘
r2 <———> -2•r2
┌                 ┐
│ -2   0   2 |  0 │
│ 10  -4  -8 |  0 │
│ -4   2   3 |  0 │
└                 ┘
r2 <———> r2 + 5•r1
r3 <———> r3 - 2•r1
┌                 ┐
│ -2   0   2 |  0 │
│  0  -4   2 |  0 │
│  0   2  -1 |  0 │
└                 ┘
r2 <———> r3
┌                 ┐
│ -2   0   2 |  0 │
│  0   2  -1 |  0 │
│  0  -4   2 |  0 │
└                 ┘
r3 <———> r3 + 2•r2
┌                ┐
│ -2  0   2 |  0 │
│  0  2  -1 |  0 │
│  0  0   0 |  0 │
└                ┘

Translate the row echelon form matrix to the associated system of linear equations, eliminating the null equations.

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

The resulting equations are the implicit equations of the eigenspace associated to the eigenvalue.

E2 =  {(x, y, z)∈ R3 | -2x+2z = 0; 2y-z = 0 }

Find a basis.

Select the free variables.

{ z }

Back substitution.

2y-z = 0
y = z/2

-2x+2z = 0
x = 2z/2
x = z

Parametric representation.

E2 =  {(z ; z/2 ; z) | z ∈ R }

For each free variable, give the value 1 to that variable and value 0 to the others, obtaining a vector of the eigenspace. The set of vectors obtained is a basis for the eigenspace.

Basis(E2) = {(2  1  2)}

dim(E2) = 1
Step 5: Final Solution.

The linear transformation is diagonalizable.

The basis B such that the matrix of the linear transformation with respect to B is a diagonal matrix (made up with the eigenspaces bases).

B = {(2  0  2); (1  2  0); (2  1  2)}

The diagonal matrix associated to the linear transformation with respect to the basis B (the diagonal values are the eigenvalues. It must be a correspondence between the position of the eigenvalues in the diagonal matrix and the vectors for the associated eigenspace in the basis matrix).

             ┌         ┐
             │ 3  0  0 │
M[B->B](f) = │ 0  3  0 │
             │ 0  0  4 │
             └         ┘