Section 5.2

Diagonalization

>

>

>

Introduction

If D is a given nxn diagonal matrix and b is an nx1 matrix, then it is easy to solve the matrix

equation D*x = b for the vector x. Suppose we are interested in solving the matrix equation

Ax = b . If matrix A is similar to a diagonal matrix D (that is, there is a nonsingular matrix P

such that P^`-1`*A*P = D ), then Ax = b can be transformed to

D*y = P^`-1`*b

that can be easily solved for y where y = P^`-1`*x . Then x can be determined as x = P*y .

Thus, we are interested in the question

when is a given nxn matrix A similar to a diagonal matrix?

Def: An n x n matrix A is similar to an n x n matrix D if there exists an invertible n x n matrix

P such that P^`-1`*A*P = D .

Diagonalization Process

****************************************************************

Let A be n x n matrix and let lambda[1] , lambda[2] , . . ., lambda[n] be (possibly complex) scalars and

v[1] , v[2] , . . ., v[n] be nonzero vectors in n-space. Let C be the n x n matrix having

v[j] as the jth column vector, and let

D = matrix([[lambda[1], 0, 0, 0, 0], [0, lambda[2],...

Then AC = CD if and only if lambda[1] , lambda[2] , . . ., lambda[n] are eigenvalues of A and v[j] is

an eigenvector of A corresponding to lambda[j] for j=1,2, . . .n.

******************************************************************

Example 1 (from Lecture on Section 5.1)

>

> A:=matrix([[1,1,1],[0,2,1],[0,0,3]]);

A := matrix([[1, 1, 1], [0, 2, 1], [0, 0, 3]])

Eigenvalues of A.

> lambda[1] = 1, lambda[2] = 2, lambda[3] = 3;

lambda[1] = 1, lambda[2] = 2, lambda[3] = 3

> v[1] := matrix(3,1,[1,0,0]):

> v[2] := matrix(3,1,[1,1,0]):

> v[3] := matrix(3,1,[1,1,1]):

Eigenvectors of A.

> v[1] = evalm(v[1]),v[2]=evalm(v[2]),v[3]=evalm(v[3]);

v[1] = matrix([[1], [0], [0]]), v[2] = matrix([[1],...

>

We have the following relationship.

> Av[1] = lambda[1]*v[1]; Av[2]=lambda[2]*v[2]; Av[3]=lambda[3]*v[3];

Av[1] = lambda[1]*v[1]

Av[2] = lambda[2]*v[2]

Av[3] = lambda[3]*v[3]

Multiply A by each eigenvector.

> Av[1] = multiply(A,v[1]), Av[2] = multiply(A,v[2]), Av[3] = multiply(A,v[3]);

Av[1] = matrix([[1], [0], [0]]), Av[2] = matrix([[2...

> lambda[1]*v[1] = multiply(A,v[1]), lambda[2]*v[2] = multiply(A,v[2]), lambda[3]*v[3] = multiply(A,v[3]);

lambda[1]*v[1] = matrix([[1], [0], [0]]), lambda[2]...

Let C be the matrix of eigenvectors.

> `C = `(v[1],v[2],v[3]) = augment(v[1],v[2],v[3]);C:=augment(v[1],v[2],v[3]):

`C = `(v[1],v[2],v[3]) = matrix([[1, 1, 1], [0, 1, ...

>

Compute AC.

> `AC` = multiply(A,C);

AC = matrix([[1, 2, 3], [0, 2, 3], [0, 0, 3]])

>

Let D be a diagonal matrix of eigenvalues.

> D = matrix([[1,0,0],[0,2,0],[0,0,3]]);

D = matrix([[1, 0, 0], [0, 2, 0], [0, 0, 3]])

Compute CD.

> C*D = multiply(C,matrix([[1,0,0],[0,2,0],[0,0,3]]));

C*D = matrix([[1, 2, 3], [0, 2, 3], [0, 0, 3]])

Notice we have that AC = CD. Also, notice that if C^`-1` exist we have

> C^`-1`*A*C = multiply(inverse(C),multiply(A,C));

C^`-1`*A*C = matrix([[1, 0, 0], [0, 2, 0], [0, 0, 3...

That is, C^`-1` AC = D.

Example 2: Let A be a 3x3 matrix:

> A:=matrix([[0,1,-1],[1,0,1],[1,-1,-4]]);

A := matrix([[0, 1, -1], [1, 0, 1], [1, -1, -4]])

The eigenvalues of matrix A are

> eigenvals(A);

1, -2, -3

>

>

The corresponding eigenvectors are

> v1:=vector([1,1,0]); v2:=vector([1,-1,1]);
v3:=vector([1,-1,2]);

v1 := vector([1, 1, 0])

v2 := vector([1, -1, 1])

v3 := vector([1, -1, 2])

Construct the matrix whose columns are the eigenvectors v[1], v[2] and v[3] of the matrix A:

> C:=augment(v1,v2,v3);

C := matrix([[1, 1, 1], [1, -1, -1], [0, 1, 2]])

>

Since the 3x3 matrix A has three independent eigenvectors, we can construct the matrix C whose

columns are the eigenvectors.

Is C a nonsingular matrix?

> det(C);

-2

>

What if we perform the matrix multiplication: C^`-1`*A*C ?

> C^(`-1`)*A*C = multiply(inverse(C),multiply(A,C));

C^`-1`*A*C = matrix([[1, 0, 0], [0, -2, 0], [0, 0, ...

>

In this case the matrix A is similar to a diagonal matrix. This process is referred to as the diagonalization process.

*************************************************************************

An n x n matrix A is diagonalizable if there exists an invertible matrix C such that C^`-1`*A*C = D,

a diagonal matrix. The matrix C is said to diagonalize the matrix A.

**************************************************************************

Conditions for Diagonalization

*************************************************************

Let A be an n x n matrix. If v[1] , v[2] , . . ., v[n] are eigenvectors of A corresponding

to distinct eigenvalues lambda[1] , lambda[2] , . . ., lambda[n] respectively, the set { v[1] , v[2] , . . ., v[n] } is

linearly independent. Therefore, C=[ v[1] , v[2] , . . ., v[n] ] is invertible and

C^`-1` AC = D, where D is a diagonal matrix of eigenvalues.

**************************************************************

Can we still diagonalize a matrix A if the eigenvalues are not distinct?

Example 3 Consider the matrix A

> A:=matrix([[3,-1,-2],[2,0,-2],[2,-1,-1]]);

A := matrix([[3, -1, -2], [2, 0, -2], [2, -1, -1]])...

>

Is matrix A dagonalizable? First, how many distinct eigenvalues A has?

> eigenvals(A);

0, 1, 1

In this example, the eigenvector corresponding to the eigenvalue 0 is

> v[1]:=vector([1,1,1]);

v[1] := vector([1, 1, 1])

The eigenvectors corresponding to eigenvalue 1 are

> v[2]:=vector([1,2,0]); v[3]:=vector([0,-2,1]);

v[2] := vector([1, 2, 0])

v[3] := vector([0, -2, 1])

>

Is A diagonalizable ?

> `C = `(v[1],v[2],v[3]) = augment(v[1],v[2],v[3]); C:=augment(v[1],v[2],v[3]):

`C = `(v[1],v[2],v[3]) = matrix([[1, 1, 0], [1, 2, ...

>

> C^`-1`*A*C = multiply(inverse(C),multiply(A,C));

C^`-1`*A*C = matrix([[0, 0, 0], [0, 1, 0], [0, 0, 1...

>

Although there are only two distinct eigenvalues , there are three distinct independent eigenvectors .

Eigenvalue 1 repeats twice and we say its algebraic multiplicity is 2. Since there are two

eigenvectors associated with this eigenvalue, we say its geometric multiplicity is also 2.

Thus we can construct the matrix whose columns are eigenvectors v[1], v[2] and v[3] of matrix

A .

In this example, matrix A is similar to a diagonal matrix.

********************************************************************

What if the algebraic multiplicity of an eigenvalue is not equal to its geometric multiplicity?

Can we still diagonalize a matrix A?

Example 4 Let A be a 3x3 matrix

> A:=matrix([[1,0,0],[0,2,0],[3,0,1]]);

A := matrix([[1, 0, 0], [0, 2, 0], [3, 0, 1]])

>

Is A diagonalizable?

> eigenvals(A);

1, 1, 2

>

There are only two independent eigenvectors, one eigenvector for eigenvalue 1 whose

algebraic multiplicity is 2

> v1:=vector([0,0,1]);

v1 := vector([0, 0, 1])

and one eigenvector corresponding to the eigenvalue 2 whose algebraic multiplicity is 1.

> v2:=vector([0,1,0]);

v2 := vector([0, 1, 0])

>

>

Can we construct a 3x3 matrix C such that C^`-1`*A*C is a diagonal matrix ? To do so, we

need three independent eigenvectors to form the columns of the matrix C. We have only two!

In this example, the matrix A is not diagonalizable. Matrix A is referred to as a defective matrix !

*************************************************************************

An nxn matrix A is diagonalizable if there exists a nonsingular matrix C such that the product

C^`-1`*A*C is a diagonal matrix.

The algebraic multiplicity of an eigenvalue is the number of times the root of the characteristic

polynomial repeats; while its geometric multiplicity is the dimension of the eigenspace associated

with that eigenvalue.

Let A be an nxn matrix. If A has n distinct eigenvalues, then A has n linearly independent and

A is diagonalizable. The eigenvectors are the columns of the diagonalizing matrix C. The

matrix C is unique up to the order of its columns.

Let A be an nxn matrix. A is diagonalizable if and only if A has n independent eigenvectors.

************************************************************************

If A is diagonalizable, i.e. C^`-1` AC = D,then C^`-1` A^k C = D^k .

Exercises

1-13 odd.