I would like to solve a matrix equation of the form $$ \mathbf{A} \mathbf{X} + \mathbf{X} \mathbf{A}^T = \mathbf{B} $$

where $\mathbf{A}$ and $\mathbf{B}$ are known $n \times n$ matrices, and $\mathbf{X}$ is an unknown $n \times n$ matrix.

  1. Is there a general way to isolate $\mathbf X$ in this expression?
  2. Is there a solution for various special cases, such as (1) the case where $\mathbf{A}$ and $\mathbf{B}$ are real, or (2) when $\mathbf{B}$ is real and diagonal?

My intuition is that the case where $\mathbf{A}$ and $\mathbf{B}$ are both real may be solved using the SVD of $\mathbf{A}$. Is there at least a way to compute an approximate solution for X using the pseudoinverse?

  • 3
    $\begingroup$ Bartels Stewart algorithm. $\endgroup$ – copper.hat May 26 at 0:44
  • $\begingroup$ incredible, thank you so much---I had not heard of the Sylvester equation but that looks like it's exactly it $\endgroup$ – wil3 May 26 at 0:56
  • 2
    $\begingroup$ As far as isolating $X$ goes, we can write $$ (I \otimes A + A \otimes I)\operatorname{vec}(X) = \operatorname{vec}(B), $$ where $I$ denotes an $n \times n$ matrix, $\otimes$ denotes a Kronecker product, and vec refers to the vectorization operator. $\endgroup$ – Omnomnomnom May 26 at 2:09

The Bartel Stewart algo. works only when the function $f:X\mapsto AX+XA^T$ is one to one.

Let $spectrum(A)=(\lambda_i)_i$. Since $spectrum(f)=\{\lambda_i+\lambda_j;i,j\}$, B.S. works iff for every $i,j$, $\lambda_i+\lambda_j\not= 0$. Note that if the previous condition is not fufilled, then the equation may have no solutions; for example, take


More precisely, for this value of $A$, the equation $AX+XA^T=B$ has no solutions except for rare values ​​of $B$.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.