All matrices are real and $n \times n$. The matrix $A$ is given. I am interested in solving $XA=XAX$. In particular, I would like some characterization of matrices that satisfy this equation.
For instance, a useful characterization would be: any valid $X$ is related in some concrete way to the row space of $A$, or any valid $X$ is related in some way to the eigenvectors of $A$. I want to describe the set of admissible $X$es in terms of some known decomposition of $A$ or some property of $A$.
In case this leads to a larger set of admissible solutions, I am also interested, as a separate problem, in the complex relaxation, i.e. $A$ is real but $X$ can be complex.
I apologize if my question is very trivial - I have no experience solving matrix equations like that. In case my question is a special case of some long-established theory, please just point me to a book or an article.
For invertible solutions $X$ this is a special case of the Sylvester equation, i.e. $AX=A$, where the solutions are well known. The general case is part of the Riccati equation (with $B=-A$, $C=D=0$) $$ XAX + XB + CX + D = 0. $$ There are several references on the Riccati equation, see for example the book of Peter Lancaster; Leiba Rodman (1995), Algebraic Riccati equation.