Triangularizing One Direction at a Time
For a concrete matrix, triangularization is a sequence of choices that makes the action of the matrix easier to read. First find an eigenvector and place it at the start of a basis. In that basis, the first column has only one nonzero entry. For a 3×3 matrix, the remaining two coordinates form a 2×2 block; finding an eigenvector of that block and changing basis within those coordinates completes the triangularization.
All matrices and vectors in this tutorial have entries in \(\mathbb{C}\). An eigenvector of \(\mathbf{A}\in\mathbb{C}^{n\times n}\) is a nonzero vector \(\mathbf{v}\) such that \(\mathbf{A}\mathbf{v}=\lambda\mathbf{v}\) for some \(\lambda\in\mathbb{C}\), called its eigenvalue. If \(\mathcal{B}=(\mathbf{b}_1,\dots,\mathbf{b}_n)\) is a basis, let \(\mathbf{P}\) be the matrix whose columns are those basis vectors. The matrix representing the action of \(\mathbf{A}\) in this basis is \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\). An upper-triangular matrix has zero entries below its main diagonal.
This is a constructive method, not a claim that every arbitrary basis works. The first basis vector must be an eigenvector. The other basis vectors can initially be any vectors that complete a basis; if the remaining block is not upper triangular, change basis within that block.
Why the Basis Change Works
Proof. Write the columns of \(\mathbf{P}\) as \(\mathbf{b}_1,\dots,\mathbf{b}_n\), and let \(\mathbf{e}_j\) be the \(j\)th standard basis vector. Then \(\mathbf{P}\mathbf{e}_j=\mathbf{b}_j\). By matrix multiplication, \(\mathbf{A}\mathbf{P}\mathbf{e}_j=\mathbf{A}\mathbf{b}_j\). Multiplication by \(\mathbf{P}^{-1}\) converts a vector into its coordinates in the basis given by the columns of \(\mathbf{P}\), since \(\mathbf{P}[\mathbf{x}]_{\mathcal{B}}=\mathbf{x}\). Therefore \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\mathbf{e}_j\) is the coordinate vector of \(\mathbf{A}\mathbf{b}_j\). This holds for each \(j\), so it describes every column of the matrix. \(\square\)
Proof. Denote the starting matrix by \(\mathbf{C}\), and set \(\mathbf{D}=\operatorname{diag}(1,\mathbf{Q})\). The matrix \(\mathbf{D}\) is invertible, with \(\mathbf{D}^{-1}=\operatorname{diag}(1,\mathbf{Q}^{-1})\). Multiplying the blocks gives \(\mathbf{D}^{-1}\mathbf{C}\mathbf{D}=\begin{bmatrix}\lambda&\mathbf{r}\mathbf{Q}\\\mathbf{0}&\mathbf{Q}^{-1}\mathbf{B}\mathbf{Q}\end{bmatrix}\). The lower-left block is still zero, and the lower-right block is upper triangular by assumption. The top row has no entries below the main diagonal, while the lower-right block has none either. Thus the full matrix is upper triangular. \(\square\)
The first theorem explains how to read the transformed matrix; the second explains why a basis change inside the remaining coordinates does not disturb the eigenvector already placed first. The next examples show the calculations explicitly.
A Complex 2×2 Example
Worked Example: A Complex Matrix with Two Eigenvalues
Triangularize \(\mathbf{A}=\begin{bmatrix}1&i\\i&1\end{bmatrix}\), where \(i^2=-1\), by finding an eigenvector and extending it to a basis.
Try \(\mathbf{v}=(1,1)^{\top}\). Direct multiplication gives \(\mathbf{A}\mathbf{v}=(1+i,1+i)^{\top}=(1+i)\mathbf{v}\), so \(\lambda=1+i\) is an eigenvalue. Choose \(\mathbf{w}=(1,0)^{\top}\) to complete a basis. Its basis matrix and inverse are
The columns are independent: if \(a(1,1)^{\top}+b(1,0)^{\top}=\mathbf{0}\), the second coordinate gives \(a=0\), then the first gives \(b=0\). Now \(\mathbf{A}\mathbf{v}=(1+i)\mathbf{v}\), while \(\mathbf{A}\mathbf{w}=(1,i)^{\top}=i\mathbf{v}+(1-i)\mathbf{w}\). Thus the columns of the transformed matrix are \((1+i,0)^{\top}\) and \((i,1-i)^{\top}\):
Check: Multiplying by columns verifies \(\mathbf{A}\mathbf{P}=\mathbf{P}\begin{bmatrix}1+i&i\\0&1-i\end{bmatrix}\). The first column on both sides is \((1+i,1+i)^{\top}\). The second column on both sides is \((1,i)^{\top}\), because \(i\mathbf{v}+(1-i)\mathbf{w}=(1,i)^{\top}\). Since \(\mathbf{P}\) is invertible, this confirms the similarity and the triangular form.
A Repeated Eigenvalue Does Not Require Diagonalization
Worked Example: A Triangular Form with a Repeated Diagonal Entry
Triangularize \(\mathbf{A}=\begin{bmatrix}0&1\\-1&2\end{bmatrix}\) over \(\mathbb{C}\). The vector \(\mathbf{v}=(1,1)^{\top}\) satisfies \(\mathbf{A}\mathbf{v}=(1,1)^{\top}=\mathbf{v}\), so use it as the first basis vector. Choose \(\mathbf{w}=(1,0)^{\top}\) as the second. As in the previous example, \(\mathbf{P}=\begin{bmatrix}1&1\\1&0\end{bmatrix}\) and \(\mathbf{P}^{-1}=\begin{bmatrix}0&1\\1&-1\end{bmatrix}\).
For the second basis vector, \(\mathbf{A}\mathbf{w}=(0,-1)^{\top}=-\mathbf{v}+\mathbf{w}\). The coordinate columns are therefore \((1,0)^{\top}\) and \((-1,1)^{\top}\), giving
Check: The first column of \(\mathbf{A}\mathbf{P}\) is \(\mathbf{A}\mathbf{v}=\mathbf{v}\), matching the first column of \(\mathbf{P}\begin{bmatrix}1&-1\\0&1\end{bmatrix}\). The second is \(\mathbf{A}\mathbf{w}=-\mathbf{v}+\mathbf{w}=(0,-1)^{\top}\), matching the second column of that product. The repeated diagonal entry does not make the matrix diagonal: the nonzero entry \(-1\) records that \(\mathbf{A}\mathbf{w}\) is not just a multiple of \(\mathbf{w}\).
Triangularizing a 3×3 Matrix in Two Stages
Worked Example: Find an Eigenvector, Then Reduce the Remaining Block
Triangularize \(\mathbf{A}=\begin{bmatrix}1&2i-1&1\\1&2i-1&0\\-1&1&2\end{bmatrix}\). First take \(\mathbf{v}_1=(1,1,0)^{\top}\). Adding the first two columns of \(\mathbf{A}\) gives \((2i,2i,0)^{\top}=2i\mathbf{v}_1\), so \(2i\) is an eigenvalue. Extend \(\mathbf{v}_1\) to the basis \(\mathcal{B}_0=(\mathbf{v}_1,\mathbf{v}_2,\mathbf{v}_3)\), where \(\mathbf{v}_2=(1,0,0)^{\top}\) and \(\mathbf{v}_3=(0,0,1)^{\top}\). The basis matrix and its inverse are
Applying \(\mathbf{A}\) to these basis vectors gives \(\mathbf{A}\mathbf{v}_1=2i\mathbf{v}_1\), \(\mathbf{A}\mathbf{v}_2=\mathbf{v}_1-\mathbf{v}_3\), and \(\mathbf{A}\mathbf{v}_3=\mathbf{v}_2+2\mathbf{v}_3\). Hence
The remaining block has eigenvector \(\mathbf{z}=(1,1)^{\top}\), since \(\mathbf{B}\mathbf{z}=(1,1)^{\top}\). Complete it with \(\mathbf{w}=(1,0)^{\top}\). In this 2-dimensional block, \(\mathbf{B}\mathbf{w}=(0,-1)^{\top}=-\mathbf{z}+\mathbf{w}\), so the basis matrix \(\mathbf{S}=\begin{bmatrix}1&1\\1&0\end{bmatrix}\) gives \(\mathbf{S}^{-1}\mathbf{B}\mathbf{S}=\begin{bmatrix}1&-1\\0&1\end{bmatrix}\). Use this change only in the last two coordinates, with \(\mathbf{Q}=\operatorname{diag}(1,\mathbf{S})\). The full basis matrix is
The columns of \(\mathbf{P}\) are \(\mathbf{p}_1=(1,1,0)^{\top}\), \(\mathbf{p}_2=(1,0,1)^{\top}\), and \(\mathbf{p}_3=(1,0,0)^{\top}\). They form a basis; for example, \(\det\mathbf{P}=1\). The resulting matrix is
Check: The columns of \(\mathbf{A}\mathbf{P}\) are \(\mathbf{A}\mathbf{p}_1=(2i,2i,0)^{\top}\), \(\mathbf{A}\mathbf{p}_2=(2,1,1)^{\top}\), and \(\mathbf{A}\mathbf{p}_3=(1,1,-1)^{\top}\). The proposed triangular matrix expresses these as \(2i\mathbf{p}_1\), \(\mathbf{p}_1+\mathbf{p}_2\), and \(\mathbf{p}_1-\mathbf{p}_2+\mathbf{p}_3\), respectively. Those combinations equal the three computed columns, so \(\mathbf{A}\mathbf{P}=\mathbf{P}(\mathbf{P}^{-1}\mathbf{A}\mathbf{P})\).
Common Pitfall: Omitting the Right-Hand Basis Matrix
The similarity formula is \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\), not merely \(\mathbf{P}^{-1}\mathbf{A}\). The right-hand factor matters because the input coordinates must first be converted from the chosen basis to standard coordinates. In the first worked example, omitting \(\mathbf{P}\) gives the incorrect expression \(\mathbf{P}^{-1}\mathbf{A}=\begin{bmatrix}i&1\\1-i&i-1\end{bmatrix}\), which is not the matrix of \(\mathbf{A}\) in the basis \((\mathbf{v},\mathbf{w})\). Indeed, the first coordinate vector represents \(\mathbf{v}\), so its image must have coordinates \((1+i,0)^{\top}\); the first column of the incorrect expression is \((i,1-i)^{\top}\). The correct computation includes \(\mathbf{P}\): \(\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\mathbf{e}_1=\mathbf{P}^{-1}\mathbf{A}\mathbf{v}=(1+i,0)^{\top}\).
A second check is to verify \(\mathbf{A}\mathbf{P}=\mathbf{P}\mathbf{T}\), where \(\mathbf{T}\) is the proposed triangular matrix. This checks every column against the action of \(\mathbf{A}\), and also catches a basis matrix whose columns were ordered differently from the calculations.
What to Look For in a Completed Triangularization
The diagonal entries of the triangular matrix show the successive eigenvalues found during the construction. The entries above the diagonal describe how the images of later basis vectors may include earlier basis vectors. They need not be zero, as the repeated-eigenvalue example demonstrates. Triangularization is useful precisely because it reveals this structure without requiring the matrix to be diagonalizable.
For a 3×3 calculation, the practical sequence is: choose an eigenvector, extend it to a basis, calculate the remaining 2×2 block, then choose a basis for that block that makes it upper triangular. Keep the change confined to the remaining coordinates, and finally verify the full result by multiplying back. This makes each stage transparent and helps distinguish an actual change of basis from a matrix that is only superficially triangular.
Check Your Understanding
For each calculation, keep the basis vectors as columns and verify the final similarity by multiplying back.
- For \(\begin{bmatrix}2&i\\i&2\end{bmatrix}\), test \((1,1)^{\top}\) as a first basis vector and find a second vector that completes a basis.
- For \(\begin{bmatrix}0&1\\-1&2\end{bmatrix}\), compute the coordinates of the image of \((1,0)^{\top}\) in the basis \(((1,1)^{\top},(1,0)^{\top})\).
- Explain why an eigenvector placed first forces zeros below the first entry of the first column in the transformed matrix.
- In a 3×3 triangularization, what part of the transformed matrix must be made upper triangular after the first eigenvector is placed first?
- Write the multiplication check that confirms a proposed \(\mathbf{T}=\mathbf{P}^{-1}\mathbf{A}\mathbf{P}\).