# SchurDecomposition

yields the Schur decomposition for a numerical matrix m, given as a list {q,t} where q is an orthonormal matrix and t is a block uppertriangular matrix.

SchurDecomposition[{m,a}]

gives the generalized Schur decomposition of m with respect to a.

# Details and Options # Examples

open allclose all

## Basic Examples(1)

Find the Schur decomposition of a real matrix:

Confirm the decomposition up to numerical rounding:

Format and :

## Scope(12)

### Basic Uses(5)

Find the Schur decomposition of a machine-precision matrix:

Format the results:

Schur decomposition of a complex matrix:

Schur decomposition of an arbitrary-precision matrix:

Consider a real-valued matrix with complex eigenvalues:

Compute its Schur decomposition:

All entries in the decomposition are real:

The matrix is block-upper triangular, with entries along the first subdiagonal, but not upper triangular:

makes upper triangular at the cost of complex entries:

The Schur decomposition of large numerical matrices is computed efficiently:

### Generalized Decomposition(3)

Generalized Schur decomposition for a pair of matrices m and a:

Confirm that :

Confirm that :

Generalized Schur decomposition for a pair of complex matrices:

Confirm the decompositions:

Generalized Schur decomposition for a pair of arbitrary-precision matrices:

There is no need to use Chop to verify the decomposition:

### Special Matrices(4)

Schur decomposition of sparse matrices:

Schur decomposition of a structured matrix of type SymmetrizedArray:

IdentityMatrix has a trivial Schur decomposition:

Schur decomposition of HilbertMatrix:

## Options(2)

### Pivoting(1)

m is a 3×3 matrix:

With Pivoting->True, an extra matrix that represents the scaling and permutation is returned:

Verify that m.d is equal to d.q.t.ConjugateTranspose[q]:

### RealBlockDiagonalForm(1)

m is a matrix with two real and two complex eigenvalues:

With , the result is complex upper triangular:

With , there are real 2×2 blocks along the diagonal:

## Applications(3)

A matrix m is unitarily equivalent to a diagonal matrix if and only if is true. The Schur decomposition gives the next best reductionunitary equivalences to a triangular matrixfor a general matrix. Consider a non-normal matrix:

The Schur decomposition gives equivalence to a triangular matrix:

The eigenvalues, since they are real, occur on the diagonal of t:

Schur decomposition can be viewed as a process of finding a nested sequence of eigenvectors for matrices that extend to the bottom-right corner. Consider the following matrix :

The eigenvalues of this matrix are real, so the decomposition will be real and upper triangular:

Construct an orthonormal basis for starting with the first eigenvector of :

Because and are orthonormal to the eigenvector , transforming to this basis puts zeros below the diagonal in the first column:

Extract the 2×2 bottom-right matrix; its eigenvalues are the remaining eigenvalues of :

Find an orthonormal basis for that includes the first eigenvector of , and embed it in :

Let and consider :

Comparing with SchurDecomposition, the results are the same up to the signs of the columns of :

A simple method for computing the Schur decomposition is the unshifted QR algorithm. Starting with and , at each stage compute the QR decomposition of . Then let and . In the limit, converges to the desired matrix and converges to the desired matrix (for well-behaved input matrices). Apply this method to the following matrix :

Compute the decomposition using 100 iterations of the QR algorithm:

By construction, the resulting matrix is orthogonal:

Although it might not look it, the is upper triangular; entries below the diagonal are numerical noise:

Compute the decomposition using SchurDecomposition:

Up to overall sign, the two matrices seem to agree:

The entries differ in numerical noise:

The matrix looks more obviously upper triangular than :

But again, the differences between and amount to numerical noise:

## Properties & Relations(11)

gives matrices and such that :

In {q,t}=SchurDecomposition[m], q is always a unitary matrix:

If m is real-valued, q is also orthogonal:

In {q,t}=SchurDecomposition[m], t is upper triangular with respect to the first subdiagonal:

t need not be strictly upper triangular:

If the matrix m has complex entries, the t matrix is always strictly upper triangular:

The diagonal entries of t are the eigenvalues of m, though not necessarily in any particular order:

For a real-valued matrix m, the real eigenvalues appear on t's diagonal, the complex ones as 2×2 blocks:

For a real-valued matrix , complex eigenvalues produce 2×2 blocks of the form in the matrix:

The corresponding complex eigenvalues can be recovered from the entries of the block as :

For a Hermitian matrix, the matrix is always diagonal:

m and a are random 3×3 matrices:

Find the generalized Schur decomposition of m with respect to a:

Verify that m is given by q.s.ConjugateTranspose[p]:

Verify that a is given by q.t.ConjugateTranspose[p]:

In {q,s,p,t}=SchurDecomposition[{m,a},RealBlockDiagonalFormFalse], the ratio of the diagonals of s and t equals the generalized eigenvalues of m with respect to a:

For a real symmetric matrix , the Schur decomposition is composed of eigenvalues and eigenvectors: is a diagonal matrix with the eigenvalues of along the diagonal:

The columns of are the eigenvectors of :

for a numerical normal matrix :

Up to phase, this coincides with the Jordan decomposition:

The t and j matrices are equal:

To verify that q has eigenvectors as columns, set the first entry of each column to 1. to eliminate phase differences between q and s:

## Possible Issues(1)

SchurDecomposition only works with approximate numerical matrices: For exact matrices, numericize the entries first:

Alternatively, use JordanDecomposition: