Search for probability and statistics terms on Statlect
StatLect

Triangular matrix

by , PhD

A square matrix is said to be:

Triangular matrices often pop up in linear algebra and in the theory of linear systems. Therefore, it is worthwhile to study their properties in detail, which we do below.

Table of Contents

Definition

Formal definitions follow.

Definition A $K	imes K$ matrix $L$ is lower triangular if and only if $L_{ij}=0$ whenever $j>i$.

Remember that the main diagonal of a $K	imes K$ square matrix $L$ is the set of all the entries such that their row and column indices coincide, that is, the set[eq1]

Therefore, in a lower triangular matrix all the elements above the main diagonal (i.e., those whose column index $j$ is greater than the row index $i $) are zero.

Definition A $K	imes K$ matrix $U$ is upper triangular if and only if $U_{ij}=0$ whenever $j<i$.

Thus, in an upper triangular matrix all the elements below the main diagonal (i.e., those whose column index $j$ is less than the row index i) are zero.

Examples

Some examples of triangular matrices follow.

Example Consider the $3	imes 3$ matrix[eq2]The entries on the main diagonal are [eq3]The entries above the main diagonal are all zero:[eq4]Therefore, the matrix is lower triangular.

Example Define the $4	imes 4$ matrix[eq5]The entries on the main diagonal are [eq6]The entries below the main diagonal are all zero:[eq7]Therefore, the matrix is upper triangular.

The following sections report a number of properties satisfied by triangular matrices.

The transpose of a triangular matrix is triangular

Proposition The transpose of a lower triangular matrix is upper triangular.

Proof

Suppose that $L$ is lower triangular, so that $L_{ij}=0$ whenever $j>i$. By definition, the entries of the transpose $L^{	op }$ satisfy[eq8]Therefore, [eq9] whenever $j>i$. Hence, $L^{	op }$ is upper triangular.

Proposition The transpose of an upper triangular matrix is lower triangular.

Proof

Analogous to the previous one.

The product of two triangular matrices is triangular

Proposition The product of two lower triangular matrices is lower triangular.

Proof

Suppose that A and $B$ are two $K	imes K$ lower triangular matrices. We need to prove that[eq10]whenever $j>i$. But, when $j>i$, we have that[eq11]where: in step $rame{A}$ we have used the fact that $B_{kj}=0$ because $kleq i<j$; in step $rame{B}$ we have used the fact that $A_{ik}=0$ because $i<k$.

Proposition The product of two upper triangular matrices is upper triangular.

Proof

The proof is analogous to the previous one.

A triangular matrix is invertible if its diagonal entries are non-zero

Proposition A triangular matrix (upper or lower) is invertible if and only if all the entries on its main diagonal are non-zero.

Proof

Let us first prove the "only if" part. Suppose a $K	imes K$ lower triangular matrix $L$ has a zero entry on the main diagonal on row k, that is,[eq12]Consider the $k	imes K$ sub-matrix $B$ formed by the first k rows of $L$. The k-th column of $B$ is zero because $L_{kk}=0$, and all the columns to its right are zero because $L$ is lower triangular. Then, $B$ has at most $k-1$ non-zero columns. As a consequence, it has at most $k-1$ linearly independent columns. Thus, its column rank is at most $k-1$. Since row rank and column rank coincide, this implies that $B$ has at most $k-1$ linearly independent rows. As a consequence, the k rows of $B$ are not linearly independent. But the rows of $B$ are also rows of $L$. Therefore, the rows of $L$ are not linearly independent, $L$ is not full-rank and it is not invertible. To sum up, we have proved that if there is a zero entry on the main diagonal of $L$, then $L$ is not invertible. As a consequence, $L$ is invertible only if there are no zero entries on the main diagonal. We now need to prove the "if part" (if there are no zero entries on the main diagonal, then $L$ is invertible). We are going to prove it by contradiction. If $L$ is not invertible, then its rows are not linearly independent and one of them (suppose it is the k-th row) can be written as a linear combination of the other rows:[eq13]If there are other rows below $L_{kullet }$, with indices $k+1,ldots ,K$, then their coefficients in the linear combination must be zero. In particular, $lpha _{K}$ must be zero because the K-th row is the only one having a non-zero entry in the K-th column and $L_{kullet }$ has a zero entry in the K-th column. Therefore,[eq14]By the same token, $lpha _{K-1}$ must be zero because the $left( K-1
ight) $-th row is the only one in the linear combination having a non-zero entry in the $left( K-1
ight) $-th column and $L_{kullet }$ has a zero entry in the $left( K-1
ight) $-th column. Thus,[eq15]We repeat this reasoning until we deduce that [eq16]As a consequence,[eq17]But this is impossible because $L_{kullet }$ has a non-zero entry in the $k $-th column and [eq18] all have zero entries in that column. Thus, we have proved by contradiction that if all the diagonal entries of $L$ are non-zero, then no row of $L$ can be written as a linear combination of the others. As a consequence, the rows are linearly independent and $L$ is invertible. We have now proved the proposition for lower triangular matrices. The proof for upper triangular matrices is similar (replace columns with rows).

The inverse of a triangular matrix is triangular

Proposition If a lower (upper) triangular $K	imes K$ matrix $L$ is invertible, then its inverse is lower (upper) triangular. Furthermore, each entry on the main diagonal of $L^{-1}$ is equal to the reciprocal of the corresponding entry on the main diagonal of $L$, that is,[eq19]for $k=1,ldots ,K$.

Proof

Let $L$ be a $K	imes K$ lower triangular matrix. Denote by [eq20] the K columns of $L^{-1}$. By definition, the inverse satisfies[eq21]where I is the $K	imes K$ identity matrix. The columns of I are the K vectors [eq22] of the standard basis. The k-th vector of the standard basis $e_{k}$ has all entries equal to zero except the k-th, which is equal to 1. By the results presented in the lecture on matrix products and linear combinations, the K columns of $L^{-1}$ satisfy[eq23]for $k=1,ldots ,K$. This is a system of equations that can be written as[eq24]Note that the constants on the right-hand side are zero in all equations but the k-th. Since $L$ is invertible, its diagonal elements ([eq25]) are non-zero. Since $L_{11}
eq 0$, the first equation has solution $y_{1k}=0$. By plugging this solution into the second equation, we get $y_{2k}=0$ (because $L_{22}
eq 0$). Then, we solve the third equation, and so on, until we reach the k-th equation, where for the first time we find a non-zero solution $y_{kk}=1/L_{kk}$. Thus, the entries of the column vector $y_{ullet k}$ above the k-th row are all zero. But $y_{ullet k}$ is the k-th column of $L^{-1}$ and the statement holds true for all k. As a consequence, all the entries of $L^{-1}$ whose row index is less than the column index are zero. In other words, $L^{-1}$ is lower triangular. The proof for upper triangular matrices is analogous.

Triangular matrices and echelon form

This section explores the connection between triangular matrices and matrices in echelon form.

Proposition If an upper triangular matrix is invertible, then it is in row echelon form.

Proof

Remember that a matrix is said to be in row echelon form if and only if 1) all its non-zero rows have a pivot (i.e., a non-zero entry such that all the entries to its left and below it are equal to zero) and 2) all its zero rows are located below the non-zero rows. Suppose $U$ is an invertible upper triangular matrix. Then, $U$ has no zero rows because all its diagonal entries are non-zero. Furthermore, each row of $U$ contains a diagonal entry, which is a pivot because it is non-zero and it has only zeros below it and to its left. Therefore, $U$ is in row echelon form.

Proposition If a lower triangular matrix is invertible, then it is in column echelon form.

Proof

This is a straightforward consequence of the previous proposition. We just need to use the facts that: 1) the transpose of an upper triangular matrix is lower triangular; 2) the transpose of a matrix in row echelon form is in column echelon form.

Proposition If a square matrix is in row echelon form, then it is upper triangular.

Proof

Let $U$ be a square matrix in row echelon form. Scan the rows of $U$ from top to bottom in search of pivots. You will find a pivot on each row until you get to the zero rows. Each pivot you find is below and to the right of the previous one. Therefore, the pivots are always to the right of the main diagonal. Entries to the left of the pivots must be zero. Therefore, a fortiori, entries to the left of the main diagonal are zero. Hence, $U$ is upper triangular.

Proposition If a square matrix is in column echelon form, then it is lower triangular.

Proof

This is an immediate consequence of the previous proposition. We just need to use the facts that the transpose of a matrix in row echelon form is in column echelon form and the transpose of an upper triangular matrix is lower triangular.

How to cite

Please cite as:

Taboga, Marco (2021). "Triangular matrix", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/triangular-matrix.

The books

Most of the learning materials found on this website are now available in a traditional textbook format.