# What Is a Schur Decomposition?

A Schur decomposition of a matrix $A\in\mathbb{C}^{n\times n}$ is a factorization $A = QTQ^*$, where $Q$ is unitary and $T$ is upper triangular. The diagonal entries of $T$ are the eigenvalues of $A$, and they can be made to appear in any order by choosing $Q$ appropriately. The columns of $Q$ are called Schur vectors.

A subspace $\mathcal{X}$ of $\mathbb{C}^{n\times n}$ is an invariant subspace of $A$ if $Ax\in\mathcal{X}$ for all $x\in\mathcal{X}$. If we partition $Q$ and $T$ conformably we can write

$\notag A [Q_1,~Q_2] = [Q_1,~Q_2] \begin{bmatrix} T_{11} & T_{12} \\ 0 & T_{22} \\ \end{bmatrix},$

which gives $A Q_1 = Q_1 T_{11}$, showing that the columns of $Q_1$ span an invariant subspace of $A$. Furthermore, $Q_1^*AQ_1 = T_{11}$. The first column of $Q$ is an eigenvector of $A$ corresponding to the eigenvalue $\lambda_1 = t_{11}$, but the other columns are not eigenvectors, in general. Eigenvectors can be computed by solving upper triangular systems involving $T - \lambda I$, where $\lambda$ is an eigenvalue.

Write $T = D+N$, where $D = \mathrm{diag}(\lambda_i)$ and $N$ is strictly upper triangular. Taking Frobenius norms gives $\|A\|_F^2 = \|D\|_F^2 + \|N\|_F^2$, or

$\notag \|N\|_F^2 = \|A\|_F^2 - \displaystyle\sum_{i=1}^n |\lambda_i|^2.$

Hence $\|N\|_F$ is independent of the particular Schur decomposition and it provides a measure of the departure from normality. The matrix $A$ is normal (that is, $A^*A = AA^*$) if and only if $N = 0$. So a normal matrix is unitarily diagonalizable: $A = QDQ^*$.

An important application of the Schur decomposition is to compute matrix functions. The relation $f(A) = Qf(T)Q^*$ shows that computing $f(A)$ reduces to computing a function of a triangular matrix. Matrix functions illustrate what Van Loan (1975) describes as “one of the most basic tenets of numerical algebra”, namely “anything that the Jordan decomposition can do, the Schur decomposition can do better!”. Indeed the Jordan canonical form is built on a possibly ill conditioned similarity transformation while the Schur decomposition employs a perfectly conditioned unitary similarity, and the full upper triangular factor of the Schur form can do most of what the Jordan form’s bidiagonal factor can do.

An upper quasi-triangular matrix is a block upper triangular matrix

$\notag R = \begin{bmatrix} R_{11} & R_{12} & \dots & R_{1m}\\ & R_{22} & \dots & R_{2m}\\ & & \ddots& \vdots\\ & & & R_{mm} \end{bmatrix}$

whose diagonal blocks $R_{ii}$ are either $1\times1$ or $2\times2$. A real matrix $A\in\mathbb{R}^{n \times n}$ has a real Schur decomposition $A = QRQ^T$ in which in which all the factors are real, $Q$ is orthogonal, and $R$ is upper quasi-triangular with any $2\times2$ diagonal blocks having complex conjugate eigenvalues. If $A$ is normal then the $2\times 2$ blocks $R_{ii}$ have the form

$R_{ii} = \left[\begin{array}{@{}rr@{\mskip2mu}} a & b \\ -b & a \end{array}\right], \quad b \ne 0,$

which has eigenvalues $a \pm \mathrm{i}b$.

The Schur decomposition can be computed by the QR algorithm at a cost of about $25n^3$ flops for $Q$ and $T$, or $10n^3$ flops for $T$ only.

In MATLAB, the Schur decomposition is computed with the schur function: the command [Q,T] = schur(A) returns the real Schur form if $A$ is real and otherwise the complex Schur form. The complex Schur form for a real matrix can be obtained with [Q,T] = schur(A,'complex'). The rsf2csf function converts the real Schur form to the complex Schur form. The= ordschur function takes a Schur decomposition and modifies it so that the eigenvalues appear in a specified order along the diagonal of $T$.