# Homework Help: Matrix similarity transformation

1. May 20, 2012

### sharks

1. The problem statement, all variables and given/known data
For a 3x3 matrix A, i know the eigenvalues and their corresponding 3 eigenvectors.

Define a matrix P such that $PAP^{-1}$ is a diagonal matrix.

2. Relevant equations
Similarity transformation formula: $D=P^{-1}AP$ where D is the diagonal matrix containing the eigenvalues as its trace elements.

3. The attempt at a solution
The 3 eigenvectors form a 3x3 matrix P.
The problem is that i've learned the formula to be: $D=P^{-1}AP$
But what is being asked here is: $PAP^{-1}$

I've re-arranged the matrix, $D=P^{-1}AP$, into: $PDP^{-1}=IAI$ which gives $PDP^{-1}=A$ but i have no idea what to do next.

2. May 20, 2012

### Karamata

Well, you can transponse left and right sides of $D=P^{-1}AP$, notice that $D = D^T$

3. May 20, 2012

### sharks

Hi Karamata
I don't understand what you mean.
$$D^T=PAP^{-1}?$$What would P be then?

4. May 20, 2012

### spamiam

If you have $D = P^{-1} A P$, then let $Q = P^{-1}$. Do you see why this gives you the result you want?

5. May 20, 2012

### sharks

If $Q = P^{-1}$ then does $Q^{-1} = P$? If yes, then $D=QAQ^{-1}$? Is there any proof for it? I'm not convinced. In that case, what would be the matrix Q?

6. May 20, 2012

### spamiam

Proving $(Q^{-1})^{-1} = Q$ is easy. What's the definition of the inverse of a matrix?

Well Q would be the inverse of the matrix P! :P Seriously though, if you have $D = P^{-1} A P$ or equivalently $PD = AP$ then what must the columns of P be? Think about eigenvectors.

7. May 20, 2012

### sharks

OK, i think i understand the idea here.

Let $Q = P^{-1}$, then $Q^{-1} = P$ and the problem changes to $D=Q^{-1}AQ$, which corresponds to the standard form for the diagonal, D. Here, Q is the matrix of all 3 eigenvectors, and D is the diagonal matrix with the eigenvalues as its trace elements. Now, i need to find P, where $P=Q^{-1}$. Is there an easier way to find $Q^{-1}$ other than finding the adjoint matrix of Q and its determinant?

Instead of using this formula to find $Q^{-1}$: $\frac{1}{|Q|}adj(Q)$

I'm thinking it might be easier to derive it from: $D=Q^{-1}AQ$ but i have no idea how.

Last edited: May 20, 2012
8. May 20, 2012

### spamiam

Don't you mean $D = Q A Q^{-1}$?
Right, except I think $Q^{-1}$ would be the matrix whose columns are the eigenvectors of A. Try writing out what PD = AP tells you in terms of the columns of P:
$$PD = \begin{pmatrix} | & | & | \\ P_1 & P_2 & P_3 \\ | & | & | \end{pmatrix} \begin{pmatrix} \lambda_1 & 0 & 0 \\ 0 & \lambda_2 & 0 \\ 0 & 0 & \lambda_3 \end{pmatrix}= \cdots$$
$$AP = A \begin{pmatrix} | & | & | \\ P_1 & P_2 & P_3 \\ | & | & | \end{pmatrix} = \cdots$$

9. May 20, 2012

### sharks

I think you misunderstood the problem:
So, $D=Q^{-1}AQ$ and Q is the matrix of eigenvectors of A.

10. May 20, 2012

### spamiam

Since you already know the eigenvalues and eigenvectors, just put them in a matrix and invert it using whatever method you prefer. You can use Cramer's rule, the equation for which you've listed below, or write the augemented matrix P|I and then row-reduce the left-hand side to the identity.

I don't see any shortcut using the equation $D = Q A Q^{-1}$. Certainly you know what $Q^{-1}$ must be, but I think you just have to calculate its inverse as usual.

Edit: I think we're confusing each other about what P is and what Q is. I took P to be as in the similarity formula you listed in the OP, $D = P^{-1} A P$, which would then make $Q = P^{-1}$ the solution you're looking for.

11. May 20, 2012

### sharks

I know. So, if i find $Q^{-1}$ then i'll know the required matrix P. According to my calculations:
$$Q^{-1}= \begin{bmatrix}-1 & 0 & -2 \\ 1 & 1 & 3 \\ -1 & -1 & -2\end{bmatrix}$$
I tested the answer and got $QQ^{-1}=I$

Thanks for the help.

12. May 20, 2012

### spamiam

Great! And just to make sure, you might want to calculate $P A P^{-1}$ and verify that you get the diagonal matrix D. And if it doesn't give you D, then I've succeeded in confusing you and you should see if $P^{-1} A P$ works! :tongue: