How to solve a non-homogeneous quadratic matrix equation? I am looking to solve the following matrix equation for $G$
$$GHG + M = 0$$
where $G$, $H$, and $M$ are square, symmetric, real matrices. $H$ is negative-definite and $M$ is positive-definite. $G$ should also be positive-definite. 
Is it possible? 
Many thanks!
 A: (commenting about the equation with the plus sign, I hope that the correction was right).
This is one of the few quadratic matrix equations that have a closed form solution. Set $A=-H^{-1}$; then $G = A(A^{-1}M)^{1/2}=A^{1/2}(A^{-1/2}MA^{-1/2})^{1/2}A^{1/2}$. Here the operation $X^{1/2}$, for a matrix $X$, denotes the unique square root with spectrum in the right half-plane. The solution $G$ is known as the matrix geometric mean of the positive definite matrices $M$ and $A$, and denoted by $A\operatorname{\#}M$. You can see Section 4.1 of Bhatia's book Positive definite matrices for more information and proofs of these facts.
A: Yes, this is always possible, and $G$ is unique.  Here is how you can see this:
Consider the pair of positive definite symmetric matrices $(-H^{-1}, M)$.  By a well-known theorem (simultaneous diagonalization of quadratic forms), there exists an invertible matrix $A$ such that
$$
-H^{-1} = AA^T\qquad\text{and}\qquad M = A D A^T
$$
where $D$ is positive definite and diagonal.  Then the equation you want to solve becomes
$$
G (A^T)^{-1} A^{-1} G = ADA^T.
$$
Setting $\bar G = A^{-1}G(A^T)^{-1}$, this becomes $\bar G^2 = D$, which has a unique positive definite symmetric (in fact, diagonal) solution, $\bar G = \sqrt{D}$.  Now just set
$$
G = A\bar G A^T = A\sqrt{D}\,A^T.
$$
Note:  Explicitly finding $A$ is a matter of first finding the diagonal elements of $D$ as the roots (which are all positive) of the equation $\det(M+\lambda H^{-1}) = 0$, or, equivalently $\det(MH+\lambda I) = 0$.  Then, using these, you get the columns of $A$ as the corresponding eigenvectors.
