# How to rewrite matrix formula for Diagonalizable matrix $A=PDP^{-1}$

I am working on an old exam containing a question about Diagonalizable matrix, I am quite confident about the subject overall but there is one simple thing that bothers me, a lot!

We are given the formula $$A=PDP^{-1}$$ I know from my memory that this can be rewritten as $$D=P^{-1}AP$$ to solve for D, but I cannot find out how to do it. I have watched a few examples on Wikipedia and in some PDF file that hinted me in the correct direction.

What I believe, For example:

$$A=PD$$ can be rewritten as $$AP^{-1}=D$$ if this was regular variables, but they are not, they are matrices, and with matrices, you can only put the "latest" number in front of the equation like this:

$$A=PD$$ can be rewritten as $$P^{-1}A=P^{-1}PD=D$$ this works fine but with the formula $$A=PDP^{-1}$$ I get stuck in an infinite loop of moving things in front of the equation and everything becomes a mess. There is clearly something easy I have missed out. Here are my calculations:

$$A=PDP^{-1}$$

$$P^{-1}A=P^{-1}PDP^{-1}$$

$$P^{-1}A=DP^{-1}$$

Now I want to get rid of $$P^{-1}$$ from the right-hand side but since I can only but things in front of D, everything gets messy and I get stuck in a never-ending loop of making things more complicated and adding $$PP^{-1}=I$$ to the equation hoping it would help but it doesn't :(

• Right-multiply the equation $P^{-1}A=DP^{-1}$ by $P$,$$P^{-1}AP=DP^{-1}P=D$$Since matrix products don't commute in general, you can either pre-multiply or left-multiply a matrix $X$ with another matrix $Y$, as in $XY$, or you can do post-multiplication or right-multiplication, as in $YX$. – Shubham Johri Jan 10 at 10:02
• So you actually are looking for $P$ which will transform $A$ into a diagonal form, right? – denklo Jan 10 at 10:07
• @denklo Looking for D, but exact values are not needed, I know how to do that, I do not know how to rewrite matrix equations – J. Doe Jan 10 at 10:10
• @ShubhamJohri Okay so the trick is that I can multiply in front as I have done, or at the end of the equation? – J. Doe Jan 10 at 10:11
• That's correct, @J.Doe. – Shubham Johri Jan 10 at 10:13

You just have to take into account that matrix multiplication is not commutative.

So from $$A=PDP^{-1}$$, just multiply with $$P^{-1}$$ on the left, and with $$P$$ on the right. As matrix multiplication is associative, you obtain $$P^{-1}AP=P^{-1}(PDP^{-1})P=(P^{-1}P)D(P^{-1}P)=D.$$

I know from my memory that this can be rewritten as $$D=P^{-1}AP$$ to solve for D, but I cannot find out how to do it.

We start with the identity $$A=PDP^{-1}$$.

Begin by multiplying both sides on the left by $$P^{-1}$$ and then on the right by $$P$$, then make use of the properties that

• For any invertible matrix $$A$$, $$AA^{-1} = A^{-1}A = I$$.
• For all square matrices $$A$$, we have $$AI=IA=A$$.
• Matrix multiplication is associative, i.e. $$ABC = (AB)C = A(BC)$$, where the multiplicative is assumed to be defined for the matrices $$A,B,C$$.

So, we obtain,

\begin{align} A=PDP^{-1} &\iff P^{-1}AP=P^{-1}PDP^{-1}P \\ &\iff P^{-1}AP=(P^{-1}P)D(P^{-1}P) = IDI = D \end{align}

Thus,

$$P^{-1}AP = D$$

• Nice thing about this result is that it's not exclusive to matrices at all. As invertible matrices form a Abelian Group over addition and Group over multiplication we see this results holds for all structures that have those properties! – DavidG Jan 12 at 9:19