scipy.linalg.solve_discrete_lyapunov(a, q, method=None)[source]

Solves the discrete Lyapunov equation \(A'XA-X=-Q\).


a : (M, M) array_like

A square matrix

q : (M, M) array_like

Right-hand side square matrix

method : {‘direct’, ‘bilinear’}, optional

Type of solver.

If not given, chosen to be direct if M is less than 10 and bilinear otherwise.


x : ndarray

Solution to the discrete Lyapunov equation

See also

computes the solution to the continuous Lyapunov equation


This section describes the available solvers that can be selected by the ‘method’ parameter. The default method is direct if M is less than 10 and bilinear otherwise.

Method direct uses a direct analytical solution to the discrete Lyapunov equation. The algorithm is given in, for example, [R104]. However it requires the linear solution of a system with dimension \(M^2\) so that performance degrades rapidly for even moderately sized matrices.

Method bilinear uses a bilinear transformation to convert the discrete Lyapunov equation to a continuous Lyapunov equation \((B'X+XB=-C)\) where \(B=(A-I)(A+I)^{-1}\) and \(C=2(A' + I)^{-1} Q (A + I)^{-1}\). The continuous equation can be efficiently solved since it is a special case of a Sylvester equation. The transformation algorithm is from Popov (1964) as described in [R105].

New in version 0.11.0.


[R104](1, 2) Hamilton, James D. Time Series Analysis, Princeton: Princeton University Press, 1994. 265. Print.
[R105](1, 2) Gajic, Z., and M.T.J. Qureshi. 2008. Lyapunov Matrix Equation in System Stability and Control. Dover Books on Engineering Series. Dover Publications.