# A matrix algebra question

I have the following situation, $$E = A X B + C X D$$ where $A,B,C,D,E$ and $X$ are matrices with proper dimensions. I want to obtain an expression like, $$X = f(A,B,C,D,E)$$ i.e., leave $X$ alone at one side. Is there a way to do this? I am stuck. Thanks in advance!

PS: OK, my situation is more interesting. I have the following situation actually, $$E = A^T X B^T + A X B$$ and try to solve above problem. Thanks!

-
Yes, there is a kind of matrices called "generalized inverses". I mean there are some matrices which are inverses of A just for the left and same for B and the right no matter what their ranges are. I don't know much more about it, sorry I can't be more helpful. –  Adolfo Feb 1 '13 at 19:28
Hi Jason, I added some more information to the question. Yes, there is a special relationship between $A,C$ and $B,D$ in my case. –  Deniz Feb 1 '13 at 19:32

User adamW has already mentioned this. Here $X$ is your variable, say it is of size $N \times N$. So you have $N^2$ variables. Also observe the equations given are linear in terms of the entries of $X$. Now to bring out all of this, you need to use different properities of kronecker product and $vec$ operator. Your system can be expressed as a linear system of equations. The details are

$vec(AXB)=(B^T\otimes A)vec(X)$

$vec(A^TXB^T)=(B\otimes A^T)vec(X)$

$vec(E)=(B^T\otimes A+B\otimes A^T)vec(X)$

Thus $vec(X)=(B^T\otimes A+B\otimes A^T)^{-1}vec(E)$

-
This solution is correct, but somewhat inefficient. Use the Bartel's Stewart algorithm to solve it efficiently. The matrix equation is known as the generalized Sylvester equation. –  Peder Feb 8 '13 at 6:39
thanks for letting me know that :) –  dineshdileep Feb 11 '13 at 8:40

This is a problem of higher dimension than it would at first appear. You may use properties of Kroneker product to transform the equation into an equivalent higher dimension formula involving only left (or right) multiplications, thus giving a solution for $X$. This is how you would solve $E = XB + CX$ at least, have not tried it with the extra conditions you have.

Search Kroneker and/or vectorization. Your equation, if the proper inverses exist, is $$A^{-1}ED^{-1} = XBD^{-1} + A^{-1}CX$$

This is indeed solved with the Kroneker product.

-
Thanks Adam! Do my additional conditions make any difference? –  Deniz Feb 1 '13 at 19:37
oh i saw your answer just now!! –  dineshdileep Feb 1 '13 at 19:43
@dineshdileep Thanks too, I was looking for the specific details to give. –  adam W Feb 1 '13 at 19:44