I have the following computational problem. Let $N$ be a positive integer and $A\in \mathbb{C}^{2N\times 2N}$, $X\in \mathbb{C}^{2N\times 4}$ and $B\in \mathbb{C}^{4\times 4}$. I want to solve the following equation for the matrix $X$ $$ A\cdot X= X\cdot B. $$ I found the following paper online (http://www.jstor.org/stable/2099652) but I haven't been able to implement it in Maple or Magma and I don't know what I should be looking for. Does someone know if it is implemented somewhere already?
Solving a matrix equation $AX=XB$ in a CAS
2
$\begingroup$
matrices
computer-algebra-systems
-
0Looks kinda like a Sylvester equation. SylvesterSolve in Maple. – 2011-05-18
1 Answers
3
This is a Sylvester equation, $AX-XB = 0$. This can be solved in Maple by SylvesterSolve and in Matlab by lyap and in Mathematica by LyapunovSolve.
In general, you can get $X$ in a vectorized form by solving $$((I_4 \otimes A) - (B^T \otimes I_{2n})) \operatorname{vec} X = 0$$ for example by Gaussian elimination. $\otimes$ is the Kronecker product and $\operatorname{vec} X$ is the columns of $X$ put on top of each other in a vector.
-
0Hello @Calle I have a question with respect to this, how should be the solution if i have to solve $AXH+AXH-BH=0$?, in my case all matrices are square and A,B,H are constant matrices, as well I need X matrix. – 2013-10-10
-
0Hello Gina, I have given an answer to the question you asked at http://math.stackexchange.com/questions/521306/how-to-solve-matrix-equation-axhahxbh-0 . – 2013-10-14