Main content

## Linear algebra

### Unit 2: Lesson 5

Finding inverses and determinants# 3 x 3 determinant

Determinants: Finding the determinant of a 3x3 matrix. Created by Sal Khan.

## Want to join the conversation?

- Would the diagonal method work too? Because i think thats a lot simpler than this.(11 votes)
- The Sarrus rule only applies to 2x2 and 3x3 matrices. So it is better to learn this one-since it it universal! :D(25 votes)

- how do you take a determinant of a 2x3 matrix?(6 votes)
- Its not possible to find determinant of 2x3 matrix.Determinant can be done only for square matrix where dimension of row and column must be same.Like 3x3 or 4x4 matrices.Hope you got your answer.(25 votes)

- Maybe this is a silly question, but why do we care if c is invertible? Is there some other place we use this?

edit: (Thanks to newbarker for a good answer)(5 votes)- If you were solving a system of 3 equations in 3 unknowns and wanted to know if there was a unique solution, then invertibility is essential to there being a unique solution.

Another example from computer graphics: I might have an object. Examples being a cube, or a teapot, or a human body, etc. The object is represented as a collection of 3D position vectors (that is vectors in R3). I might want to perform some kind of transformation on this object (e.g. rotate, stretch, flip) and then have the ability to untransform it to its original form later. The transformation* would be represented by a 3x3 matrix. This transformation when multipled by the position vectors that represent the object yields transformed position vectors, Now when I want to untransform it, I find the inverse of the transformation matrix, multiply it by the transformed position vectors, and the original vectors are provided. This is used massively in games and CAD.

* Without wanting to complicate things yet, I just want to add that using a 3x3 matrix means you cannot represent a translation (shift in position) in 3D. To do that using matrix multiplication, you need a 4x4 matrix and a 4D point. Ignore this bit for now if it doesn't make sense.(23 votes)

- Hi. This is the first time I have delved into matrices and I find them fascinating if a bit abstract. Question: When finding the determinant of a 3X3 matrix, it seems that we only use the top row to set up the computation. This, for me, appears counter-intuitive. Why don't we have to make the same manipulations and computations for all three rows? Are the other rows somehow incorporated when we set up the solution using the first row?(4 votes)
- The determinant of the matrix A is the same as the determinant of the transpose of A, thus you can use any row or column to find the determinant. The more zeros in a row or column the more preferable it is to use that row or column.(6 votes)

- For the people confused about the "chess board pattern", you can use the following rule to determine the sign: -1 ^ ( i + j ) where i = row and j = column.

So expansion over the 1st row (a11, a12, a13) results in a +, -, + pattern

a11 = -1 ^ (1+1) = 1 (positive: +)

a12 = -1 ^ (1+2) = -1 (negative: -)

a13 = -1 ^ (1+3) = 1 (positive: +).(5 votes)- so in other words :

if sum of indicies even, then add (+)

if sum of indicies is odd, then sub.(-)(3 votes)

- Isn't this similar, or exactly the same, as finding the Cross Product of three 3-dimensional vectors? Thanks.(3 votes)
- The entries of the vector obtained from taking the cross product are given by taking determinants, however the determinant is very different from cross product in an important way: cross product is an operation between two vectors witch spits out a third (orthogonal) vector; whereas determinants operate on matrices and spit out scalar (numbers).(3 votes)

- I am just curious how someone came up with 3 x 3 determinant definition. 2 x 2 determinant makes sense, but not sure how that applies to 3 x 3(3 votes)
- So, what's the inverse of the 3x3 matrix?(1 vote)
- A good way to invert a 3x3 matrix is to augment it with the identity matrix and then row reduce the left hand side while doing the operations to the augmented side.(3 votes)

- Is this related to cross product? The operation looks similar(3 votes)
- https://www.youtube.com/watch?v=eu6i7WJeinw Here is the first part of some videos that explain it.(1 vote)

- So I understand that determinants are related to the inverse, but I want to be more informed on what the quantity means. For example, I know that a matrix with the determinant of 0 doesn't have an inverse. But what of a negative number? A fraction? Lesser quantity vs greater quantity? Does it connect at all to the inverse? If so, how?(2 votes)
- Any matrix with a determinant that isn't 0 has an inverse. If the determinant is small, then the components, and the determinant, of the inverse will tend to be large, and vice versa. If you have a negative determinant, the determinant of the inverse will also be negative.(3 votes)

## Video transcript

In the last video we defined the
notion of a determinant of a 2 by 2 matrix. So if I have some matrix-- let's
just call it B-- if my matrix B looks like this, if
its entries are a, b, c, d, we've defined to determinant
of B. Which could also be written as
B with these lines around it, which could also be written as
the entries of the matrix with those lines around
it, a, b, c, d. And I don't want you to
get these confused. This is the matrix when
you have the brackets. This is the determinant of the
matrix, when you just have these straight lines. And this, by definition, was
equal to ad minus bc. And you saw in the last video,
or maybe you saw in the last video, what the motivation
for this came from. When we figured out the inverse
of B, we determined that it was equal to 1 over ad
minus bc times another matrix, which was essentially these
two entry swaps, you got a d and an a. And then these two entries
made negative, so minus c and minus b. This was the inverse of b. And we said, well, when
is this defined? This is defined as long as this
character right here does not equal 0. So you said hey, this looks
pretty important. Let's call this thing right
there the determinant. And then we could say that B is
invertible, if and only if, the determinant of B
does not equal 0. Because if it equals 0, then
this formula for your inverse won't be well defined. And we just got this from our
technique of creating an augmented matrix whatnot. But the big take away is we
defined this notion of a determinant it for
a 2 by 2 matrix. Now the next question is, well
that's just a 2 by 2, everything we do in linear
algebra, we like to generalize it to higher numbers of
rows and columns. So the next step, at least--
let's just do baby steps-- let's start with a 3 by 3. Let's define what its
determinant is. So let me construct a
3 by 3 matrix here. Let's say my matrix A is equal
to-- let me just write its entries-- first row, first
column, first row, second column, first row,
third column. Then you have a2
1, a2 2, a2 3. Then you have a3 1, third
row first column, a3 2, and then a3 3. That is a 3 by 3 matrix. Three rows and three columns. This is 3 by 3. I am going to define the
determinant of A. So this is a definition. I'm going to define the
determinant of this 3 by 3 matrix A as being equal to--
and this is a little bit convoluted, but you'll get the
hang of it eventually. In the next several videos we're
just going to do a ton of determinants. So it just becomes a bit of
second nature to you. It's a little computationally
intensive sometimes. But it equals this first row. It equals a1 1 times the
determinant of the matrix you get, if you get rid of this
guy's column and row. So if you get rid of this guy's
column and row, you're left with this matrix here. So times the determinant of the
matrix a2 2, a2 3, a3 2, and then a3 3. Just like that. So that's our first entry
and that's a plus this. And then I said it's a plus
this, because the next entry's going to be a minus. You have a minus this
guy right here. So then you're going to have
minus a1 2 times the matrix you get if you eliminate
his column and his row. So times, you're going to get
these entries right there. So a2 1, a2 3, a3 1, and
then you have a3 3. We're not quite done. You could probably guess with
the next one's going to be. Then you're going to have a
plus-- let me switch to a better color-- plus this guy. Plus a1 3 times the determinant
of its-- I guess you could call it--
its sub-matrix. We'll call it that for now. So this matrix right here. So a2 1, a2 2, a3 1, a3 2. This is our definition of the determinant of a 3 by 3 matrix. And the motivation is, because
when you take the determinant of a 3 by 3 it turns out-- I
haven't shown it to you yet-- that the property is the same. That if the determinant of this
is 0, you will not be able to find an inverse. And when I defined determinant
in this way. If the determinant does not
equal 0, you will be able to find an inverse. So that's where this
came from. And I haven't shown
you that yet. And I might not show you
because it's super computational. It'll take a long time. It'll be very hairy and I'll
make careless mistakes. But the motivation comes from
the exact same place as the 2 by 2 version. But I think what you probably
want to see right now is at least just this thing applied
to an actual matrix, because this looks all abstract
right now. But if we do it with an actual
matrix, you'll actually see it's not too bad. So let's leave the definition up
there, and let's say that I have the matrix 1, 2, 4, 2, 2,
minus 1, 3, and 4, 0, 1. So by our definition of a
determinant, the determinant of this guy right here-- so
let's say I call that matrix C-- C is equal to that. So if we want to figure out
the determinant of C, the determinant of C is equal to--
I take this guy right here, let me take that 1-- times the
determinant of-- let's just call it the submatrix,
right here. So we have a minus 1, we
have a 3, we have a 0, and we have a 1. Just like that. Notice, I got rid of
this guy's column and this guy's row. And I was just left with
minus 1, 3, 0, 1. Next, I take this guy. And this is the trick. You have to alternate signs. If you start with a positive
here, this next one's going to be a minus. So you're going to have minus 2
times the submatrix-- we can call it-- if we get rid
of this guy's column and this guy's row. So 2, 3, 4, 1. I just blanked this out. If I could videotape my finger,
I would cover my finger over this column right
here and over that row, and you'd just see a 2,
a 3, a 4, and a 1. And that's what I
put right there. And then finally, we went
plus, minus, plus. So finally, we'll have plus 4
times the determinant of the submatrix, if you get rid of
that row in that column. So 2, minus 1, 4, 0. Now, these are pretty
straightforward. These are not too
bad to compute. Let's actually do it. So this is going to be equal
to 1 times what? Minus 1 times 1. Let me just write it out. Minus 1 times 1, minus
0 times 3. This just comes from the
definition of a 2 by 2 determinant. We've already defined that. And then we're going to have
a minus 2 times 2 times 1, minus 4 times 3. And then finally, we're going to
have a plus 4 times 2 times 0 minus minus 1 times 4. I wrote it all out
so you can see. This thing right here is just
this thing right here. And then you have
the 4 out front. This thing right here was just
this thing right here. So it's the determinant of the
2 by 2 submatrix for each of these guys. And if we compute this, this is
equal to-- minus 1 times 1 is minus 1. Minus 0, that's 0. So this is a minus 1 times
1, so that's a minus 1. And then we get-- what
is this equal to? This right here is 12. So you get 2 minus 12. Right? You get 2 times 1
minus 4 times 3. So it's minus 10. So that is equal to minus 10. And then you have a minus
10 times a minus 2. So that becomes a
plus 20, right? Minus 2 times minus 10. And then finally, in the green,
we have 2 times 0, that's just a 0. And then you have minus 1 times
4, which is minus 4. Then you have a minus sign
here, so it's plus 4. So this all becomes a plus 4. Plus 4 times 4 is
16, so plus 16. And what do we get when
we add this up? We get 20 plus 16 minus 1. It is equal to 35. We're done. We found the determinant
of our 3 by 3 matrix. Not too bad. Right there, so that is equal
to the determinant of C. So the fact that this isn't
0 tells you that C is invertible. In the next video, we'll try
to extend this to n by n square matrices.