Main content
Linear algebra
Course: Linear algebra > Unit 2
Lesson 5: Finding inverses and determinantsDeterminants along other rows/cols
Finding the determinant by going along other rows or columns. Created by Sal Khan.
Want to join the conversation?
- Is it possible to find the determinant by going down the diagonal?(10 votes)
- Yes, and no. One method of finding the determinant of an nXn matrix is to reduce it to row echelon form. It should be in triangular form with non-zeros on the main diagonal and zeros below the diagonal, such that it looks like:
[1 3 5 6]
[0 2 6 1]
[0 0 3 9]
[0 0 0 3] pretend those row vectors are combined to create a 4x4 matrix. Once it is in that form so that it appears like:
1 3 5 6
0 2 6 1
0 0 3 9
0 0 0 3
Then the determinant = the product of the entries along the diagonal, such that determinant = (1)(2)(3)(3) = 18.
Note* if the main diagonal contains a zero the determinant is also 0, thus the matrix is not invertible.
Hope that was clear enough to help.(21 votes)
- Am I the only one that doesn't see why it works going down any row or column, and why you need to switch signs?(5 votes)
- Let's start with a 3x3 determinant.
|a₁ a₂ a₃|
|b₁ b₂ b₃|
|c₁ c₂ c₃|
If we multiply it out, we get:a₁b₂c₃ - a₁b₃c₂ + a₂b₃c₁ - a₂b₁c₃ + a₃b₁c₂ - a₃b₂c₁
Notice how each term has an a, b, and c in it and also has a 1, 2, and 3 in it. This is why it works to use any row or column. Whichever row or column you use is the one you're factoring out. So, let's say we want to use the 2 column. In doing so, we factor out all of the 2's:a₂(b₃c₁-b₁c₃) + b₂(a₁c₃-a₃c₁) + c₂(a₃b₁-a₁b₃)
Notice that in each of the parenthesis, we have the equation of a 2x2 determinant now. However, 2 of them go 31-13 while the other goes 13-31. If we want it to be the determinant of a sub-matrix, we need them to be in the order 13-31, so we get:-a₂(b₁c₃-b₃c₁) + b₂(a₁c₃-a₃c₁) - c₂(a₁b₃-a₃b₁)
This is why it switches signs depending on which column or row you choose.(6 votes)
- Time stamp not showing for me, but at about 25% Sal give the formula Sign(i, j) = -1^(i+j). That should be written (-1)^(i+j) so the negative will also be raised to the power.(5 votes)
- If having 0s make finding the determinant easier, is it better to reduce it to rref first and then take the dets?(3 votes)
- Yes, but each row operation changes the determinant by some scalar factor, and you have to keep track of all of the factors.(2 votes)
- if the entries are variables instead of number should we use the same process??(2 votes)
- Yes. You treat the variable just as you would the mathematical object it represents.(3 votes)
- Can you find this on a graphing calculator?(1 vote)
- Yes. You can do it on a graphic calculator...I have a Casio ClassPad. And all I have to do is type in the matrix and demand the determinant. However, exams and lecturers require us to be able to do these problems without a calculator...so I think its better to learn this method anyways(4 votes)
- So the row or column that you choose to perform the cofactor expansions will be your pivot row to perform row or column operations from? Or can you switch your pivot row or column at any time during the process? Will that effect the process of computing the determinant?(1 vote)
- Once you pick a row (or column), you must find all the products that start with an element from that row (or column).(1 vote)
- For this method, could we also use coloumn or row reduction to for example, get a row of [1 2 0 0] into [1 0 0 0] by doing C2 - 2C1 = C2 and then go about your method?(1 vote)
- The determinant of a row reduced matrix must be the same (or at least both 0 or both non 0) as the one for the original, because either both A and rref(A) are invertible or neither is.(1 vote)
- The videos in this section are beautiful. Excellent this one too, I didn't know you could keep changing where you did the determinant. I usually chose one row for the overall determinant and all the "inner" determinants on the same row.(1 vote)
Video transcript
In the last video, we evaluated
this 4 by 4 determinant and we found out
that it was equal to 7. And the way we did it is we
went down this first row. We used the definition I gave
you in the last few where use this first row. I could even write it here. We said this is equal
to 1 times the determinant of 0, 2, 0. 1, 2, 3. 3, 0, 0. Minus 2 times the determinant. You cross these guys. Cross that row and column out. 1, 0, 2. 1, 0, 2. 2, 2, 0. 0, 3, 0. And then we went to the plus
the 3 times its sub matrix. I don't have to figure
that out. Just cross out that row
and that column. And then minus 4-- just keep
switching the sign-- times the determinant of its sub matrix. So this one had a bunch of
terms. And this one's going to have a bunch of terms. Cross
that row and that column out. You get 1, 0, 2. 0, 1, 2. 2, 3, 0. I'll just write it here. 1, 0, 2. 0, 1, 2. 2, 3, 0. And that is a completely
legitimate way to figure out a determinant. And that was our definition for
how to find a determinant. But I want to show you in this
video that there's more than one way to solve for
determinant. What I'm going to show you this
way is the same thing that we did down
this first row. We can actually do down any
row or any column of this determinant, or of
this matrix. And the reason why that's useful
is because we can pick rows or columns that
have a unusually large number of zeros. Because that tends to simplify
our computations. So the first thing that you have
to do before you embark on picking an arbitrary row or
a column, let's say, for example, we want to pick this. Let's do one row and one
column in this example. So let's say we want to go down
that row instead because we like the fact that has
a lot of zeros there. The first thing you have to do
is remember the pattern. Remember, you switch signs
on the coefficients. You don't just switch signs
as you go down a row. You also switch signs as
you go down a column. So the general pattern for 4
by 4 will look like this. It'll be plus, minus,
plus, minus, minus, plus, minus, plus. And then you get a plus, minus,
minus, plus, plus, minus, minus, plus. It's really this checker
board pattern. If you wanted to figure out
the sign for any ij. So let's say you wanted
to figure out the sign for, this is 2, 2. So if you want to find
the sign-- let me write it this way. Say we have a function, let
me define a function. I think the checker board
pattern's pretty clear to you, but I'll just write it down. Let's say I wanted to figure
out the sign-- the sign not the trig ratio. I want to figure out the sign of
any entry where you give me an i and a j. What you could do is you
just take negative 1 to the i plus j power. So if you wanted to figure out
the sign for the, let's say, you are in row 4, column 2. Row 4, column 2. So what will it be? Do 4 plus 2. Negative 1 to the sixth
power is equal to 1. That's going to be
a positive 1. Let's say you want
to take this guy. So this is i is equal to 2. j is equal to 3. We're in the second
row, third column. 2 plus 3 is 5. Minus 1 to the fifth
power is minus 1. And you have a minus there. So that's another way
to think about it. But the checker board
pattern's pretty straightforward. So now that you have the checker
board pattern in your mind, let's go down this row. Let's go down this row. So we start with the 2. But notice that we have
to multiply by minus. Because we go plus, minus,
plus, minus. So you have a minus 2 times the determinant of its sub matrix. So you cross out this
row and that column. And you're left with this
matrix up here. So it's 2, 3, 4. 0, 2, 0. 1, 2, 3. This is a minus and then
you have a plus. So you have a plus 3 times--
get rid of this guy's column and row. And you have 1, 1, 0. 1, 1, 0. That's that right there. 3, 2, 2. 3, 2, 2. And you have 4, 0, 3. 4, 0, 3. And then you would have a
minus a 0 times its sub matrix plus a 0. But we can ignore those
because 0 times anything is a 0. So already we've simplified our
determinant a good bit. So let's see if we can
evaluate this and get the same number. Because only then will it be
reasonably satisfying. So what's the determinant
of this guy? Well we can do the exact
same principle. We can go down any row or
column that seems to be especially simple. So let's go down that row. Because that row seems
especially simple. So this is going
to be minus 2. That's this minus 2 right
here times the determinant of this guy. So the determinant of this guy,
we just have to go and say OK we have a plus,
we have a minus, and then we have a plus. It's going to be minus 0 times
its sub determinant, I guess we would call it. Get rid of that row or that
column and that row. So it'd be minus 0 times
anything, that's just going to be 0 plus 2. So plus 2 times the
determinant. Get rid of its row
and its columns. 2, 4, 1, 2. 2, 4, 1, 3. And then you have a minus
0 times this thing. But who cares what that is
because you have a 0 times. So that just simplified
to that which is nice. Let me write it like that. And then you have plus 3 times
this thing right here. We don't want to do
the first row. We have no non 0 terms here. Let's at least do this
row right here for a little bit of variety. None of the columns actually
seem that interesting. They all have, at most, one 0. So if we do that one right here,
this is a plus, minus, plus, minus, plus. So we'll have a plus
0 times 3, 4, 2, 0. We can ignore that. Minus 2 times the determinant. Get rid of this column,
that row. I have to be very careful. I put this minus there, but
there wasn't a minus 1 there. Let me write it like-- I want to
make sure I don't make any careless errors right here. This is a plus 1. I just drew a minus 1 there
to show you how things switch signs. So this is going to
be a 3 times. So we're going to go down--
This is this 3 right here. I lost my bearings with
that minus there. We're trying to find the
determinant of this. So it's 0 times this matrix. We can ignore that. Minus 2 times its sub matrix. Which is that and that. So it's 1, 1, 4, 0. And then you have a plus
3 times its sub matrix. 1, 3, 1, 2. 1, 3, 1, 2. Just like that. Let's see if we can
simplify this. 2 times 3 is 6 minus
1 times 4. So, this becomes 6 minus 4. So that's 2. So this whole thing simplifies
to 2 times 2 which is 4. 4 times minus 2. The whole thing simplifies
to minus 8. Now, this guy right here, we
have 1 times 0, which is 0, minus 1 times 4. This is minus 4 times minus 2. This whole thing becomes
a positive 8. You have 1 times 2, which
is 2, minus 1 times 3. Which is minus 3. So you get a minus 1. So this becomes a minus--
I mean you get 2 minus 3 minus 1 times 3. So this becomes a minus 3. So you have an 8 minus a 3. So this becomes a minus five. You have a 3 times a minus
5 right there. So 3 times minus 5 is going
to be equal to minus 15. Let me make sure I got-- oh
I made a silly mistake. If you have an 8 minus a 3, this
is 8, this is minus, this is going to be 5. Very easy. Your brain starts to get fried
if you do this long enough. And the you have a 3 times
a 5 and you get a 15. You get a 15. And then you have a 15. This term plus this term is 15
minus 8 which is equal to 7. Which, lucky for us, I barely
evaded making a careless mistake there, we got
the right answer. But this is a much simpler
computation than we did in the last video. And it was much simpler because
we picked the row that happened to have a lot
of zeros on it. So we only had two of these
terms instead of four terms like we had in the last video. And you could do the same, you
could pick columns that have a lot of zeros. You just have to make sure
that you always use this checker board pattern.