# Lyapunov equation

In control theory, the discrete Lyapunov equation is of the form

${\displaystyle AXA^{H}-X+Q=0}$

where ${\displaystyle Q}$ is a Hermitian matrix and ${\displaystyle A^{H}}$ is the conjugate transpose of ${\displaystyle A}$. The continuous Lyapunov equation is of form

${\displaystyle AX+XA^{H}+Q=0}$.

The Lyapunov equation occurs in many branches of control theory, such as stability analysis and optimal control. This and related equations are named after the Russian mathematician Aleksandr Lyapunov.

## Application to stability

In the following theorems ${\displaystyle A,P,Q\in \mathbb {R} ^{n\times n}}$, and ${\displaystyle P}$ and ${\displaystyle Q}$ are symmetric. The notation ${\displaystyle P>0}$ means that the matrix ${\displaystyle P}$ is positive definite.

Theorem (continuous time version). Given any ${\displaystyle Q>0}$, there exists a unique ${\displaystyle P>0}$ satisfying ${\displaystyle A^{T}P+PA+Q=0}$ if and only if the linear system ${\displaystyle {\dot {x}}=Ax}$ is globally asymptotically stable. The quadratic function ${\displaystyle V(z)=z^{T}Pz}$ is a Lyapunov function that can be used to verify stability.

Theorem (discrete time version). Given any ${\displaystyle Q>0}$, there exists a unique ${\displaystyle P>0}$ satisfying ${\displaystyle A^{T}PA-P+Q=0}$ if and only if the linear system ${\displaystyle x(t+1)=Ax(t)}$ is globally asymptotically stable. As before, ${\displaystyle z^{T}Pz}$ is a Lyapunov function.

## Computational aspects of solution

Specialized software is available for solving Lyapunov equations. For the discrete case, the Schur method of Kitagawa is often used.[1] For the continuous Lyapunov equation the method of Bartels and Stewart can be used.[2]

## Analytic Solution

Defining the ${\displaystyle \operatorname {vec} (A)}$ operator as stacking the columns of a matrix ${\displaystyle A}$ and ${\displaystyle A\otimes B}$ as the Kronecker product of ${\displaystyle A}$ and ${\displaystyle B}$, the continuous time and discrete time Lyapunov equations can be expressed as solutions of a matrix equation. Furthermore, if the matrix ${\displaystyle A}$ is stable, the solution can also be expressed as an integral (continuous time case) or as an infinite sum (discrete time case).

### Discrete time

Using the result that ${\displaystyle \operatorname {vec} (ABC)=(C^{T}\otimes A)\operatorname {vec} (B)}$, one has

${\displaystyle (I-A\otimes A)\operatorname {vec} (X)=\operatorname {vec} (Q)}$

where ${\displaystyle I}$ is a conformable identity matrix.[3] One may then solve for ${\displaystyle \operatorname {vec} (X)}$ by inverting or solving the linear equations. To get ${\displaystyle X}$, one must just reshape ${\displaystyle \operatorname {vec} (X)}$ appropriately.

Moreover, if ${\displaystyle A}$ is stable, the solution ${\displaystyle X}$ can also be written as

${\displaystyle X=\sum _{k=0}^{\infty }A^{k}Q(A^{H})^{k}}$.

### Continuous time

Using again the Kronecker product notation and the vectorization operator, one has the matrix equation

${\displaystyle (I_{n}\otimes A+{\bar {A}}\otimes I_{n})\operatorname {vec} X=-\operatorname {vec} Q,}$

where ${\displaystyle {\bar {A}}}$ denotes the matrix obtained by complex conjugating the entries of ${\displaystyle A}$.

Similar to the discrete-time case, if ${\displaystyle A}$ is stable, the solution ${\displaystyle X}$ can also be written as

${\displaystyle X=\int \limits _{0}^{\infty }e^{A\tau }Qe^{A^{H}\tau }d\tau }$.