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}. $$