search
Search
Login
Unlock 100+ guides
menu
menu
web
search toc
close
Comments
Log in or sign up
Cancel
Post
account_circle
Profile
exit_to_app
Sign out
What does this mean?
Why is this true?
Give me some examples!
search
keyboard_voice
close
Searching Tips
Search for a recipe:
"Creating a table in MySQL"
Search for an API documentation: "@append"
Search for code: "!dataframe"
Apply a tag filter: "#python"
Useful Shortcuts
/ to open search panel
Esc to close search panel
to navigate between search results
d to clear all current filters
Enter to expand content preview
icon_star
Doc Search
icon_star
Code Search Beta
SORRY NOTHING FOUND!
mic
Start speaking...
Voice search is only supported in Safari and Chrome.
Navigate to
check_circle
Mark as learned
thumb_up
0
thumb_down
0
chat_bubble_outline
0
Comment
auto_stories Bi-column layout
settings

Comprehensive Guide on Triangular Matrices

schedule Aug 10, 2023
Last updated
local_offer
Linear Algebra
Tags
mode_heat
Master the mathematics behind data science with 100+ top-tier guides
Start your free 7-days trial now!
Definition.

Upper triangular matrix

An upper triangular matrix is a square matrix whose elements below the diagonal are all zeros, that is:

A=(a11a12a13a1n0a22a23a2n00a33a3n000ann)

Note that any of the entries (e.g. a11, a23) can be zero as well.

Example.

Upper triangular matrices

The following matrices are all examples of upper triangular matrices:

(3402),(340029008),(342001008),(1000010000100001)
Definition.

Lower triangular matrix

A lower triangular matrix is a square matrix whose elements above the diagonal are all zeros, that is:

A=(a11000a21a2200a31a32a330an1an2an3ann)

Again, any of the entries (e.g. a21, a33) can be zero as well.

Example.

Lower triangular matrices

Below are some examples of lower triangular matrices:

(2013),(300120054),(300100254),(1000010000100001)
Definition.

Triangular matrices

A matrix that is either an upper or lower triangular matrix is called a triangular matrix.

Theorem.

Transpose of a triangular matrix

The following statements are true:

  • If A is an upper triangular matrix, then AT is a lower triangular matrix.

  • If A is a lower triangular matrix, then AT is an upper triangular matrix.

Moreover, the diagonal entries of a triangular matrix will remain the same after taking its transpose.

Proof. Let A be an upper triangular matrix:

(1)A=(a11a12a13a1n0a22a23a2n00a33a3n000ann)

We now take the transpose of A to get:

(2)AT=(a11000a12a2200a13a23a330a1na2na3nann)

Notice that AT is a lower triangular matrix. Now, consider the case when A is a lower triangular matrix of the form (2). Taking the transpose of A gives us (1), which means that AT is an upper triangular matrix.

Finally, since triangular matrices are square by definitionlink, taking their transpose does not change the diagonal entries by propertylink. This completes the proof.

Theorem.

Determinant of an upper triangular matrix

The determinant of an upper triangular matrix is equal to the product of its diagonal entries, that is:

A=(a11a12a13a1n0a22a23a2n00a33a3n000ann)det(A)=a11a22a33ann

Proof. We will prove this by induction. Consider the base case in which our upper triangular matrix is 2×2 like so:

A=(a11a120a22)

The determinant of A is:

det(A)=a11det(a22)=a11a22

Therefore, the theorem holds for the base case. Now, we assume that the theorem holds for the (n1)×(n1) case. Our goal is to show that the theorem holds for the n×n upper triangular matrix:

A=(a11a12a13a1n0a22a23a2n00a33a3n000ann)

We compute the determinant of A by cofactor expansionlink along the first column:

det(A)=a11|a22a23a2n0a33a3n00ann|

Notice how we are finding the determinant of an (n1)×(n1) matrix on the right-hand side. We now use the inductive assumption that the theorem holds for the (n1)×(n1) case:

det(A)=a11(a22a33ann)=a11a22a33ann

By the principle of mathematical induction, the theorem therefore holds for the general case. This completes the proof.

Theorem.

Determinant of a lower triangular matrix

The determinant of a lower triangular matrix is equal to the product of its diagonal entries, that is:

A=(a11000a21a2200a31a32a330an1an2an3ann)det(A)=a11a22a33ann

Proof. Let A be a lower triangular matrix. with diagonal entries a11, a22, , ann. By theoremlink, the transpose of A is an upper triangular matrix. Now, by theoremlink, we know that the determinant of an upper triangular matrix is equal to the product of its diagonal entries. Because A is a square matrix, the diagonal entries of A and AT are the same. This means that det(AT) is:

det(AT)=a11a22ann

Next, by theoremlink, we have that det(AT)=det(A) and so:

det(A)=a11a22ann

This means that the determinant of a lower triangular matrix is also equal to the product of its diagonal entries! This completes the proof.

Theorem.

Determinant of a triangular matrix is equal to the determinant of its transpose

If A is a triangular matrix, then:

det(AT)=det(A)

Proof. If A is a triangular matrix, then its determinant is equal to the product of its diagonal entries by theoremlink and theoremlink. Taking the transpose of a square matrix does not change its diagonal entries by theoremlink, which means that the diagonal entries of AT are the same as those of A. Therefore, the determinant of AT is equal to the determinant of A. This completes the proof.

Theorem.

Product of two triangular matrices is also a triangular matrix

The following statements are true:

  • the product of two upper triangular matrices is an upper triangular matrix.

  • the product of two lower triangular matrices is a lower triangular matrix.

Proof. We will prove the first statement and then use it to prove the second statement. Consider the following two upper triangular matrices:

A=(a11a12a13a1n0a22a23a2n00a33a3n000ann),B=(b11b12b13b1n0b22b23b2n00a33b3n000bnn)

The product AB is:

(3)AB=(a11a12a13a1n0a22a23a2n00a33a3n000ann)(b11b12b13b1n0b22b23b2n00b33b3n000bnn)

To show that AB is an upper triangular matrix, we must show that the k-th entry of the i-th row of AB, denoted by (AB)ik, is equal to zero when k<i. From basic matrix multiplication, (AB)ik is:

(AB)ik=j=1naijbjk

Now, consider the case when k<i. By definition, we have that:

  • since A is an upper triangular matrix, aij=0 for i>j.

  • since B is an upper triangular matrix, bij=0 for i>j.

Let's now compute the summation:

(AB)ik=j=1naijbjk=(ai1b1k)+(ai2b2k)++(aikbkk)+(ai(k+1)b(k+1)k)++(ainbnk)=(0b1k)+(0b2k)++(0bkk)+(ai(k+1)0)++(ain0)=0

Therefore, AB is an upper triangular matrix.

Now, let's prove the second statement that the product of two lower triangular matrices is also a lower triangular matrix. Suppose matrices A and B are lower triangular matrices. By theoremlink, we have that:

(4)(AB)T=BTAT

By theoremlink, the transpose of a lower triangular matrix is an upper triangular matrix. Therefore, BT and AT are both upper triangular matrices. We have just proven that the product of two upper triangular matrices is an upper triangular matrix and thus BTAT is an upper triangular matrix.

We now take the transpose of both sides of (4) to get:

AB=(BTAT)T

Since BTAT is an upper triangular matrix, its transpose is a lower triangular matrix by theoremlink. This proves that AB is a lower triangular matrix. This completes the proof.

NOTE

We could have explicitly computed AB in (3) to get:

(a11b11a11b12+a12b22a11b13+a12b23+a13b33a11b1n+a12b2n+a13b3n++a1nbnn0a22b22a22b23+a23b33a22b2n+a23b3n++a2nbnn00a33b33a33b3n++a3nbnn000annbnn)

Clearly, we can observe that AB is an upper triangular matrix. However, this proof is not rigorous because it is based merely on observation.

Theorem.

Triangular matrix is invertible if and only if every diagonal entry is non-zero

Let A be a triangular matrix. A is invertible if and only if every diagonal entry of A is non-zero.

Proof. We first prove the forward proposition. Assume A is an invertible n×n upper triangular matrix. We will prove the case for a lower triangular matrix later.

Consider the following homogeneous system:

Ax=0

We can express this in matrix form like so:

(5)(a11a12a13a1n0a22a23a2n00a33a3n000ann)(x1x2x3xn)=(0000)

By theoremlink, since A is invertible, Ax=0 has only the trivial solution of x=0.

Now, let's assume one of the diagonals aii is 0 while the other diagonal entries are all non-zero. The i-th row of the system (5) can be written as the following linear equation:

(6)aiixi+ai(i+1)xi+1+ai(i+2)xi+2++ainxn=0

We can solve for xi+1, xi+2, , xn using the linear equations below row i. For instance, to solve for xn, we focus on the last linear equation. Since ann can be any number except zero, the following holds:

annxn=0xn=0

Substituting xn into the second-last linear equation of (5) gives:

an(n1)xn1+annxn=0an(n1)xn1=0xn1=0

We repeat this process until we get xi+1=xi+2==xn=0. Therefore, (6) becomes:

aiixi=0

However, because we have assumed that aii is zero, xi can be any value and is no longer restricted to xi=0. This contradicts the fact that x in Ax=0 must be the zero vector. Therefore, we conclude that if A is an invertible upper triangular matrix, then every diagonal entry of A must be zero.

* * *

Let's now prove the converse. Assume that A is an upper triangular matrix and that every diagonal entry of A is non-zero. By theoremlink, the determinant of an upper triangular matrix is equal to the product of its diagonal entries:

det(A)=a11a22ann

Since every diagonal entry of A is non-zero, we have that det(A)0. By theoremlink, we conclude that A is invertible. We have now managed to prove the theorem for upper triangular matrices.

* * *

Let's now prove that the theorem also holds for lower triangular matrices. Let A be an n×n lower triangular matrix. Assume A is invertible. By theoremlink, AT is an upper triangular matrix. Because A is invertible, AT is also invertible by theoremlink. We have just proven that if AT is an upper triangular matrix, then every diagonal entry of AT is non-zero. Because taking the transpose of a square matrix does not change its diagonal entries, we conclude that every diagonal entry of A is non-zero.

We now prove the converse. Let A be an n×n lower triangular matrix. Assume every diagonal entry of A is non-zero. By theoremlink, the determinant of A is:

det(A)=a11a22ann

Since every diagonal entry of A is non-zero, we have that det(A)0. By theoremlink, we conclude that A is invertible.

We have now shown that the theorem holds for both upper and lower triangular matrices. This completes the proof.

Theorem.

Inverse of a triangular matrix is also triangular with the diagonal entries becoming reciprocals

The following statements are true:

  • if A is an invertible upper triangular matrix, then A1 is also an upper triangular matrix.

  • if B is an invertible lower triangular matrix, then A1 is also a lower triangular matrix.

Specifically, the diagonal entries of the inverse matrix are the reciprocals of the diagonal entries of the original matrix.

Proof. Let's start by proving the first statement. We assume A is an invertible upper triangular matrix. Since A is invertible, A1 exists. Let's express A1 as a collection of column vectors:

(7)A1=(|||x1x2xn|||)

Now, the product AA1 is:

AA1=A(|||x1x2xn|||)=(|||Ax1Ax2Axn|||)

Where the second equality holds by theoremlink. By definitionlink of invertibility, we have that AA1=In. This means that:

(|||Ax1Ax2Axn|||)=(|||e1e2en|||)

Where e1, e2, , en are the standard basis vectors of Rn. Equating the columns gives:

Ax1=e1Ax2=e2Axn=en

Let's focus on the first equation Ax1=e1. In matrix form, this is:

(a11a12a13a1n0a22a23a2n00a33a3n000ann)(x11x12x13x1n)=(1000)

The corresponding system of linear equations is:

(8)a11x11+a12x12+a13x13++a1nx1n=1a22x12+a23x13++a2nx1n=0a33x13++a3nx1n=0a(n1)(n1)x1(n1)+a(n1)nx1n=0annx1n=0

Focus on the last equation. Since any entry aij can be any value, the only way for the equation to hold is if x1n=0. Next, we substitute x1n into the second-last equation and conclude that x1(n1)=0 using the same logic. We keep on repeating this to conclude that:

(9)x12=x13==x1n=0

Now, we substitute (9) into the first equation of (8) to get:

a11x11=1x11=1a11

Next, we focus on Ax2=e2. The matrix form is:

(a11a12a13a1n0a22a23a2n00a33a3n000ann)(x21x22x23x2n)=(0100)

The corresponding linear system is:

(10)a11x21+a12x22+a13x23++a1nx2n=0a22x22+a23x23++a2nx2n=1a33x23++a3nx2n=0a(n1)(n1)x2(n1)+a(n1)nx2n=0annx2n=0

Again, we perform the same steps to conclude:

x23==x2n=0

Substitute this into the second equation of (10) to get:

a22x22=1x22=1a22

In general, for the system Axk=ek, we have:

xk(k+1)=xk(k+2)==xkn=0

The value of a diagonal entry is:

akkxkk=1xkk=1akk

The inverse matrix of A defined as (7) is therefore:

A1=(x11x21x31xn10x22x32xn200x33xn3000xnn)=(1/a11x21x31xn101/a22x32xn2001/a33xn30001/ann)

This means that A1 is an upper triangular matrix.

* * *

Let's now prove the second statement. Let A be an invertible lower triangular matrix. By theoremlink, AT is an upper triangular matrix. We have just proven that the inverse of an upper triangular matrix is also an upper triangular matrix, that is, (AT)1 is an upper triangular matrix. Now, recall the following theoremlink:

(AT)1=(A1)T

Therefore, (A1)T is an upper triangular matrix. This means that A1 is a lower triangular matrix by theoremlink. This completes the proof.

Theorem.

Diagonal entries of the product of two triangular matrices

Let A and B be both n×n lower or upper triangular matrices in which:

  • the diagonal entries of A are a11, a22, , ann.

  • the diagonal entries of B are b11, b22, , bnn.

The diagonal entries of the product AB are a11b11, a22b22, , annbnn.

Proof. We will first prove the case for when matrices A and B are upper triangular matrices. For reference, the product AB is:

AB=(a11a12a13a1n0a22a23a2n00a33a3n000ann)(b11b12b13b1n0b22b23b2n00b33b3n000bnn)

By definition, we have that:

  • since A is an upper triangular matrix, aij=0 for i>j.

  • since B is an upper triangular matrix, bij=0 for i>j.

Let's now compute the summation. The diagonal entries of AB are:

(AB)ii=j=1naijbji=ai1b1i+ai2b2i++aiibii+ai(i+1)b(i+1)i++ainbni=(0)b1i+(0)b2i++aiibii+ai(i+1)(0)++ain(0)=aiibii

This shows that the theorem holds for upper triangular matrices.

* * *

Let's now prove the case for when A and B are lower triangular matrices. By theoremlink, we have that:

(11)(AB)T=BTAT

By theoremlink, BT and AT are upper triangular matrices. Since B and A are square matrices, BT and AT have the same diagonals as B and A respectively. We have just proven that the diagonals of the product of two upper triangular matrices, BTAT, is aiibii for i=1,2,,n. We now take the transpose of (11) and conclude that the diagonal entries of AB are also aiibii for i=1,2,,n.

This completes the proof.

robocat
Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
thumb_up
thumb_down
Comment
Citation
Ask a question or leave a feedback...