# Homework Help: Linear Algebra - Similar Matrices(finding invertible Q for A~B given A and B)

1. Dec 12, 2008

### SoccerRocker

1. The problem statement, all variables and given/known data
I am having problems with (i)
Also I find my teacher to be very methodical, and lacking in theory. So if you find my reasoning poor or incomplete in any regard PLEASE enlighten me by clarifying. Thanks :D

12. (15 marks)
Let A =
(−1 −8 −2)
( 1 5 1)
( 0 0 1)

(a) Verify that the eigenvalues of A are 1 and 3.
(b) Find E1, the eigenspace for eigenvalue 1.
(c) Find dimE1 and a basis of E1.
(d) Find E3, the eigenspace for eigenvalue 3.
(e) Find dimE3 and a basis of E3.
(f) Determine whether A is diagonalizable. State a brief reason.
(g) If A is diagonalizable, find an invertible matrix P and a diagonal matrix D such that P^(−1)AP = D.
(h) Verify that P^(−1)AP = D is indeed true.
(i) Let B =
(2 1 1)
(1 2 1)
(0 0 1)

Is A~B? If A~B, find an invertible matrix Q such
that B = Q^(−1)AQ.

2. Relevant equations
Not sure, online based course and I find no relavent notes. Here is link: http://fsj.nlc.bc.ca/nlc/hcui/ [Broken]
Math 152, Course Material, Unit 5

3. The attempt at a solution
(a)To verify the eigenvalues, I use (tI-A) to find the characteristic equations. Since |tI-A|, I solve for t and 1 and 3 are the correct Eigenvalues.

(b-e)Then I use Av=1v and Av=3v,
where v=
(x)
(y)
(z)

Thus, (1I-A)v=0 and (3I-A)v=0,
where 0=
(0)
(0)
(0)

By forming a homogeneous matrice and putting it into RREF for (1I-A) I get
(1 4 1|0)
(0 0 0|0) Let y=r, and z=s, where r and s are parameters
(0 0 0|0)

thus E1 =
{(-4r-s) }
{( r ) :r,sE|R }
{( s ) }

and dim E1= 2, basis:
(-4)
( 1)
( 0)

and

(-1)
(0)
(1)

By forming a homogeneous matrice and putting it into RREF for (3I-A) I get
(1 2 0|0)
(0 0 1|0) Let y=t, where r is a parameter
(0 0 0|0)

thus E1 =
{( -2t ) }
{( t ) :r,sE|R }
{( 0 ) }

and dim E1= 1, basis:
(-2)
( 1)
( 0)

SO FAR, so good ;)

(f)A is diagnalizable, as the total number of basis Eigenvecrots is 3, the n dimension R space it is in. (R^3)

(g) P^(−1)AP = D
P=
(-4 -1 -2)
( 1 0 1) from Basis of eigenvector spaces
( 0 1 0)

and

D=
(1 0 0 )
(0 1 0 ) from eigenvalues corresponding to eigenvectors
(0 0 3 )

(h) I find the inverse of P, P^(-1), simply by forming an augmented matrice (p|I) then put p into RREF using row operations yielding (I|P^(-1))

P^(-1) =
(-1/2 -1 -1/2 )
( 0 0 1 )
( 1/2 2 1/2)

and upon verification P^(-1)AP=D ...sweet ^^

Here comes the problem:

(i) First of all, I'm pretty sure my rational for why A~B is complete UNTIL I can find B = Q^(−1)AQ... WHICH I'm finding questionable considering the path of questioning :(.

I know that if A~B they have equivalent determinants(check),characteristic equations(redundant check), and traces(check). HOWEVER that doesn't imply they are similar, does it? Only that it is not simple to dismiss they are similar. F my life ;[.

ANYWAYS assuming that was sufficient reasoning

I tried multiplying both sides by matrice Q yeilding

QB = AQ

(just to make it easier to follow)
Let A =
(−1 −8 −2)
( 1 5 1)
( 0 0 1)
and B =
(2 1 1)
(1 2 1)
(0 0 1)

then labeled Q the arbitrary matrice
(a b c)
(d e f)
(g h i )

multiplied both sides out and compared each entry of each matrice against each other...

After I put myself back together again(and finding out h = -g and few other very vague equations), I searched the net for help. I found a lot of advice telling me to find an invertible Q, but I am, frankly, mystified at how to approach this.

ANYTHING helpful, that you feel like posting on directly solving my problem, or areas that appear vague in my understanding will be appreciated. Please and thanks.

Last edited by a moderator: May 3, 2017
2. Dec 13, 2008

### Dick

You did a great job of diagonalizing A and you got the diagonal matrix D=diag(1,1,3). No, having the same eigenvalues etc doesn't mean they are necessarily similar. You have to look at the eigenvectors. If B has three linearly independent eigenvectors, then you could also diagonalize B and get the same matrix D. So then you've got P^(-1)AP=D=Q^(1-)BQ. See where this is going?

3. Dec 13, 2008

### SoccerRocker

Alright - I'm coming into some difficulties. I understand the logic to find the solution. However, when I try diagnolizing B to get D, by using the eigenvalues I produce the same D(D=diag(1,1,3)). HOWEVER, I tried verifying this by finding the three linearly independent eigenvectors to form Q, and from Q^(-1):

For Eigenvalue 1:
I-B=
(-1-1-1)
(-1-1-1)
( 0 0 0)

Which obviously becomes, in RREF

(111)
(000)
(000)

and since 1I-B=0

the subspace formed by E1 should have a basis of
(-1)
(1)
(0)and

(-1)
(0)
(1)

Then for Eigenvalue 3
3I-B=
(1 -1 -1)
(-1 1 -1)
( 0 0 2)

Which through Row operations becomes in RREF

(1 -1 0)
(0 0 1)
(0 0 0)

and since 3I-B=0

A basis of the subspace formed by E3 should be

(1)
(0)
(1)

Now here's where I encounter the problem:

If I use Q
(-1-1 1)
( 0 1 0 )
( 1 0 1)

form an augmented matrice (Q|I) and use row operations yeilding (I|Q^(-1))

I get Q^(-1)=

(-1/2 -1/2 1/2)
( 0 1 0)
(1/2 1/2 1/2)

Then when I multiply, Q^(-1)BQ=

(-3/2 -3/2 -1/2)(Q) =
( 1 2 1)
( 3/2 3/2 3/2)

(1 0 2)
(0 1 2)
(0 0 3)

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO this is so stressful, if I had pubes they would be grey, or at least thinning ;[.

So I tried it again, but this time switched the order of the E1 eigenvectors giving Q=

(-1 1 0)
(1 0 0)
(0 1 1)

and Q^(-1)=

(0 1 0)
(-1/2 1/2 1/2)
(1/2 -1/2 1/2)

now to verify Q^(-1)BQ = long story short

(1 0 2)
(0 1 0)
(-1 0 3)

*loses ability to colour hairs... everywhere ;[

These matrices are not the same as Daig(1,1,3) are they? I've checked my algebra in all sections over twice now and I see no errors. However, there are three linearly independent EigenVectors for B... thus, according the help I recieved, I should simply be able to form the matrice Q the same way I formed P - by diagnolizing. Logic checks out. Numbers don't ;[.

Does this mean A and B are NOT similar? I don't think so... simply from the help and the way my teachers habit of questioning. Or is it some rookie mistake on my part? Tune in. Let me know :P.

FURTHER, let's assume it DID work. My hairs turns a healthy colour of brown and now we have the equations P^(-1)AP=D
and Q^(-1)BQ=D

Therefore
P^(-1)AP=Q^(-1)BQ(I think this would prove they were similar, please verify)

ok lets say we multiply p by both sides, then both sides by P^(-1)

We get A=PQ^(-1)BQP^(-1)

Then, to simplify A = R^(-1)BR

Where R=P^(-1)Q

and although I could simply find the R^(-1) forming augmented matrice (R|I) then using row operations to yeild (I|R^(-1)). I'm nearly positive R^(-1)=PQ^(-1).

If you could please find out where I went wrong in the diagnolization of B, confirm they are not similar, inform me if the order of the eigenvectors in the matrice to formed to make P/Q matters(I think they should all form true equations, ie. P^(-1)AP=D) or let me know if my logic in finding A = R^(-1)BR is correct. Thank you.

4. Dec 13, 2008

### Dick

The first thing to check is your eigenvectors. I don't think (1,0,1) is an eigenvector with eigenvalue 3.

5. Dec 13, 2008

### SoccerRocker

Are you sure? I checked it again. I'll show my a more exact version of my checks so it can be verified. But (3I-B) =

(1 -1 -1)
(-1 1 -1)
(0 0 2) -->
R2-->R2+R1

(1 -1 -1)
( 0 0 -2)
( 0 0 0) -->
R2-->-1/2R2

(1 -1 -1)
(0 0 1)
(0 0 0) -->
R1-->R1+R2

(1 -1 0)
(0 0 1)
(0 0 0)

In RREF

Since Bv=3v
Therefore (3I-B)v=0 where v=(x,y,z) and 0=(0,0,0) (Actually I've been just been using this theroem if you could explain this to me, or guide to a place to learn the reasonign I would very much appreciate it.

Carrying on (3I-B|0)=
(1 -1 0|0)
(0 0 1|0)
(0 0 0|)

AHH no kidding ^^ let y=r, where r is the parameter, not z :P

So eigenvector for eigenvalue 3 is

(1,1,0)

MANY thanks, should my solution work out properly further?

6. Dec 13, 2008

### SoccerRocker

Also thanks for the swift replies ^^

7. Dec 13, 2008

### Dick

It should work if you have the right eigenvectors, yes. I'm not sure what theorem you are referring to. If (3I-B)v=0 then 3v-Bv=0 and Bv=3v, which is just the definition of an eigenvector with eigenvalue 3. BTW, that's what I meant by 'check' the eigenvalue. Take (1,1,0) and multiply by B and make sure you get (3,3,0).

8. Dec 13, 2008

### SoccerRocker

Thereom was problem the wrong word, but this logic:
Since Bv=3v
Therefore (3I-B)v=0?

Say I subtract Bv from both sides

3v-Bv=0
(3-B)v=0

so why does (3-B)v=(3I-B)v

9. Dec 13, 2008

### Dick

In (3-B)v=0 the '3' had better be a matrix or the expression doesn't make sense. So change 3v to 3Iv where I is the identity matrix. 3v and 3Iv are the same thing.

10. Dec 13, 2008

### SoccerRocker

Perfect, got it, polishing off verifying the full solution now - looks promising. Dick you're the cheese to my macaroni - don't go changing :D