Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider the following linear equation

$A X + X B = C$

where $A$, $B$, $C$, are known real $n \times n$ square matrices, and where $X$ is an unknown real $n \times n$ square matrix. I want to have an analytical expression for the matrix $X$ that solves the above linear problem.

share|cite|improve this question
What you have there is a Sylvester equation. – J. M. Sep 9 '11 at 13:30
Which you can solve in Matlab via X = lyap(A,B,C) – user13838 Sep 9 '11 at 13:34
But should you need to write your own solver: see this and this. – J. M. Sep 9 '11 at 13:43
@ J.M.: thank you for the references. I was looking for a analytical solution, but from what I see that does exist in simple form (not at least one where X is not reshaped in vector form). – Marco Lombardi Sep 9 '11 at 14:41
Yeah, you'll need the Kronecker product and the $\mathrm{vec}$ operator for an "analytical solution". – J. M. Sep 9 '11 at 16:04

What I have in a course of mine is a formula for the solution of the problem $AX-XB=C$ with $\sigma(A)\cap \sigma(B)=\emptyset$ and $A,B,C$ operators on the same Banach space. $R(\lambda;A)=(A-\lambda I)^{-1}$, etc.

The solution has the formula

$$X=-\frac{1}{4\pi^2} \int_{\Gamma_1} \int_{\Gamma_2}\frac{R(\lambda;A)CR(\mu;B)}{\lambda-\mu}d\mu d\lambda $$

Where $\Gamma_1,\Gamma_2$ are contours which contain $\sigma(A),\sigma(B)$, respectively.

I remember checking this once using functional calculus, but I don't know if I can still do it now. :)

share|cite|improve this answer
This looks interesting, I would like to read more about this. Do you have any reference suggestions? – Calle Sep 9 '11 at 19:18
You can find more details in Dunford, Schwarz, Linear operators Part I, starting from page 566. – Beni Bogosel Sep 9 '11 at 19:30

I knew there was this article. This can be an alternative way that you want. Still don't know why you don't prefer the mainstream method, but you can give it a shot.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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