# Solving a matrix equation involving transpose conjugates

How to solve the following matrix equation involving transpose conjugates: $$X+X^H+aX^HX=S$$, where $$X$$ is the variable complex matrix, $$a$$ is a real scalar and $$S$$ is a Hermitian positive semi-definite matrix? Is there any closed-form solution? The operator $$.^H$$ indicated the Hermitian operation (transpose conjugate).

When $$a=0$$, the general solution is given by $$X=\frac{S}{2}+iH$$, where $$H$$ is an arbitrary Hermitian matrix.
When $$a>0$$, the equation can be rewritten as $$\left(\sqrt{a}X+\frac{I}{\sqrt{a}}\right)^H\left(\sqrt{a}X+\frac{I}{\sqrt{a}}\right)=S+\frac{I}{a}$$. Therefore the general solution is given by $$X=\frac{1}{\sqrt{a}}\left[U\left(S+\frac{I}{a}\right)^{1/2}-\frac{I}{\sqrt{a}}\right]$$ where $$U$$ is an arbitrary unitary matrix.
When $$a<0$$, the equation can be rewritten as $$\left(\sqrt{-a}X-\frac{I}{\sqrt{-a}}\right)^H\left(\sqrt{-a}X-\frac{I}{\sqrt{-a}}\right)=-S-\frac{I}{a}$$. Therefore the equation is solvable if and only if $$I+aS$$ is positive semidefinite. If this is the case, the general solution is given by $$X=\frac{1}{\sqrt{-a}}\left[U\left(-S-\frac{I}{a}\right)^{1/2}+\frac{I}{\sqrt{-a}}\right]$$, where $$U$$ is an arbitrary unitary matrix.