Schur DecompositionThe Schur decomposition of a square matrix involves finding a unitary matrix that can be used for a similarity transformation of to form a block upper triangular matrix with 1 1 and 2 2 blocks on the diagonal (the 2 2 blocks correspond to complex conjugate pairs of eigenvalues for a real matrix ). A block upper triangular matrix of this form can be called upper quasi-triangular. The Schur decomposition always exists and so the similarity transformation of to upper triangular always exists. This contrasts with the eigensystem similarity transformation, used to diagonalize a matrix, which does not always exist. This computes the Schur decomposition of a sample matrix. The result is a list of the two matrices. In[1]:=  |
Out[3]=
|
The matrix can be used for a similarity transformation on the matrix to generate the upper triangular result . In[4]:=  |
Out[4]//MatrixForm=
|
For this particular matrix, a similarity transformation that generates an even simpler form can be found, because the matrix can be diagonalized. In[5]:=  |
Out[7]//MatrixForm=
|
This matrix cannot be diagonalized because the matrix of eigenvectors is singular. In[8]:=  |
Out[10]=
|
However, the Schur decomposition can be found and the matrix transformed to an upper triangular form. In[11]:=  |
Out[12]=
|
In this example, the matrix has complex eigenvalues. In[13]:=  |
Out[14]=
|
Now the resulting matrix has a 2 2 block on the diagonal. In[15]:=  |
Out[16]=
|
The matrix can be used for a similarity transformation on the matrix to generate the upper quasi-triangular result. Note that an upper triangular result (with 1 1 blocks on the diagonal) that may involve complex numbers can be obtained by using the option RealBlockForm. When the result is upper triangular (i.e., has 1 1 blocks on the diagonal) the eigenvalues of the matrix are always found on the diagonal. In[17]:=  |
Out[17]//MatrixForm=
|
Note that if the matrix is complex the definition of the Schur decomposition uses the conjugate transpose and returns an upper triangular result. This is demonstrated for the following complex matrix. In[18]:=  |
Out[20]=
|
This demonstrates that the result satisfies the definition of the Schur decomposition. In[21]:=  |
Out[21]//MatrixForm=
|
The diagonal of contains the eigenvalues of . In[22]:=  |
Out[22]=
|
Generalized Schur DecompositionFor matrices and , the generalized Schur decomposition is defined as where and are unitary, is upper triangular, and is upper quasi-triangular. These are some sample matrices. In[1]:=  |
This returns the generalized Schur decomposition. In[3]:=  |
Out[3]=
|
This demonstrates the results are consistent with the definition of the decomposition. In[4]:=  |
Out[4]//MatrixForm=
|
In[5]:=  |
Out[5]//MatrixForm=
|
For real input, a result involving complex numbers and an upper triangular result can be obtained with the option RealBlockForm. OptionsSchurDecomposition takes two options. Options for SchurDecomposition. The option Pivoting can be used to allow pivoting and scaling to improve the quality of the result. When it is set to True, pivoting and scaling may be used and a matrix that represents the changes to is returned. With this new matrix the definition of the Schur decomposition can be seen as follows. The use of pivoting and scaling is now demonstrated for the following matrix. When Pivoting is set to True, pivoting and scaling are used if necessary, and an extra matrix (which here only represents scaling) is returned. In[1]:=  |
Out[3]=
|
This demonstrates the transformation to an upper triangular form. In[4]:=  |
Out[4]//MatrixForm=
|
The diagonal elements of are the eigenvalues of . In[5]:=  |
Out[5]=
|
When the Schur decomposition is computed without pivoting and scaling, the diagonal elements of are not as close to the eigenvalues of . This demonstrates the utility of the Pivoting option. In[6]:=  |
Out[7]//MatrixForm=
|
The option RealBlockForm controls the generation of the upper quasi-triangular result. If this is set to True, a result that may have 2 2 blocks on the diagonal is generated. If it is set to False, the result is upper triangular with 1 1 blocks on the diagonal (but which may involve complex numbers). This is demonstrated for the following real matrix, which has complex eigenvalues and a Schur decomposition with 2 2 blocks on the diagonal. In[8]:=  |
Out[9]=
|
Setting RealBlockForm to False generates a matrix that is upper triangular; both and are complex. In[10]:=  |
Out[11]=
|
This generates the upper triangular result . In[12]:=  |
Out[12]//MatrixForm=
|
|