Upper and lower triangular matrix

On this post we explain what a (lower or upper) triangular matrix is with several examples. Also, you will find how to calculate the determinant of a triangular matrix and all the properties of this special matrix.

What is a lower or upper triangular matrix?

The definition of upper or lower triangular matrix is as follows:

A triangular matrix is a square matrix in which all elements above or below the main diagonal are zero (0). If all the entries above the main diagonal are zero, it is a lower triangular matrix. In contrast, if all the entries below the main diagonal are zero, it is an upper triangular matrix.

Triangular matrices are widely used in linear algebra calculations, because inverting a triangular matrix, calculating its determinant, or even solving systems of linear equations with these types of matrices is much easier than with matrices that have non-zero elements in all positions.

Upper triangular matrix

Upper triangular matrices are square matrices whose entries below the main diagonal are zero.

Example of a 3×3 dimension upper triangular matrix:

strictly upper triangular matrix of order 3

An upper triangular matrix is also called right triangular matrix and it is denoted with the letter U.

Lower triangular matrix

Lower triangular matrices are square matrices whose entries above the main diagonal are zero.

Example of a 3×3 dimension lower triangular matrix:

strictly lower triangular matrix of order 3

A lower triangular matrix is also called left triangular matrix and it is denoted with the letter L.

Examples of upper and lower triangular matrices

Once we’ve seen the meaning of upper and lower triangular matrix, we are going to see several examples of triangular matrices to fully understand the concept:

2×2 dimension upper triangular matrix

example of a 2x2 upper triangular matrix

3×3 dimension lower triangular matrix

example of a 3x3 lower triangular matrix

4×4 dimension upper triangular matrix

example of a 4x4 upper triangular matrix

Properties of upper and lower triangular matrices

The characteristics of both upper and lower triangular matrices are as follows:

  • The product of two upper triangular matrices is equal to one upper triangular matrix. And vice versa: multiplying two lower triangular matrices results in another lower triangular matrix.

\begin{pmatrix} 3 & 1 & 4 \\[1.1ex] 0 & -1 & 2 \\[1.1ex] 0 & 0 & 5 \end{pmatrix} \cdot \begin{pmatrix} 6 & 2 & 1 \\[1.1ex] 0 & 3 & 5 \\[1.1ex] 0 & 0 & 9 \end{pmatrix} = \begin{pmatrix}18&9&44\\[1.1ex] 0&-3&13\\[1.1ex]0&0&45\end{pmatrix}

See: multiplying matrices

  • The transpose of an upper triangular matrix is a lower triangular matrix, and vice versa: the transpose of a lower triangular matrix is an upper triangular matrix.

 \left.\begin{pmatrix} 1 & 2 & 6 & 3 \\[1.1ex] 0 & 9 & 4 & 1 \\[1.1ex] 0 & 0 & -2 & 8 \\[1.1ex] 0 & 0 & 0 & 7 \end{pmatrix}\right.^{\bm{T}} = \begin{pmatrix} 1 & 0 & 0 & 0 \\[1.1ex] 2 & 9 & 0 & 0 \\[1.1ex] 6 & 4 & -2 & 0 \\[1.1ex] 3 & 1 & 8 & 7 \end{pmatrix}

  • An upper or lower triangular matrix is invertible if all its elements on the main diagonal are nonzero. In such a case, the inverse of an upper (lower) triangular matrix is also an upper (lower) triangular matrix.

\left. \begin{pmatrix}1&0&0\\[1.1ex] -3&2&0\\[1.1ex] 2&4&3\end{pmatrix} \right.^{-1} =\begin{pmatrix}1&0&0\\[1.1ex] \frac{3}{2}&\frac{1}{2}&0\\[1.1ex] -\frac{8}{3}&-\frac{2}{3}&\frac{1}{3}\end{pmatrix}

Moreover, the main diagonal of the inverted matrix will always contain the reciprocals of the elements on the main diagonal of the original triangular matrix.

  • Any diagonal matrix is an upper triangular and a lower triangular matrix at the same time.
  • Obviously, the null matrix is also a lower and upper triangular matrix, because the elements above and below the main diagonal are 0:

\begin{pmatrix} 0 & 0 & 0 \\[1.1ex] 0 & 0 & 0 \\[1.1ex] 0 & 0 & 0 \end{pmatrix}

  • The eigenvalues of a triangular matrix are the elements on the main diagonal.

 \begin{pmatrix} 5 & 0 & 0 \\[1.1ex] 1 & 3 & 0 \\[1.1ex] 2 & 6 & -2 \end{pmatrix} \longrightarrow \ \lambda = -2 \ ; \ \lambda = 3 \ ; \ \lambda = 5

  • All upper and lower triangular matrices are diagonalizable.
  • Any square matrix can be factored into the product of a lower triangular matrix and an upper triangular matrix. That is, any matrix can be transformed into a multiplication of triangular matrices. Also, if the matrix is invertible, this transformation is unique. The LU decomposition method is often used to factor a matrix.

Determinant of a triangular matrix

The determinant of a triangular matrix, whether upper or lower triangular, is equal to the product of the entries on the main diagonal.

Note in the following solved exercise how you simply have to calculate the multiplication of the numbers on the main diagonal of the triangular matrix to find its determinant:

 \displaystyle \begin{vmatrix} 2 & 5 & -6 \\[1.1ex] 0 & 4 & 9 \\[1.1ex] 0 & 0 & 3 \end{vmatrix} = 2 \cdot 4 \cdot 3 = \bm{24}

This theorem can be easily proven: we just have to calculate the determinant of a triangular matrix by cofactors. The proof is detailed below using a generic triangular matrix:

 \begin{aligned} \begin{vmatrix} a & b & c \\[1.1ex] 0 & d & e \\[1.1ex] 0 & 0 & f \end{vmatrix}& = a \cdot \begin{vmatrix} d & e \\[1.1ex] 0 & f \end{vmatrix} - b \cdot \begin{vmatrix} 0 & e \\[1.1ex] 0 & f \end{vmatrix} + c \cdot \begin{vmatrix} 0 & d \\[1.1ex] 0 & 0 \end{vmatrix} \\[2ex] & =a \cdot (d\cdot f) - b \cdot 0 + c \cdot 0 \\[2ex] & = a \cdot d \cdot f \end{aligned}

On the other hand, we know that a matrix is invertible if its determinant is different from 0. Thus, if no element on the main diagonal is 0, the triangular matrix will also be an invertible matrix.

Triangularize a matrix

There are several theorems about triangularizable matrices. However, we are going to see how to triangularize a matrix by applying elementary transformations on the rows, like in the Gaussian elimination method.

For example:

\begin{pmatrix} 1 & 2 & 4 \\[1.1ex] 2 & -3 & 5 \\[1.1ex]1 & -1 & 6 \end{pmatrix} \begin{array}{c} \\[1.1ex] \xrightarrow{f_2 -2f_1}\\[1.1ex] \xrightarrow{f_3 -f_1} \end{array}  \begin{pmatrix} 1 & 2 & 4 \\[1.1ex] 0 & -7 & -3 \\[1.1ex] 0 & -3 & 2 \end{pmatrix}\begin{array}{c} \\[1.1ex]\\[1.1ex] \xrightarrow{7f_3 -3f_2} \end{array}  \begin{pmatrix} 1 & 2 & 4 \\[1.1ex] 0 & -7 & -3 \\[1.1ex] 0 & 0 & 23 \end{pmatrix}

Thus, the original square matrix has been triangularized.

Hessenberg matrix

The definition of the Hessenberg matrix is as follows:

A Hessenberg matrix is an “almost” triangular matrix, that is, all its elements below the first subdiagonal are zero (upper Hessenberg matrix) or all the elements above the first superdiagonal are zero (lower Hessenberg matrix).

Upper Hessenberg Matrix

 \left.\begin{pmatrix} 3 & 5 & 1 & 4 \\[1.1ex] 8 & 2 & 7 & 1 \\[1.1ex] 0 & 6 & 3 & 5 \\[1.1ex] 0 & 0 & 1 & 9 \end{pmatrix}

Lower Hessenberg Matrix

 \left.\begin{pmatrix} 2 & 4 & 0 & 0 \\[1.1ex] 1 & 9 & 6 & 0 \\[1.1ex] 3 & 5 & 1 & 2 \\[1.1ex] 8 & 2 & 3 & 7 \end{pmatrix}

A matrix that is both an upper and a lower Hessenberg matrix is a tridiagonal matrix .

This matrix was named in honor of Karl Hessenberg, an important German engineer and mathematician of the 20th century.

Finally, this type of matrix has the special property that if it is multiplied by a triangular matrix, the result is still a Hessenberg matrix.

Leave a Comment

Your email address will not be published. Required fields are marked *