TITLE: What is the correct order when multiplying both sides of an equation by matrix inverses?
QUESTION [17 upvotes]: So my questions is let's say you were asked to solve for $A$, and you have something like this:
$$BAC=D$$ where B, C , and D are matrices. So the way I would solve this would be to multiply both sides by $B^{-1}$ and $C^{-1}$ (inverse of B and C), but since the order in the multiplication matters $A = DB^{-1}C^{-1}$ would be different than say $A = B^{-1}DC^{-1}$. My question (maybe stupid or I am just missing something) is how do you know which order is the correct one?

REPLY [19 votes]: You must be sure to multiply on the correct side. To get rid of the $B$ in $BAC$, you must multiply on the left by $B^{-1}$, so you must do the same on the righthand side of the equation:
$$AC=B^{-1}BAC=B^{-1}D\;.$$
To get rid of the $C$ in $AC$, you must multiply $AC$ on the right by $C^{-1}$, so you must do the same thing on the other side of the equation:
$$A=ACC^{-1}=B^{-1}DC^{-1}\;.$$

REPLY [3 votes]: You have to multiply $C^{-1}$ from the right ( on both sides) and $B^{-1}$ from the left ( on both sides). Which one you do first doesn't matter.

REPLY [2 votes]: To get from $BAC = D$, you left-multiply both sides by $B^{-1}$ and right-multiply both sides by $C^{-1}$, giving $B^{-1}BACC^{-1} = B^{-1}DC^{-1}$. Since $B^{-1}B = I$ and $CC^{-1} = I$, this simplifies to $A = B^{-1}DC^{-1}$.