Function sylvester #
Solves the real-valued Sylvester equation AX+XB=C for X, where A, B and C are
matrices of appropriate dimensions, being A and B squared. Notice that other
equivalent definitions for the Sylvester equation exist and this function
assumes the one presented in the original publication of the the Bartels-
Stewart algorithm, which is implemented by this function.
https://en.wikipedia.org/wiki/Sylvester_equation
Syntax #
math.sylvester(A, B, C)
Parameters #
| Parameter |
Type |
Description |
A |
Matrix | Array |
Matrix A |
B |
Matrix | Array |
Matrix B |
C |
Matrix | Array |
Matrix C |
Returns #
| Type |
Description |
| Matrix | Array |
Matrix X, solving the Sylvester equation |
Throws #
Examples #
const A = [[-1, -2], [1, 1]]
const B = [[2, -1], [1, -2]]
const C = [[-3, 2], [3, 0]]
math.sylvester(A, B, C) // returns DenseMatrix [[-0.25, 0.25], [1.5, -1.25]]
See also #
schur,
lyap