# Symmetric solutions of matrix equation $X-AXB=C$

Consider the matrix equation for unknown matrix $X$

$$X-AXB=C$$

where $A,B,C$ are symmetric $n\times n$ matrices (can be definite, semidefinite, or indefinite). It is well known that a solution $X$ exists if and only if

$$\mbox{rank} (I_{n^2}-A \otimes B^{T}) = \mbox{rank} ([I_{n^2}-A \otimes B^{T},vec(C)])$$

where $I_{n^2}$ is the identity matrix of size $n^2 \times n^2$.

However, my question is whether someone knows of a necessary and sufficient condition for the equation above to have a symmetric solution.

Thanks!

It should be $I-B^T\otimes A$, not $I-A\otimes B^T$. To impose a symmetry condition, just rewrite $X=X^T$ as $(I-K)\operatorname{vec}(X)=0$, where $K$ is the commutation matrix. Now your system of linear equations becomes $$\pmatrix{I-B^T\otimes A\\ I-K}\operatorname{vec}(X)=\pmatrix{\operatorname{vec}(C)\\ 0}$$ and hence a solution exists if and only if $$\operatorname{rank}\pmatrix{I-B^T\otimes A\\ I-K} =\operatorname{rank}\pmatrix{I-B^T\otimes A&\operatorname{vec}(C)\\ I-K&0}.$$
• @ user1551 , if you stack the matrix row by row, then the considered function is $I-A\otimes B^T$. I use this convention. – user91684 Sep 23 '16 at 18:28