scipy.linalg.solve_sylvester

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

Computes a solution (X) to the Sylvester equation (AX + XB = Q).

Parameters :

a : array, shape (M, M)

Leading matrix of the Sylvester equation

b : array, shape (N, N)

Trailing matrix of the Sylvester equation

q : array, shape (M, N)

Right-hand side

Returns :

x : array, shape (M, N)

The solution to the Sylvester equation.

Raises :

LinAlgError :

If solution was not found

Notes

Computes a solution to the Sylvester matrix equation via the Bartels- Stewart algorithm. The A and B matrices first undergo Schur decompositions. The resulting matrices are used to construct an alternative Sylvester equation (RY + YS^T = F) where the R and S matrices are in quasi-triangular form (or, when R, S or F are complex, triangular form). The simplified equation is then solved using *TRSYL from LAPACK directly.

Previous topic

scipy.linalg.funm

Next topic

scipy.linalg.solve_continuous_are