# Solving a Matrix Equation for a Matrix

I have a transformation that is determined by the multiplication of several matrices: Transformation = $\mathbf{ABC}$.

I need to find such matrix $\mathbf{K}$ to satisfy equation: $\mathbf{ABC} = \mathbf{ACKB}$ .

-
uh... if you have $X = Y Z$ do you know how to find Z ? –  leonbloy Jul 2 '11 at 1:28
How is $A$ relevant to this problem? –  Qiaochu Yuan Jul 2 '11 at 1:33
@leonbloy I don't know X. –  Ivan Jul 6 '11 at 19:34
@Qiaochu Yuan - I agree that A is no relevant, I've just posted the whole transformation. –  Ivan Jul 6 '11 at 19:36
If $C$ and $B$ are invertible, then this is a very simple matter: just take $K=C^{-1}BCB^{-1}$, which trivially works.
What if either $B$ or $C$ are not invertible? Then it may be impossible to find such a $K$, depending on what $A$, $B$, or $C$ are.
For example, consider the case where they are all $2\times 2$ matrices, and $A$ is to the identity, so that you are simply looking for a $K$ such that $BC=CKB$. Let $$B = \left(\begin{array}{cc}1&1\\0&0\end{array}\right),\qquad C=\left(\begin{array}{cc}0&0\\1&1\end{array}\right).$$ Then $BC = B$. But no matrix $K$ can satisfy $CKB=BC$, since $CKB$ will necessarily be of the form $$\left(\begin{array}{cc} 0 & 0\\*&* \end{array}\right)\neq B.$$
So if $A$, $B$, and $C$ are certain specific matrices, or they have specific properties, you need to specify them.