# Lyapunov equation - solve for the system matrix

The continuous Lyapunov equation is normally formulated as: $AX + XA^T + Q = 0$. Given the matrices $A$ and $Q$, there exists a unique $X$ iff the linear system described by $A$ is globally asymptotically stable. [EDIT: note that $Q$ must also be positive ($Q>0$) and symmetric]

However, I'm wondering if it's possible to solve instead for the system itself. In other words, given the matrices $X$ and $Q$, does a unique $A$ exist? Is there a way to find it?

• I do not agree with your second phrase - you need some conditions on symmetricity and/or positive definiteness of $Q$ and $X$, otherwise the result does not hold (easy counterexample - take $Q=0$, $A=I$ there is a solution $X=0$, yet the system is not asymptotically stable). Commented Apr 12, 2017 at 8:20
• Yes true. I was being a bit lazy. I think it is true provided that $Q$ is positive and symmetric. Correct me if I'm wrong. Thanks for the comment! Commented Apr 12, 2017 at 9:24

You noted that $Q$ must be symmetric, however $X$ must then be symmetric as well. Assuming that all involved matrices are $n\times n$, then the $A$ matrix would have $n^2$ unknowns, however due to symmetry you only have at most $\frac12 n\,(n+1)$ unique (linear) equations. So this might only be solvable when $n=1$ (and $n=0$). For larger $n$ there are infinitely many solutions, or you would have to add additional constraints, such as that $A$ is symmetric as well.
This is not an answer, but is written in hope of helping the OP to find some direction. From a numerical perspective, We can do the following. Using the standard $vec(.)$ operator (stacking columns of the argument matrix as a single column vector), we have $$vec(AX) =(X^T\otimes I)*vec(A)$$ and $$vec(XA^T)=(I\otimes X)*vec(A^T)=(I\otimes X)*L*vec(A)$$Note that $vec(A)$ is a $N^2 \times 1$ matrix. $L$ is a $N^2 \times N^2$ matrix (linear transformation) such that $vec(A^T)=L*vec(A)$. Defining $$A_x=(X^T\otimes I)-(I\otimes X)*L$$ and $b_q=vec(-Q)$, $y=vec(A)$, you have the classic linear system $$A_xy=b_q$$ Trying to associate properties of $X$ with $A_x$ might help now to see if such an $A$ exists or not.
$$A = X^{-1}(-\tfrac{1}{2}Q + S),$$
where $S$ is an arbitrary skew-symmetric (antisymmetric) matrix.