# Closed form solution for $XAX^{T}=B$

Let $$d \times d$$ matrices $$A, B$$ be positive definite. Is there a closed form solution for the following quadratic equation in $$X$$?

$$X A X^{T} = B$$

Thank you.

• Just for completeness: this is usually called a Ricatti equation, sometimes also a Lyapunov equation. This might help to lookup references if needed. – leo monsaingeon Jul 20 at 17:10
• Related: mathoverflow.net/q/78106 – Rodrigo de Azevedo Jul 20 at 17:28
• Does this answer your question? Solving a quadratic matrix equation – vidyarthi Jul 20 at 17:59
• Thank you for the answers, I think Federico's answer is very neat, at least for the type of problem I specified. – Fabio Jul 20 at 20:29

$$B^{-1/2}XAX^TB^{-1/2}=I$$, so $$B^{-1/2}XA^{1/2}=Q$$ must be orthogonal. On the other hand, for any orthogonal $$Q$$, it is simple to verify that $$X = B^{1/2}QA^{-1/2}$$ solves the equation, so this is a complete parametrization of the solutions.
Here $$A^{1/2}$$ is the symmetric square root of $$A$$ (if you prefer you can work with the Cholesky factor and obtain similar results).