**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 for the vector x. Suppose we are interested in solving the matrix equation

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

such that ), then can be transformed to

** **

that can be easily solved for y where . Then x can be determined as .

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
.

**Diagonalization Process**

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

Let A be n x n matrix and let , , . . ., be (possibly complex) scalars and

, , . . ., be nonzero vectors in n-space. Let C be the n x n matrix having

as the jth column vector, and let

Then AC = CD if and only if , , . . ., are eigenvalues of A and is

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

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

**Example 1**
(from Lecture on Section 5.1)

`> `

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

Eigenvalues of A.

`> `
**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]);**

`> `

We have the following relationship.

`> `
**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]);**

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

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]):**

`> `

Compute AC.

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

`> `

Let D be a diagonal matrix of eigenvalues.

`> `
**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]]));**

Notice we have that AC = CD. Also, notice that if exist we have

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

That is, AC = D.

**Example 2:**
Let A be a
*3x3*
matrix:

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

The eigenvalues of matrix A are

`> `
**eigenvals(A);**

`> `

`> `

The corresponding eigenvectors are

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

Construct the matrix whose columns are the eigenvectors and of the matrix A:

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

`> `

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);**

`> `

What if we perform the matrix multiplication: ?

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

`> `

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 = 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 , , . . ., are eigenvectors of A corresponding

to
*distinct *
eigenvalues
* *
,
, . . .,
respectively, the set {
,
, . . .,
} is

linearly independent. Therefore, C=[ , , . . ., ] is invertible and

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]]); **

`> `

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

`> `
**eigenvals(A);**

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

`> `
**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]);**

`> `

__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^`-1`*A*C = multiply(inverse(C),multiply(A,C));**

`> `

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 and 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]]); **

`> `

Is A diagonalizable?

`> `
**eigenvals(A);**

`> `

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

algebraic multiplicity is 2

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

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

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

`> `

`> `

Can we construct a
*3x3*
matrix C such that
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

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. AC = D,then C = .

**Exercises**

1-13 odd.