If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Linear algebra>Unit 2

Lesson 6: More determinant depth

# Upper triangular determinant

The determinant of an upper triangular matrix. Created by Sal Khan.

## Want to join the conversation?

• Using the rule of Sarrus on a 3x3 it seems that this also works as a "lower triangular determinant" where the zeroes are above the main diagonal instead of below. Does this hold true in application for nxn?
• yes
• Does it matter whether or not you use a upper or lower triangular matrix to find the determinant? Will the sign of the answer be the same? Thanks.
• It does not matter, and the sign will be the same - the transpose of a lower triangular matrix is an upper triangular matrix and vice versa, and the determinant of the transpose of a matrix is the same as the determinant of that matrix. :)
• Is there an equivalent of sigma sum notation for multiplication, i.e. everything in the series is multiplied with each other?
• This confuses me. Someone please point out the flaw in my logic. If we know that row operations don't change the determinant and that the rref of an invertible matrix (which is a triangular matrix) is the identity matrix, wouldn't that mean that all invertible matrices have a determinant of 1? I know this isn't true which is why I want someone to point out the mistake in my logic.
• As already noted above, some row operations (multiplying the row by a scalar) DO change the determinant, and you'll probably have to use those operations to get the reduced echelon form.
• What if in a 4x4 matrix the elements of the diagnol other than main diagnol are say a,b,c,d and everything else is a zero?
• This might be a stupid question, but is the takeaway here that upper triangular matrices always have a determinant?
• a matrix -has- a determinate if it's an NxN square matrix with rank N. theres several different ways of finding this out.
• You could have shown the Sarrus-expansion to prove that all diagonals except the one from (1,1) to (3,3) would zero out!
• Remember that only works for 3x3 determinants.
(1 vote)
• is this possible by this method to find the determinant of 5 x 5 or 6 x 6?
(1 vote)
• There is a video in Pre-calc on how to find the determinant of a n x n matrix.
(1 vote)
• at i think Sal is supposed to say row?
(1 vote)
• what happens when I get a row of zeroes? I'm working on a particular question where I need to find the determinant. Clearly with a row of zeroes, the product of the diagonal will equal zero, however when I use the laplace expansion on the same matrix, I get -2. Any thoughts on this?
(1 vote)
• Double-check your work is the obvious answer. If the determinant is non-zero, you shouldn't get a row of zeros. It would help to know what you started with and how you got to the row of zeros.
(1 vote)

## Video transcript

Let's say I have a matrix where everything below the main diagonal is a 0. And I'll start-- just for the sake of argument, let's start with a 2 by 2 matrix. I have the values a, b, 0, and d. Instead of a c, I have a 0 there, so everything below the main diagonal is a 0. What is the determinant of this going to be? Let's call that matrix a. The determinant of a is going to be equal to ad minus b times 0. That's just a 0, so you don't have to write it. It's equal to a times d. Now, let's say I have another matrix. Let's call it b. We'll say it's a 3 by 3 matrix. And let's say its entries are a, b, c. We've got a 0 here. Then you-- let's say you have a d here, e, then you have another 0 here, another 0 here, and you have an f. Once again, all of the entries below the main diagonal are 0. What's this guy's determinant? Well, we learned several videos ago that you can always pick the row in the column that has the most 0's on it. That simplifies your situation. Let's find the determinant along this column right here. The determinant of b is going to be equal to a times the submatrix if you were to ignore a's row and column. a times the determinant of d, e, 0, f, and then minus 0 times its submatrix. You could cancel out-- or times the determinant of its submatrix, that row and that column. You'd get b, c, 0, f. And then you have plus 0 times-- you get rid of that row, that column, you get b, c, d, e. Obviously, these two guys are going to be 0. I don't care what these 2 by 2 matrices-- what their determinants end up evaluating to. These are both going to be equal to 0, because we're multiplying by 0. We're left with a times the determinant of this, and the determinant of this is pretty straightforward. We're going to have-- it's just going to be equal to a times the determinant of this, which is df minus 0 times e. It's just going to be df. The determinant of b is adf. Notice that the determinant of a was just a and d. Now, you might see a pattern. In both cases we had 0's below the main diagonal, right? This was the main diagonal right here. And when we took the determinants of the matrix, the determinant just ended up being the product of the entries along the main diagonal. And if you think that that's a general trend that always applies, you are correct. We can do it in the general case. Let's do it with our general case. Let's say we have some matrix, a, and it is equal to a, 1, 1. And you have a, 2, 2. You're going to have a 0 right there. And then you just keep going all the way down to a, n, n. In this row, everything's going to be a 0, except for that last column. This is all a 0 right here. So everything below the main diagonal is a 0, just like this one, but we're doing it in the general n by n case. And everything up here is-- well, it doesn't have to be 0. This is a, 1, 2, all the way to a, 1, n. This is a, 2, n. Keep going down. So everything at the main diagonal or above isn't necessarily equal to 0. If you wanted to find the determinant of a, we could do the same thing we did here. We could go down that first row right there. The determinant of our matrix, a, is equal to this guy-- a, 1, 1-- times the determinant of its submatrix. That's going to be a, 2, 2. It goes all the way to a, 2, n, and then a, 3, 3, all the way to a, n, n. And then, everything down here is-- these are all 0's. Once again, we have another situation where all of the entries below the main diagonal are 0. What's the determinant of this guy right here? And what-- you might say hey, what about the rest of that row? Well, the rest of the row is just a bunch of 0's, just like we had here. 0 times the determinant of its submatrix, and then that would be a minus and a plus. 0 times the determinant of its submatrix, so on and so forth. We just have to pay attention to this term right there. Now, the same argument we can do here. To find this determinant, we can just go down that row. The determinant of this is just going to be equal to-- let's write out-- let's not forget our a, 1, 1 out there. The determinant of this is going to be a, 2, 2 times the determinant of its submatrix. Get rid of its row and its column, and you're just left with a, 3, 3 all the way down to a, n, n. Everything up here is non-zero, so its a, 3n. Then everything below the diagonal, once again, is just a bunch of 0's. Everything down here is a bunch of 0's. This is another of what we call an upper triangular matrix. Let me write that down. This whole class, where you have 0's below the main diagonal, these are called upper triangular matrices. Matrices, just like that. Now, we keep doing the process over and over again. If you just keep following this pattern over and again, now you're going to have the determinant of this is a, 3, 3 times its submatrix. And every time, the submatrix is getting smaller and smaller. You'll eventually get to a, 1, 1 times a, 2, 2 times-- all the way to an minus 2 times a 2 by 2 matrix over here. This is going to be an minus 1, n minus 1, an. Then this is going to be a sub n minus 1, n. Then you're going to have a 0 right here. It's just the bottom right-hand corner of our original matrix, is what you're going to be left with. And what is the determinant of this? Well, it's just the product of these two things. It's just this guy times this guy minus this guy times that guy, but that's just 0. The determinant of a ends up becoming a, 1, 1 times a, 2, 2, all the way to a, n, n, or the product of all of the entries of the main diagonal. Which is a super important take away, because it really simplifies finding the determinants of what would otherwise be really hard matrices to find the determinants of. You could imagine if this was a 100 by 100 matrix. Now, we could just multiply the diagonal. Just to make sure that things are clear, let me do an example. Let's say we find the determinant of 7, 3, 4, 2. So we have 0's here. This is a minus 2, 1, and a 3, a 0 here-- sorry, we don't want 0's there. We don't need to have 0's there. 6, 7-- we actually could have 0's there, but we don't need to have 0's there. And a 0 there, and we have 0's there. Just like that. So its upper triangular matrix-- if you want to evaluate this determinant, you just multiply these entries right here. The determinant is equal to 7 times minus 2 times 1 times 3. So it's 7 times minus 6 which is equal to minus 42. And it's that easy.