4

Given real symmetric matrices $A$ and $C$, solve the Sylvester equation

$$ AX + XA = C $$

This equation can be solved using standard algorithms like Bartels–Stewart. However, since it is assumed that matrices $A$ and $C$ (and on $X$) are symmetric, is there any easier way to solve it? Is there a closed-form solution? If not, what would be a fast implementation of the algorithm in terms of number of operations?

T.L
  • 206
  • 1
  • 10
  • Related: https://mathoverflow.net/q/339878/91764 – Rodrigo de Azevedo Mar 30 '20 at 20:39
  • "But since there are additional symmetry hypothesis on $A$ and $C$ (and so on $X$)"... sorry, but $X$ is not necessarily symmetric. E.g. $AX+XA=0$ when $A=\pmatrix{1\ &-1}$ and $X=\pmatrix{0&-1\ 1&0}$. But surely, when the equation is solvable, there always exists a symmetric solution $X$. – user1551 Mar 30 '20 at 20:54

1 Answers1

4

We can assume that $A$ is diagonal, $A=diag((\lambda_i)_i)$ (the complexity of the calculation of the eigen-elements is $\approx 20 n^3$). If $X=[x_{i,j}],C=[c_{i,j}]$, then

$(\lambda_i+\lambda_j)x_{i,j}=c_{i,j}$. Thus, if

  1. $\lambda_i+\lambda_j=0,c_{i,j}\not= 0$ then no solution.

  2. $\lambda_i+\lambda_j=0,c_{i,j}= 0$ then $x_{î,j}$ is arbitrary.

  3. $\lambda_i+\lambda_j\not= 0$ then $x_{i,j}=\dfrac{c_{i,j}}{\lambda_i+\lambda_j}$.

The complexity of the previous calculation is $O(n^2)$.

The set $S$ of solutions (if there are any) is an affine space of dimension $\#\{(i,j);\lambda_i+\lambda_j=0\}$.

Note 1. if there is at least one solution $X_0$, then $X_0^T$ and $(X_0+X_0^T)/2$ are also solutions, that is, there is always at least one symmetric solution.

Note 2. The Bartels–Stewart algorithm works only when $S$ is an empty set, that is, when there is a sole solution.