How do I find a matrix P, where there is a matrix A, such that P^(-1)AP is diagonal??

Printable View

- October 8th 2006, 07:51 PMkgprettyhow do i..
How do I find a matrix P, where there is a matrix A, such that P^(-1)AP is diagonal??

- October 8th 2006, 10:12 PMCaptainBlack
- October 9th 2006, 04:29 AMkgpretty
- October 9th 2006, 05:08 AMkgpretty
Another question asks, for a matrix A, show that it satisfies it's characteristic equation.

Looking at the example on Wikipedia, would the characteristic equation be (Y - 3)(Y - 2)(Y - 1)?

If it is, how do I complete the above question? - October 9th 2006, 05:42 AMCaptainBlack
The charateristic equation is:

det(A-lambda I) = 0

(as a polynomial in lambda). Now as 3, 2, 1 are the roots of this equation

we know that if we expand the above expression we will have:

(lambda-3)(lambda-2)(lambda-1)=0

for the charateristic equation, and as A should satisfy this we should find

that:

(A-3)(A-2)(A-1)=0

where there is an impicit multiplication of the 3, 2, 1 and 0 by I.

This expands to:

(A-3)(A-2)(A-1) = (A-3)(A^2 - 3A +2) = A^3 - 6A^2 + 11A -6

The powers of A are simply A^2=AA, A^3=A(AA), and the 6 is short hand

for 6 I.

RonKL - October 9th 2006, 06:08 AMkgpretty
Does the question stop at A^3 - 6A^2 + 11A -6

Or do I have to break down the above equation even further. Like find A^3, 6A^2 and so on, then do the addition and substraction?? - October 9th 2006, 08:10 AMCaptainBlack
I'm a bit confused by what you need to show. With a particular matrix you

can compute the powers and substitute them into the equation and show

that the matrix satisfies it.

For a general matrix you could show this is in general true.

If D is the diagonal matrix then as each element on the diagonal is an eigen

value of A, we have tivialy that D satisfies the charateristic equation.

Also as P D P^-1 = A, and P D^2 P^-1 = P D P^-1 P D P^-1 = A^2,

and so on for higher powers, so P D^n P^-1 = A^n and we have:

if

sum_{r=0,n} a_r x^r = 0

is a polynomial satisfied by D, then it is also satisfied by A, since:

P sum_{r=0,n} a_r D^r P^-1 = sum_{r=0,n} a_r P D^r P^-1

..................=sum_{r=0,n} a_r A^r = 0.

RonL - October 10th 2006, 04:31 PMkgpretty
Ok, I think I get it. Thankyou.

However I have a question for which I am completely stumped.

First, it asked you to find the eigenvectors and eigenvalues for matrix A.

Code:`Matrix A:`

|1 3|

|2 6|

Here's what I did:

|1 3|

|2 6|x = Yx

|1 3|

|2 6|x - Yx = 0

|1-Y 3 |

| 2 6 - Y|x = 0

.:

(1 - Y)(6 - Y) - 6 = 0

6 + Y^2 - 6Y - 1Y - 6 = 0

Y^2 - 7Y + 0 = 0

(Y + 0)(Y - 7) = 0

When Y = 0

|1 3| |x1|

|2 6| |x2| = 0

Since

|1 3| | 3|

|2 6| |-1| = 0

| 3|

|-1| is an eigenvector corresponding to the eigenvalue 0.

When Y = 7

|1-7 3|

|2 6-7|x = 0

|-6 3| |x1|

| 2 -1| |x2| = 0

Since

|-6 3| |1|

| 2 -1| |2| = 0

|1|

|2| is an eigenvector corresponding to the

eigenvalue 7.

Good, so I got the eigenvalues and vectors.

The question then asked to find P for which

P^-1AP is a diagonal matrix.

P = |3 1|

|-1 2|

P-1 = |3 1|

|-1 2|

= | 3 1|1 0|

|-1 2|0 1|

= |1 0|2 -1|

|0 1|1 3|

= |2 -1|

|1 3|

.:

P^-1AP = |2 -1| |1 3| | 3 1|

|1 3| |2 6| |-1 2|

= |0 0| |3 1|

|7 21| |-1 2|

- October 10th 2006, 08:10 PMCaptainBlack
- October 11th 2006, 06:42 AMkgpretty
- October 11th 2006, 07:52 AMCaptainBlack
some sort of brain fade has occured, I must have inverted the wrong matrix

(this must be the case as I multiplied what I inverted by this "inverse" and

got the identity matrix)

Checking this, the real inverse is

P^-1= [2/7 -1/7]

.........[1/7...3/7]

obtained by Gaussian elimination with multiple right hand sides.

There are many ways of inverting a 2x2 matrix, there is Gaussian elimination,

Cramers rule, inspection, ..

Code:

Demo of Gaussian elimination

----------------------------

Initial set-up:

3 1 | 1 0

-1 2 | 0 1

multiply the second row by 3 and add the first:

3 1 | 1 0

0 7 | 1 3

multiply the first row by 7 and subtract the second:

21 0 | 6 -3

0 7 | 1 3

Divide the first row through by 21, and the second by 7:

1 0 | 2/7 -1/7

0 1 | 1/7 3/7

So the inverse the the matrix:

[2/7 -1/7]

[1/7 3/7]

Check:

> p=[3,1;-1,2]

3 1

-1 2

>ip=[2/7,-1/7;1/7,3/7]

0.285714 -0.142857

0.142857 0.428571

>

>

>ip.p

1 0

0 1

>

- October 11th 2006, 07:06 PMkgpretty