# If $A,B,C$ are all $n\times n$ matrices where $AB=CA$ and $A$ is invertible, then $B=C$

Question:

Prove the following: If $A,B,C$ are all $n \times n$ matrices where $AB=CA$ and $A$ is invertible, then $B=C$

Here is my attempt at the solution, but I'm stuck

Let $D$ be the $n \times n$ inverse matrix of $A$, then $AD = I = DA$. Then,

$B = (I)B = (DA)B= D(AB) = A(CA)$

After that, I'm stuck. What should I do next?

• The claim is not true in general. – Peter Mar 14 '18 at 18:02
• Your last step should be $A^{-1}CA$ – Nick Mar 14 '18 at 18:04
• @Peter The questions is a prove or disprove, is there a counter example to disprove this? – Mark Dodds Mar 14 '18 at 18:05
• A hint at coming up with a counterexample. Pick $A$ and $C$ to be invertible matrices. Then let $B=A^{-1}CA$. – JMoravitz Mar 14 '18 at 18:05
• @Nobody it is true in more cases than that. So long as $A$ commutes with both $B$ and $C$. – JMoravitz Mar 14 '18 at 18:10

$$\left(\matrix{0&1\\1&0}\right)\left(\matrix{a&b\\c&d}\right)=\left(\matrix{d&c\\b&a}\right)\left(\matrix{0&1\\1&0}\right)$$
where $\left(\matrix{0&1\\1&0}\right)$ is invertible, is valid for any $a$, $b$, $c$, $d$.
What is true is that if $AB=CA=\operatorname{Id}_n$, then $B=C$ (the left inverse is the right inverse).