# Solution to a Matrix equation

Is there a general solution to the following matrix equation.

$A - BAB^T = C$
where B is known but can be any non-symmetric square matrix, C is known and invertible, all are n by n matrices. Is there a solution to A? or we need to use numerical methods?

-
At worst it is just system of linear equations with the $n^2$ entries of $A$ as unknowns. – Henning Makholm Sep 5 '12 at 17:28

This is a discrete Lyapunov equation, and stable, accurate numerical methods exist to solve it (for certain conditions on $C$).

-
Thanks for pointing in the right direction. Just found after some search that an analytical solution is possible by expressing the equation in a slightly different form. Stacking the columns of A and C we get vectors A1 and C1 and the system can be now written as $(I-B\otimes B)A1 =C1$ ($\otimes$-denote Kronecker product). This sounds right to me. However, I will have to verify. – overloaded Sep 5 '12 at 18:26
@overloaded The DLE is a linear equation, and in general, when solutions to linear equations exist, they can be written analytically. However, it is rarely easy to do so. Often, the analytic solution has many, many operations (multiplications/additions) which each can introduce a small error. For larger systems, this error may exceed the error computed using the Schur factor-based methods. Indeed, attempting direct solutions also often incur higher computational costs, which is why existing algorithms do not use the analytic solution. – Arkamis Sep 5 '12 at 18:38
Thank you. Yes, totally agree. The analytical form may help me draw some intuitions but a numerical method (matlab has it) may be more desirable when n is large. – overloaded Sep 5 '12 at 23:32