Triangular Matrices

\( \) \( \) \( \)

Definition of a Upper Triangular Matrix

A square matrix is an upper triangular matrix if and only if all its entries below the entries in the main diagonal are equal to zero.
These are examples of upper triangular matrices.
Main diagonal entries are in red and all entries below them, in blue, are equal to zero.
\( A = \begin{bmatrix} \color{red}1 & 3 \\ \color{blue}0 & \color{red}{-3} \end{bmatrix} \)     \( B = \begin{bmatrix} \color{red}9 & -1 & -1\\ \color{blue}0 & \color{red}0 & 0\\ \color{blue}0 & \color{blue}0 & \color{red}{-5} \end{bmatrix} \)


Definition of a Lower Triangular Matrix

A square matrix is a lower triangular matrix if and only if all its entries above the entries in the main diagonal are equal to zero.
These are examples of lower triangular matrices.
Main diagonal entries are in red and all entries above them, in blue, are equal to zero.
\( A = \begin{bmatrix} \color{red}9 & \color{blue}0 \\ -9 & \color{red}2 \end{bmatrix} \)     \( B = \begin{bmatrix} \color{red}9 & \color{blue}0 & \color{blue}0\\ -1 & \color{red}{-1} & \color{blue}0\\ 0 & -6 & \color{red}3 \end{bmatrix} \)



Properties of the triangular Matrices

Some of the most important properties of the triangular matrices are given below.

  1.    The determinant of a triangular matrix is equal to the product of all entries in the main diagonal.
  2.    If \( A \) is an upper triangular matrix, its transpose is a lower triangular matrix. If \( A \) is an upper triangular matrix, its transpose is a lower triangular matrix.
  3.    The product of lower triangular matrices is a lower triangular matrix. The product of upper triangular matrices is an upper triangular matrix.
  4.    The sum (or difference) of lower triangular matrices is a lower triangular matrix. The sum (or difference) of upper triangular matrices is an upper triangular matrix.
  5.    A triangular matrix is invertible (has an inverse) if and only if none of its entries in the main diagonal is zero.
  6.    The inverse of an invertible upper triangular matrix is an upper triangular matrix. The inverse of an invertible lower triangular matrix is a lower triangular matrix.



Examples with Solutions

Example 1
Which of the following matrices is an upper triangular matrix, a lower triangular matrix or none?
a)    \( A = \begin{bmatrix} 0 & 0 & 0 \\ 1 & 0 & 0 \end{bmatrix} \)      b)    \( B = \begin{bmatrix} -2 & 0 & 1 \\ 0 & 0 & 1 \\ 0 & 0 & 1 \end{bmatrix} \)      c)    \( C = \begin{bmatrix} -1 & 0 & 0 & 0\\ 5 & -7 & 0 & 0\\ 5 & 4 & 2 & 0\\ 5 & 0 & 0 & 3 \end{bmatrix} \)      d)    \( D = \begin{bmatrix} 1 & 0 & 0 & 9\\ 4 & 1 & 0 & 0\\ 0 & -4 & 1 & 0\\ 0 & 0 & 0 & 0 \end{bmatrix} \)

Solution
a) None: Matrix \( A \) is not square and therefore is not triangular.
b) Upper: Matrix \( B \) is a square matrix with the main diagonal entries \( \{ -2, 0, 1 \} \). It is an upper triangular matrix because all its entries below the main diagonal entries are equal to zero.
c) Lower: Matrix \( C \) is a square matrix with the main diagonal entries \( \{ -1, -7, 2, 3 \} \). It is a lower triangular matrix because all its entries above the main diagonal entries are equal to zero.
d) None: Matrix \( D \) is a square matrix with the main diagonal entries \( \{ 1, 1, 1, 0 \} \). It is not a triangular matrix because entries not equal to zero are above \( 9 \) and below \( -4 \) the main diagonal entries.



Example 2
Find the determinant of each of the following matrices
a) \( A = \begin{bmatrix} 3 & 0 & 0 \\ 1 & -1 & 0 \\ -2 & 3 & 2 \end{bmatrix} \)      b) \( B = \begin{bmatrix} x & 0 & 1 \\ 0 & x+1 & 1 \\ 0 & 0 & x \end{bmatrix} \)      c) \( C = \begin{bmatrix} -1 & 0 & 0 & 0\\ 5 & -9 & 0 & 0\\ 5 & 4 & 7 & 0\\ 5 & 0 & 0 & 0 \end{bmatrix} \)

Solution
a) Matrix \( A \) is a lower triangular matrix and therefore its determinant is equal to the product of its entries in the main diagonal. Hence
\( Det(A) = (3)(-1)(2) = -6 \)
b) Matrix \( B \) is an upper triangular matrix and its determinant is is equal to the product of its entries in the main diagonal. Hence
\( Det(B) = x(x+1)x = x^3 + x^2\)
c) Matrix \( C \) is a lower triangular matrix and its determinant is is equal to the product of its entries in the main diagonal. Hence
\( Det(C) = (-1)(-9)(7)(0) = 0\)



Example 3
Find all real values of \( x \) for which the matrix \( A = \begin{bmatrix} x-1 & 0 & 0 & 0\\ 5 & x+1 & 0 & 0\\ 5 & 4 & x^2 + 5 & 0\\ 5 & 0 & x+2 & 3 \end{bmatrix} \) is not invertible.

Solution
The given matrix is a lower triangular matrix and its determinant is is equal to the product of its entries in the main diagonal. Hence
\( Det(A) = (x-1)(x+1)(x^2+5)(3) \)
Matrix \( A \) is not invertible if its determinant is equal to zero. The determinant of matrix \( A \) is equal to zero if one of the factors of \( Det(A) \) is equal to zero.
\( x - 1 = 0 \) gives the solution \( x = 1 \)
\( x + 1 = 0 \) gives the solution \( x = - 1 \)
\( x^2 + 5 = 0 \) has no real solutions
The values of \( x \) for which the given matrix is not invertible are \( -1 \) and \( 1 \).



Example 4
Find the inverse of matrix \( A = \begin{bmatrix} 1 & 0\\ 2 & -4 \end{bmatrix} \) and verify property 6 given above.

Solution
Use the formula of the inverse of a \( 2 \times 2 \) matrix \( \begin{bmatrix} x & y \\ z & w \\ \end{bmatrix}^{-1} = \dfrac{1}{xw - yz} \begin{bmatrix} w & - y \\ - z & x \\ \end{bmatrix} \) to find \( A^{-1} \)
\( A^{-1} = \dfrac{1}{-4} \begin{bmatrix} -1 & 0 \\ -2 & 1 \\ \end{bmatrix} = \begin{bmatrix} \dfrac{1}{4} & 0 \\ \dfrac{1}{2} & -\dfrac{1}{4} \\ \end{bmatrix} \)
Conclusion: Both \( A \) and its inverse are lower triangular matrices which verify property 6 above.


Example 5
Let \( A = \begin{bmatrix} 3 & 0 & 0\\ 5 & -2 & 0 \\ 9 & -2 & 4 \end{bmatrix} \), \( B = \begin{bmatrix} -2 & 0 & 0\\ 0 & -2 & 0 \\ -3 & 4 & -1 \end{bmatrix} \) and \( C = \begin{bmatrix} 7 & 0 & 0\\ -1 & 0 & 0 \\ 12 & -2 & 3 \end{bmatrix} \).
Which of the following matrices \( A , \; B ,\; C ,\; A B ,\; A C,\; A + C \) is invertible?


Solution
A matrix with a determinant not equal to zero in invertible.
\( Det(A) = (3)(-2)(4) = -24 \) , hence matrix \( A \) is invertible.
\( Det(B) = (-2)(-2)(-1) = -4 \) , hence matrix \( B \) is invertible.
\( Det(C) = (7)(0)(3) = 0 \) , hence matrix \( C \) is NOT invertible.
The determinant of the product of two matrices is equal to the product of their determinants
\( Det(A B) = Det(A) Det(B) = (-24)(-4) = 96 \) , hence matrix \( A B \) is invertible.
\( Det(A C) = Det(A) Det(C) = (-24)(0) = 0 \) , hence matrix \( A C \) is NOT invertible.

\( Det(A+C) = Det \left(\begin{bmatrix} 3 & 0 & 0\\ 5 & -2 & 0 \\ 9 & -2 & 4 \end{bmatrix} + \begin{bmatrix} 7 & 0 & 0\\ -1 & 0 & 0 \\ 12 & -2 & 3 \end{bmatrix} \right) \)

\( \quad \quad = Det \begin{bmatrix} 10 & 0 & 0\\ 4 & -2 & 0 \\ 21 & -4 & 7 \end{bmatrix} = (7) (-2) (7) = -98 \) , hence matrix \( A + C \) is invertible.



Questions (with solutions given below)

  • Part 1
    Matrices \( A \) and \( B \) are such that \( A B = B A = I \) where \( I \) is the identity matrix . Use any of the properties above to explain that if one of the matrices is a lower triangular, then the other one is also a lower triangular matrix.
  • Part 2
    Given the \( 2 \times 2\) matrices \( A = \begin{bmatrix} x^2 - 1 & & -5 \\ \\ 0 & & x \end{bmatrix} \) and \( B = \begin{bmatrix} y & & 0 \\ \\ -2 & & y^2-4 \end{bmatrix} \).
    Find all values of \( x \) and \( y \) such that the matrix \( A B \) is not invertible.
  • Part 3
    Let matrix \( A = \begin{bmatrix} - 1 & 3 & 7\\ 0 & c - 1 & 3 \\ 0 & 0 & c^2 - 7 \end{bmatrix} \). Find all real numbers \( c \) so that matrix \( A \) is singular.



Solutions to the Above Questions

  • Part 1

    According to the definition of the inverse matrix, if \( A B = B A = I \) where \( I \) is the identity matrix, then matrices \( A \) and \( B \) are inverses of each other.
    According to property 6 above, if \( A \) is a lower triangular matrix then its inverse \( B \) is also a lower triangular matrix and if \( B \) is a lower triangular its inverse \( A \) is also a lower triangular.

  • Part 2
    A matrix is invertible if its determinant is not equal to zero.
    \( Det(AB) = Det (A) Det (B) = (x^2-1)(x)(y)(y^2-4) \)
    Matrix \( A B \) is not invertible if any of the factors of \( Det(AB) \) is equal to zero.
    \( x^2 - 1 = 0 \) gives the solutions \( x = 1 \) and \( x = - 1 \)
    \( y^2 - 4 = 0 \) gives the solutions \( y = 2 \) and \( y = - 2\)
    Hence matrix \( A B \) is not invertible for any of these values of \( x\) or \( y \): \( x = 0, x = - 1 , x = 1 , y = 0 , y = - 2 , y = 2 \)

  • Part 3
    A square matrix is singular if and only if its determinant is equal to zero.
    \( Det(A) = -(1)(c-1)(c^2-7) \)
    \( Det(A) = 0 \) if
    \( c - 1 = 0 \) which gives \( c = 1 \)
    or
    \( c^2-7 = 0 \) which gives \( c = \sqrt 7 \) , \( c = - \sqrt 7 \)
    Matrix \( A \) is singular for: \( c = 1 \), \( c = \sqrt 7 \) or \( c = - \sqrt 7 \)

More References and links