In numerical linear algebra, the Bartels–Stewart algorithm is used to numerically solve the Sylvester matrix equation. Developed by R.H. Bartels and G.W. Stewart in 1971, it was the first numerically stable method that could be systematically applied to solve such equations. The algorithm works by using the real Schur decompositions of and to transform into a triangular system that can then be solved using forward or backward substitution. In 1979, G. Golub, C. Van Loan and S. Nash introduced an improved version of the algorithm, known as the Hessenberg–Schur algorithm. It remains a standard approach for solving Sylvester equations when is of small to moderate size.
The algorithm
Let, and assume that the eigenvalues of are distinct from the eigenvalues of. Then, the matrix equation has a uniquesolution. The Bartels–Stewart algorithm computes by applying the following steps: 1.Compute the real Schur decompositions The matrices and are block-upper triangular matrices, with diagonal blocks of size or. 2. Set 3. Solve the simplified system, where. This can be done using forward substitution on the blocks. Specifically, if, then where is the th column of. When, columns should be concatenated and solved for simultaneously. 4. Set
In the special case where and is symmetric, the solution will also be symmetric. This symmetry can be exploited so that is found more efficiently in step 3 of the algorithm.
The Hessenberg–Schur algorithm
The Hessenberg–Schur algorithm replaces the decomposition in step 1 with the decomposition, where is an upper-Hessenberg matrix. This leads to a system of the form that can be solved using forward substitution. The advantage of this approach is that can be found using Householder reflections at a cost of flops, compared to the flops required to compute the real Schur decomposition of.
Software and implementation
The subroutines required for the Hessenberg-Schur variant of the Bartels–Stewart algorithm are implemented in the SLICOT library. These are used in the MATLAB control system toolbox.
Alternative approaches
For large systems, the cost of the Bartels–Stewart algorithm can be prohibitive. When and are sparse or structured, so that linear solves and matrix vector multiplies involving them are efficient, iterative algorithms can potentially perform better. These include projection-based methods, which use Krylov subspace iterations, methods based on the alternating direction implicit iteration, and hybridizations that involve both projection and ADI. Iterative methods can also be used to directly construct low rank approximations to when solving.