scipy.linalg.solve_discrete_are(a, b, q, r)[source]

Solves the discrete algebraic Riccati equation (DARE).

The DARE is defined as

\[X = A'XA - (A'XB) (R+B'XB)^{-1} (B'XA) + Q\]

The limitations for a solution to exist are :

  • All eigenvalues of \(A\) outside the unit disc, should be controllable.
  • The associated symplectic pencil (See Notes), should have eigenvalues sufficiently away from the unit circle.

a : (M, M) array_like

Square matrix

b : (M, N) array_like


q : (M, M) array_like


r : (N, N) array_like

Square matrix


x : ndarray

Solution to the discrete algebraic Riccati equation.



For cases where the stable subspace of the pencil could not be isolated. See Notes section and the references for details.

See also

Solves the continuous algebraic Riccati equation


The equation is solved by forming the extended symplectic matrix pencil, as described in [R117], \(H - \lambda J\) given by the block matrices:

[  A   0   B ]             [ I   0   B ] 
[ -Q   I   0 ] - \lambda * [ 0  A^T  0 ]
[  0   0   R ]             [ 0 -B^T  0 ]

and using a QZ decomposition method.

In this algorithm, the fail conditions are linked to the symmetrycity of the product \(U_2 U_1^{-1}\) and condition number of \(U_1\). Here, \(U\) is the 2m-by-m matrix that holds the eigenvectors spanning the stable subspace with 2m rows and partitioned into two m-row matrices. See [R117] and [R118] for more details.

New in version 0.11.0.


[R117](1, 2, 3) P. van Dooren , “A Generalized Eigenvalue Approach For Solving Riccati Equations.”, SIAM Journal on Scientific and Statistical Computing, Vol.2(2), DOI: 10.1137/0902010
[R118](1, 2) Alan J Laub, “A Schur Method for Solving Algebraic Riccati Equations.”, Massachusetts Institute of Technology. Laboratory for Information and Decision Systems. LIDS-R ; 859. Available online :