Claim: An upper triangular matrix A is invertible if and only if all of its diagonal elements are nonzero.
Proof: The proof follows in three parts.
Claim: If all the diagonal elements of an upper triangular matrix A are nonzero then the matrix A is invertible.
Proof:
If A is invertible, then there exists a matrix X such that

where X = A-1.
Element yij of the result matrix Y = XA is defined as

where n is the dimensionality of the n × n matrix A.
Since Y = I,

Thus there exist three cases to satisfy: i = j, i < j, and i > j, which shall be considered in turn.
In the first case, i = j

For k > i, aki = 0 because A is upper triangular and therefore

By setting xik to 0 when k < i it follows that

which is satisfied by setting xii to
. Therefore by setting xik to 0 when k < i and by setting xii to
the
correct value for yij when i = j is obtained.
Now consider the second case, namely i < j

from the argument for the i = j case, xik = 0 when k < i, and when k > j, akj = 0 because A is upper triangular, so

this can be rewritten as

and therefore by setting

it follows that

and so for i < j, yij
0 has been satisified.
The third case occurs when i > j

Now, from the i = j case, when k < i, xik = 0, but since in this third case i > j, or in other words j < i, it follows that when

xik = 0, and so for k ≤ j, xik = 0. But for k > j, akj = 0 because A is upper triangular and therefore

because for k ≤ j, xik = 0 and for k > j, akj = 0. Which means thta when i > j, yij
0 is satisfied.
Thus it has been shown how to set the elements of X to satisfy the identity XA = I, and therefore if all of the diagonal elements of an upper triangular matrix A are nonzero, it follows that A is invertible, being what it was required to prove.
Claim: If an upper triangular matrix A is invertible, then all of its diagonal elements are nonzero.
Proof:
First observe that to say A is invertible is to say that there exists a matrix X such that

The proof that if A is invertible then all its diagonal elements are nonzero, is inductive and proceeds from the following claim.
If app is nonzero and for all j ≤ p it is true that xij = 0 when i > j then a(p+1)(p+1) is nonzero and for all j ≤ (p + 1) it is true that xij = 0 when i > j.
For the base case a11 it is necessary to show that a11 is nonzero and that for all j ≤ 1, xij = 0 when i > j. Subsequent proof of the inductive step will establish proof of the original claim, namely that all the diagonal elements of A are nonzero.
Consider the element y11 of the result matrix XA

Since A is upper triangular, when k > 1, ak1 = 0 therefore

Both a11 and x11 must be nonzero for the result to be equal to 1, therefore a11 is nonzero.
Now to show that for j ≤ 1, xij = 0 when i > j. Consider the case for j < 1, and assume that the claim is false,
this means that there exists an i > j, where j < 1 such that xij
0, however there exists no such xij since
there is no j < 1 and therefore the assumption is false and it is true that for j < 1, xij = 0 when
i > j.
Consider the case when j = 1, it must be shown that when i > j, xij = 0. This is demonstrated by considering
the elements yi1 for i > 1, in this case yij
0 because i
j.

However, as before, when k > 1, ak1 = 0 because A is upper triangular and therefore

but a11 was already shown to be nonzero and hence xi1
0. Therefore for i > j, xi1 = 0.
Thus, the base case, namely that a11
0 and that for j ≤ 1, xij = 0 when i > j, has been proven.
It is now necessary to demonstrate that the inductive step holds. It is required to show that if
app
0 and for j ≤ p, xij = 0 when i > j, that a(p+1)(p+1)
0 and for j ≤ (p + 1), xij = 0 when
i > j.
Assuming then that the precondition holds, namely that app is nonzero and that for j ≤ p, xij = 0 when i > j, consider the element y(p+1)(p+1) which must be equal to 1

it was claimed that for j ≤ p, xij = 0 when i > j, therefore in the sum above, for k ≤ p, x(p+1)k = 0 since (p + 1) is greater than k in each case, therefore

however when k > (p + 1), ak(p+1) = 0 since A is upper triangular, and therefore

both terms must thus be nonzero and thus it has been shown that a(p+1)(p+1) is nonzero.
Now it is necessary to show that for j ≤ (p + 1), it is true that xij = 0 when i > j. For j ≤ p it was already established that xij = 0 when i > j by the induction step precondition, therefore it has already been shown that for j < (p + 1), xij = 0 when i > j and need only be shown for j = (p + 1). Consider the elements yi(p+1) when i > (p + 1), it is necessary to show that these elements each equal 0

since in each case i > (p + 1), for k ≤ p, xik = 0 and therefore

however when k > (p + 1), ak(p+1) = 0 because A is upper triangular and therefore

yet a(p+1)(p+1)
0 and therefore xi(p+1)
0 for i > (p + 1) and hence it has been shown that when
i > j, xi(p+1) = 0. Therefore for j ≤ (p + 1), xij = 0 when i > j and the induction step has been
proven.
Therefore when an upper triangular matrix A is invertible, all of its diagonal elements are nonzero, being what it was required to prove.
Note, that this induction also proves that if an upper triangular matrix A is invertible, then the inverse X will also be upper triangular since the induction shows that for j ≤ n, xij = 0 when i > j (n is the size of the n×n matrix A).
It was shown first that if all of the diagonal elements of an upper triangular matrix A are nonzero, then that matrix A is invertible.
It was shown second that if an upper triangular matrix A is invertible, then all of its diagonal elements are nonzero.
Thus what was set out to prove has been established, namely that, an upper triangular matrix A is invertible if and only if all of its diagonal elements are nonzero.
Q.E.D