WEBVTT mathematics/pre-calculus/selhorst-jones
00:00:00.000 --> 00:00:02.200
Hi--welcome back to Educator.com.
00:00:02.200 --> 00:00:06.600
Today, we are going to talk about determinants and the inverses of matrices.
00:00:06.600 --> 00:00:11.700
Consider if we wanted to find x in the equation 5x = 10--pretty basic algebra, right?
00:00:11.700 --> 00:00:14.200
We would cancel out the 5 by dividing it on both sides.
00:00:14.200 --> 00:00:20.000
Or equivalently, we could think of this as multiplying by 5 inverse, which is just 1/5.
00:00:20.000 --> 00:00:28.100
If we multiply by 1/5 on both sides, we cancel out the 5, because the multiplicative inverse to 5 is 1/5; that why it is 5^-1.
00:00:28.100 --> 00:00:31.200
What if we wanted to solve for the matrix X in the equation below?
00:00:31.200 --> 00:00:35.700
We had some matrix A, times the matrix X, is equal to the matrix B.
00:00:35.700 --> 00:00:41.200
We have this matrix equation; so we need to somehow cancel out A to get X alone.
00:00:41.200 --> 00:00:44.600
It is the same basic idea; we just need to cancel out an entire matrix.
00:00:44.600 --> 00:00:50.400
So, we need to multiply both sides by the inverse to A; this means we need to find the inverse to A.
00:00:50.400 --> 00:00:54.400
If we can find this magical inverse, then we could multiply both sides.
00:00:54.400 --> 00:00:58.100
We would have A^-1AX and A^-1B.
00:00:58.100 --> 00:01:04.000
Well, the A^-1 and the A will cancel each other out, and we would be left with X = A^-1B.
00:01:04.000 --> 00:01:08.600
So, we would be able to solve for that matrix, that unknown matrix, X, if we wanted to,
00:01:08.600 --> 00:01:12.100
in terms of this A^-1 and B, if we know what A and B are.
00:01:12.100 --> 00:01:19.500
It is very similar to 5x = 10; we multiply by the multiplicative inverse of 5, 5^-1, on both sides, to get what x is.
00:01:19.500 --> 00:01:26.500
So, AX = B...we multiply by the multiplicative inverse of A on both sides to get that X alone.
00:01:26.500 --> 00:01:34.500
Not all matrices are invertible; consider if we wanted to solve for X in the basic equation 0x = 0.
00:01:34.500 --> 00:01:39.400
It would be impossible: the information about what x is has just been destroyed by that 0.
00:01:39.400 --> 00:01:44.300
0 multiplied by anything is going to come out to be 0, so we don't have any idea what that x is anymore.
00:01:44.300 --> 00:01:49.200
There is no way to cancel out 0, because 0^-1 does not exist.
00:01:49.200 --> 00:01:52.600
There are some special things out there that we can't invert.
00:01:52.600 --> 00:01:57.600
There is no way to flip them to an inverse, because 0...you can't invert it.
00:01:57.600 --> 00:02:03.200
You can't reverse the process of multiplying by 0; it is gone--the information is lost.
00:02:03.200 --> 00:02:07.000
It is the same thing going for matrices: not all matrices can be inverted.
00:02:07.000 --> 00:02:14.100
A matrix that can be is called invertible: if we can invert a matrix, we call it invertible, or we might call it non-singular.
00:02:14.100 --> 00:02:17.700
If a matrix cannot be inverted, it is called singular.
00:02:17.700 --> 00:02:24.900
To be invertible, a matrix must have two properties: the matrix must be square--it has to be a square matrix to invert;
00:02:24.900 --> 00:02:29.000
and the determinant of the matrix must be non-zero.
00:02:29.000 --> 00:02:32.600
So, what is a determinant? Let's start talking about determinants.
00:02:32.600 --> 00:02:36.000
The determinant is a real number associated with a square matrix.
00:02:36.000 --> 00:02:42.700
The determinant of a matrix A is denoted by either detA (like determinant of A--we are shortening it),
00:02:42.700 --> 00:02:45.300
or vertical bars on either side of the matrix A.
00:02:45.300 --> 00:02:52.600
Now, A may look similar to absolute value, but it is not; it is not absolute value--it is the determinant of A.
00:02:52.600 --> 00:02:56.600
So, when it is vertical bars around a matrix, we are talking about determinant, not absolute value.
00:02:56.600 --> 00:03:05.800
So, vertical bars around a matrix, unlike absolute value, can produce any real number, including negative numbers or 0 or positive numbers.
00:03:05.800 --> 00:03:10.700
So, it is not limited to just giving out positive or 0, like absolute value; it is allowed to put out anything.
00:03:10.700 --> 00:03:15.100
So, don't get confused by those vertical bars, thinking that that implies positiveness; it doesn't.
00:03:15.100 --> 00:03:21.700
For the most part, though, I prefer this detA thing, this determinant of A; so that is the form that we will be seeing.
00:03:21.700 --> 00:03:24.400
But occasionally, you will see it with the vertical bars, instead.
00:03:24.400 --> 00:03:27.500
The determinant of a matrix has many important applications and properties.
00:03:27.500 --> 00:03:30.700
There is a huge amount of stuff that this determinant is useful for.
00:03:30.700 --> 00:03:32.700
But we are not going to get into that in this course.
00:03:32.700 --> 00:03:40.000
In this course, we are only going to concern ourselves with one thing: whether or not a matrix is invertible, and the fact that a determinant tells us that.
00:03:40.000 --> 00:03:48.100
If a determinant of a matrix is non-zero, then the matrix is invertible, and vice versa.
00:03:48.100 --> 00:03:52.600
So, if the determinant of A is not equal to 0, then we know that A is invertible.
00:03:52.600 --> 00:03:56.500
And if A is invertible, then we know that the determinant of A must not be equal to 0.
00:03:56.500 --> 00:04:01.500
On the flip side, if the determinant of A is equal to 0, then we know that A is not invertible.
00:04:01.500 --> 00:04:05.600
And if A is not invertible, we know that the determinant of A is equal to 0.
00:04:05.600 --> 00:04:09.600
So, just remember that detA not equal to 0 means that it is invertible.
00:04:09.600 --> 00:04:13.100
And that really works a lot like we are used to with the real numbers.
00:04:13.100 --> 00:04:15.900
You can invert any number you want, except 0.
00:04:15.900 --> 00:04:21.400
It is the same thing with matrices: you can invert any matrix you want, except for ones that have determinant 0.
00:04:21.400 --> 00:04:31.100
All right, so think in terms of that: detA not 0 means invertible--you are allowed to invert; detA = 0--you are not allowed to invert.
00:04:31.100 --> 00:04:39.000
So, let's see the determinant of a 2 x 2 matrix: if A = a, b, c, d, it is given by detA,
00:04:39.000 --> 00:04:46.000
which is equal to this other way to write determinant of A, comes out to be ad - bc.
00:04:46.000 --> 00:04:49.300
A good mnemonic to remember this is to think in terms of diagonals--
00:04:49.300 --> 00:05:02.700
the down diagonal, ad, multiplied together, and then subtracted by this up diagonal here, cb or bc, so minus bc.
00:05:02.700 --> 00:05:05.600
We subtract by that up diagonal.
00:05:05.600 --> 00:05:09.200
Let's look at an example--let's do an example here: Multiply...
00:05:09.200 --> 00:05:15.300
if we want to take the determinant of 5, 9, 3, 4, notice that we have these bars on either side.
00:05:15.300 --> 00:05:26.600
If we have bars of some matrix inside, what that is saying is to take the determinant of that stuff on the inside.
00:05:26.600 --> 00:05:31.900
Bars on either side is just like the bars on either side of the capital letter denoting the matrix.
00:05:31.900 --> 00:05:34.200
It says to take the determinant of whatever is inside of there.
00:05:34.200 --> 00:05:38.800
So, you will see that notation a lot; but when we are talking about just letters, I prefer that one.
00:05:38.800 --> 00:05:44.600
OK, in either case, if we are taking the determinant of the matrix 5, 9, 3, 4--if we are taking this one right here,
00:05:44.600 --> 00:05:51.200
the determinant of 5, 9, 3, 4, the first thing we do is take the down diagonal.
00:05:51.200 --> 00:06:01.000
So, it is going to be 5 times 4; and then, it is going to be minus the up diagonal, 3 times 9, so 9 times 3.
00:06:01.000 --> 00:06:12.200
5 times 4 - 9 times 3; we get 20 - 27, and that comes out to be -7.
00:06:12.200 --> 00:06:16.000
Once again, the determinant can come out to be any number; it doesn't have to come out to a positive;
00:06:16.000 --> 00:06:20.200
it just has to come out to any real number at all.
00:06:20.200 --> 00:06:23.200
Minors and cofactors: first we are going to talk about minors.
00:06:23.200 --> 00:06:28.600
Before we can look at determinants of larger matrices, we will need two concepts: minors and cofactors.
00:06:28.600 --> 00:06:30.700
First, we are going to look at minors.
00:06:30.700 --> 00:06:38.300
For a square matrix A, the minor, m<font size="-6">i,j</font> (remember, i is the row i; j is the column j)
00:06:38.300 --> 00:06:45.200
of the entry a<font size="-6">i,j</font> is the determinant of the matrix obtained by deleting the ith row and jth column.
00:06:45.200 --> 00:06:54.400
So, we go to this i,j location, this a<font size="-6">i,j</font> entry, and we delete out from that, vertically and horizontally.
00:06:54.400 --> 00:07:00.900
So, we will take some location, and then we will delete out horizontally, delete out vertically, and group back together and see what is left.
00:07:00.900 --> 00:07:11.000
For example, if we have a below, we would have m<font size="-6">2,3</font>; 2,3 means we are on the second row, and we are going to be on the third column.
00:07:11.000 --> 00:07:16.200
We are looking at -8 as the epicenter of where this thing is.
00:07:16.200 --> 00:07:20.500
That is the entry a<font size="-6">i,j</font>; so the entry 2,3 would be -8.
00:07:20.500 --> 00:07:26.400
Now, we delete (the determinant of the matrix obtained by deleting) the ith row and jth column.
00:07:26.400 --> 00:07:32.900
We delete this second row; we delete this third column; and we see what the matrix is that is left.
00:07:32.900 --> 00:07:41.100
Well, the matrix that is left is 6, 2, -7, 3; that is all that hasn't been crossed out.
00:07:41.100 --> 00:07:45.800
Now, we go and we take the determinant of that; we are taking the determinant with these bars,
00:07:45.800 --> 00:07:49.600
because the minor is that you delete, and then you take the determinant.
00:07:49.600 --> 00:08:00.100
So then, we just take 6 times 3, minus -7 times 2; 18 + 14...we get 32, so that is our minor.
00:08:00.100 --> 00:08:03.900
Cofactor is very closely based on the minor.
00:08:03.900 --> 00:08:10.800
The **cofactor** just multiplies the minor by 1 or -1, based on the location of the entry the minor comes from.
00:08:10.800 --> 00:08:19.900
So, there is this shifting, flipping-back-and-forth pattern of positive/negative that is really deeply connected to the determinants of matrices.
00:08:19.900 --> 00:08:25.500
The cofactor c<font size="-6">i,j</font>, the ith row, jth column cofactor, of the entry a<font size="-6">i,j</font>,
00:08:25.500 --> 00:08:30.800
the entry in the ith row, jth column of our matrix A, is given by c<font size="-6">i,j</font>
00:08:30.800 --> 00:08:37.100
is equal to -1 to the i + j times that minor i,j.
00:08:37.100 --> 00:08:41.600
So, the -1 to the i + j is just a way of saying if it is going to be positive or negative.
00:08:41.600 --> 00:08:48.700
-1 to the 0 is positive; -1 to the 1 is negative; -1 to the 2 is positive; -1 to the 3 is negative; -1 to the 4 is positive.
00:08:48.700 --> 00:08:52.700
-1 to the even number is positive; -1 to the odd number is negative.
00:08:52.700 --> 00:08:55.000
So, we can see this as an alternating sine pattern.
00:08:55.000 --> 00:09:06.100
If we are in -1, to the row 1 + column 1, then that is going to be -1 squared; -1 squared comes out to be positive 1.
00:09:06.100 --> 00:09:08.700
There we are at row 1, column 1.
00:09:08.700 --> 00:09:21.100
If we were to instead, say, look at row 2, column 3, then it would be -1 to the 2 + 3, which is equal to -1 to the 5.
00:09:21.100 --> 00:09:25.900
So, since it is to an odd number, it is going to be negative; so we get that negative there.
00:09:25.900 --> 00:09:32.100
We can see this in terms of the i + j thing; but we can also see it in terms of this alternating sign pattern.
00:09:32.100 --> 00:09:37.700
I would recommend, any time you are working with cofactors, that you just draw up the alternating sign factor to whatever size you are doing.
00:09:37.700 --> 00:09:44.600
For example, if you are working with a 3 x 3, just draw out a 3 x 3 alternating sign pattern.
00:09:44.600 --> 00:09:53.000
It always starts with a positive in the top left: so + - +, - + -, + - +.
00:09:53.000 --> 00:09:57.900
And then, from there, you will be able to work from it and use that as a reference point; we will see that in the examples.
00:09:57.900 --> 00:10:05.100
Thus, based on our previous example, when we took what m<font size="-6">2,3</font> was (m<font size="-6">2,3</font> was equal to
00:10:05.100 --> 00:10:12.100
the determinant of 6, 2, -7, 3, because c<font size="-6">2,3</font> is still going to be based around row 2, column 3;
00:10:12.100 --> 00:10:21.200
so -8...cross out...cross out...6, 2, -7, 3...the same thing here; and then we just take the determinant of that);
00:10:21.200 --> 00:10:29.300
but we are here in the 2,3 position in our alternating sign pattern (or alternately, if we want to look at it
00:10:29.300 --> 00:10:35.900
in terms of -1 to the i + j--either way would end up working out the same); so we have this negative here,
00:10:35.900 --> 00:10:40.800
so we have a negative showing up here, so that will end up coming out to -32,
00:10:40.800 --> 00:10:48.100
because we already figured out that the determinant for that minor is 6, 2, -7, 3; that is what we get out of that.
00:10:48.100 --> 00:10:55.900
And so, that came out to be positive 32; so when we have this sign on top of that, that is going to come out to be -32.
00:10:55.900 --> 00:10:57.500
All right, so how do we actually take the determinant?
00:10:57.500 --> 00:11:05.000
Let's apply this stuff: the determinant of an m x n matrix A is given by the sum of the entries in any row or column
00:11:05.000 --> 00:11:10.400
(you can choose any row or any column at all), and you multiply each one of those entries
00:11:10.400 --> 00:11:13.900
by the respective cofactor that would come out of that entry.
00:11:13.900 --> 00:11:17.500
So, the determinant of A, which is equal to another way to say the determinant of A,
00:11:17.500 --> 00:11:21.600
is equal to...say we chose the kth row; then we would have a<font size="-6">k,1</font>,
00:11:21.600 --> 00:11:27.600
the first entry in the kth row, times the cofactor of the kth row, first entry,
00:11:27.600 --> 00:11:34.400
plus a<font size="-6">k,2</font>, the kth row, second entry, times the cofactor for the kth row, second entry,
00:11:34.400 --> 00:11:41.000
up until the kth row, nth entry, and kth row, nth entry cofactor.
00:11:41.000 --> 00:11:46.300
Similarly, we could have also done this with columns; it would be the first entry, kth column of A,
00:11:46.300 --> 00:11:51.300
times the cofactor for the first entry, kth column; or the second entry, kth column,
00:11:51.300 --> 00:11:55.500
with the cofactor of second entry, kth column, up until the nth entry, kth column,
00:11:55.500 --> 00:11:58.000
nth entry, kth column cofactor.
00:11:58.000 --> 00:12:01.800
So, that is how it works; don't worry--we will see an example that will make this make a lot more sense.
00:12:01.800 --> 00:12:07.900
Note that this is true for any value of k, as long as 1 ≤ k ≤ n.
00:12:07.900 --> 00:12:13.400
So, our k has to be somewhere in these m x n; we can't choose a row that is beyond the dimension,
00:12:13.400 --> 00:12:16.800
or a column that is beyond the size, of our matrix; that doesn't make sense.
00:12:16.800 --> 00:12:22.500
But as long as we choose a row that is inside of our matrix, and a column that is inside of our matrix, we can choose any one at all.
00:12:22.500 --> 00:12:27.900
So, this process can be done with any row or any column, and you will end up getting the exact same result--kind of amazing.
00:12:27.900 --> 00:12:30.000
We won't see why, but it is pretty cool.
00:12:30.000 --> 00:12:35.600
This usually means that it is in our interest to choose the row or column that has the most zeroes,
00:12:35.600 --> 00:12:40.700
because it is really easy: 0 times a cofactor--we don't have to worry about what the cofactor is.
00:12:40.700 --> 00:12:42.800
It is just immediately going to eliminate itself.
00:12:42.800 --> 00:12:48.600
So, the thing with the most zeroes, the row or column that has the most zeroes (or the smallest numbers,
00:12:48.600 --> 00:12:54.700
if we don't have that many zeroes) will help make calculation easier; so that is something to stay on the lookout for.
00:12:54.700 --> 00:13:02.200
All right, determinant of larger matrices: let's actually put "rubber to the road" and see how this works.
00:13:02.200 --> 00:13:07.200
First, we notice that there is a 0 here; I like going horizontally, so let's work out this way.
00:13:07.200 --> 00:13:21.800
Now, notice: a 3 x 3 sign pattern (put it inside of vertical lines, just so we are reminded that we are doing a determinant)
00:13:21.800 --> 00:13:29.500
is going to look like this: so let's work on this horizontal line here.
00:13:29.500 --> 00:13:39.000
The first entry in this row is 1; we then go out; we cross out the things on a line with that.
00:13:39.000 --> 00:13:56.100
That would bring us to the entry 1, times the sign for that cofactor, so -1, times the minor, 2, 3, 3, 5.
00:13:56.100 --> 00:14:03.200
Next, it is going to be a +; our next one in the row is going to be the 0.
00:14:03.200 --> 00:14:08.900
We cut out...we don't even really have to care about the cutting out, because 0 times whatever
00:14:08.900 --> 00:14:13.400
we end up having inside for that minor--that is going to get knocked out, so it doesn't really matter.
00:14:13.400 --> 00:14:15.500
That is the beauty of choosing the 0.
00:14:15.500 --> 00:14:27.600
Next, we have the -8; so -8 knocks out what is there; -8, and we are on this one, so - -8, times the minor
00:14:27.600 --> 00:14:36.500
that is produced by cutting around that -8, cutting a vertical and a horizontal on that -8: 6, 2, -7, 3.
00:14:36.500 --> 00:14:49.200
We work these out; we have -1 times...down diagonal, 2 times 5, minus up diagonal; 10 - 9 becomes -1.
00:14:49.200 --> 00:15:04.600
Minus, plus...so that becomes + 8 times...6 times 3 becomes 18, minus...-7 times 2 is -14; that cancels out.
00:15:04.600 --> 00:15:11.100
So, we have -1, negative and negative; that becomes positive 1...
00:15:11.100 --> 00:15:21.100
Oh, sorry, that did not become negative back here: 2 times 5 is 10, minus 3 times 3 is 9, so we have 10 - 9 is 1; sorry about that.
00:15:21.100 --> 00:15:28.400
So, that should have been a 1; here is a -1, so this comes out to be -1; it does not cancel out; I'm sorry about that.
00:15:28.400 --> 00:15:46.100
Then, + 8 times...18 + 14 becomes 32, so -1 +...8 times 32 is 256; so we end up getting 255 as the determinant for this matrix.
00:15:46.100 --> 00:15:49.600
Alternatively, we could have chosen a different row or a different column.
00:15:49.600 --> 00:15:55.600
For example, we could have just gone along the top, like this, and we would have had 6 times...
00:15:55.600 --> 00:16:03.800
and it would be positive, if we are going along the top there...so 6 times...we cross out around it; 0, -8, 3, 5.
00:16:03.800 --> 00:16:15.700
And then, the next one is minus, -2, times...the minor around that 2 here would cross out to be 1, -8, -7, 5.
00:16:15.700 --> 00:16:25.200
And then finally, + (because it is a plus in our signs) 3 times 1, 0, -7, 3.
00:16:25.200 --> 00:16:28.700
You can work it out that way, as well, and you would end up getting 255, as well.
00:16:28.700 --> 00:16:35.600
I like this row here, because we had that 0; and so, it just managed to knock itself out, right from the beginning.
00:16:35.600 --> 00:16:41.100
That is that much less calculation for us to have to deal with; I think that is nice--less calculation makes it easier.
00:16:41.100 --> 00:16:47.800
All right, there is an alternate method for finding the determinant of a 3 x 3 matrix that some people teach.
00:16:47.800 --> 00:16:53.700
Personally, I want to recommend against using this method--I don't really think there is a good reason to use it.
00:16:53.700 --> 00:16:58.900
The method we just did, that method with the cofactor expansion, while it seems a little complex at first
00:16:58.900 --> 00:17:03.600
(it is a lot of things going on) will work for any size matrix at all.
00:17:03.600 --> 00:17:08.900
And to be honest, this alternate method doesn't actually go any faster, I don't think.
00:17:08.900 --> 00:17:14.500
So, I would say to try to stick to the cofactor method; I think it works better in general.
00:17:14.500 --> 00:17:17.900
It gives you the ability to cancel out a whole bunch of zeroes, if you see a bunch of zeroes.
00:17:17.900 --> 00:17:22.900
And you can use that same method for any size matrix and work down to smaller things.
00:17:22.900 --> 00:17:26.400
That said, you might have to know it for class, or you might just really want to use it.
00:17:26.400 --> 00:17:28.700
So, if you must know it, here it is.
00:17:28.700 --> 00:17:34.400
The first thing you do: you begin by taking the first two columns of the matrix, and you repeat them on the right of the array.
00:17:34.400 --> 00:17:42.100
So, we have 6, 2, 3, 1, 0, -8, -7, 3, 5; that shows up here, just like normal.
00:17:42.100 --> 00:17:49.100
But then, we take the first two columns, and then we also repeat this on the right side.
00:17:49.100 --> 00:17:53.000
So now, we have this extra-large array of numbers.
00:17:53.000 --> 00:17:55.700
Once we have that array of numbers, we can work with it.
00:17:55.700 --> 00:18:02.500
We multiply each red down diagonal--we multiply these together, and we add them up.
00:18:02.500 --> 00:18:11.000
In this case, we would have 6 times 0 times 5; 2 times -8 times -7; and 3 times 1 times 3; that is what we get out of there.
00:18:11.000 --> 00:18:18.500
And then, we subtract by each of the up diagonals, those blue ones, multiplied together; you subtract by those.
00:18:18.500 --> 00:18:25.400
Minus (it is always going to be minus), and then -7 times 0 times 3, and then minus
00:18:25.400 --> 00:18:31.800
(we are subtracting again) 3 times -8 times 6, and then minus 5 times 1 times 2.
00:18:31.800 --> 00:18:36.000
You work that all out and do a bunch of calculation; you end up getting the exact same number, 255.
00:18:36.000 --> 00:18:40.700
So, it is an alternate way to find the determinant; it will work if you have a 3 x 3 matrix.
00:18:40.700 --> 00:18:45.200
It is not that bad; but I don't really think there is a whole lot of reason to use it.
00:18:45.200 --> 00:18:48.800
It doesn't really go that much faster; you basically have to deal with the same amount of arithmetic.
00:18:48.800 --> 00:18:54.800
And it is a very specific trick for something that you might have to do on a larger scale, and you can't use that trick anymore.
00:18:54.800 --> 00:18:58.700
So, I would recommend using the method we were just talking about, with cofactors and minors.
00:18:58.700 --> 00:19:01.900
But if you really want to use this one, here it is.
00:19:01.900 --> 00:19:05.000
All right, we are ready to finally see the inverse of a 2 x 2 matrix.
00:19:05.000 --> 00:19:12.600
So, if we have some 2 x 2 matrix, A = a, b, c, d; then the inverse of A, assuming that the determinant of A is not equal to 0,
00:19:12.600 --> 00:19:27.800
(if the determinant of A is equal to 0, then we can't invert it at all), then A^-1 = 1/ad - bc, times the matrix d, -b, -c, a.
00:19:27.800 --> 00:19:36.400
So, notice: what we have done there is flipped the location of the diagonal here, and then we put negatives on the b and the c.
00:19:36.400 --> 00:19:40.900
That is what we are getting here and here and here and here.
00:19:40.900 --> 00:19:43.100
That is one way of looking at what is going on.
00:19:43.100 --> 00:19:49.700
Equivalently, you could also write this as 1/detA, because the determinant of A is just ad - bc.
00:19:49.700 --> 00:19:55.400
So, detA is the exact same thing; and then we are going to end up having the same matrix here and here.
00:19:55.400 --> 00:19:59.000
That is another way to think about it and remember it; that might be a little bit easier.
00:19:59.000 --> 00:20:02.800
All right, for the most part, at this level of this course or any similar math class,
00:20:02.800 --> 00:20:07.900
you are probably not going to need to compute the inverse of a matrix that is any larger than a 2 x 2.
00:20:07.900 --> 00:20:10.700
You are almost certainly not going to need to do that by hand.
00:20:10.700 --> 00:20:13.700
But your teacher might want you to; you might just be curious about it.
00:20:13.700 --> 00:20:19.200
So, if for some reason you need to calculate the inverse of a matrix that is larger than a 2 x 2 matrix,
00:20:19.200 --> 00:20:23.000
and you have to do it by hand, we will go over a method for this after the examples.
00:20:23.000 --> 00:20:26.700
We will talk about that after the examples; we will see something for doing that.
00:20:26.700 --> 00:20:33.300
There is...notice, I said "by hand"; it turns out that if you have a graphing calculator (or access to the Internet),
00:20:33.300 --> 00:20:38.000
you can actually just plug in matrices and have other computers invert them for you.
00:20:38.000 --> 00:20:43.900
It is a very useful thing, because the arithmetic of it is very simple, but tedious, and there is a lot of arithmetic.
00:20:43.900 --> 00:20:46.700
So, we will talk about that a little bit more in the next lesson.
00:20:46.700 --> 00:20:49.900
Or we will talk about how there are calculators and matrices interacting together.
00:20:49.900 --> 00:20:54.900
But that is something to think about, if you have to take the inverse of a matrix that is really large;
00:20:54.900 --> 00:21:02.100
but you can not do it by hand--you are not required to show all of your work by hand--you might want to just use a calculator.
00:21:02.100 --> 00:21:04.100
That is something to think about.
00:21:04.100 --> 00:21:06.500
All right, how do you use inverse matrices?
00:21:06.500 --> 00:21:11.700
If you have some A and A^-1, then we know that A^-1 times A times B equals B.
00:21:11.700 --> 00:21:15.900
A^-1 and A cancel each other out, and they have no net effect.
00:21:15.900 --> 00:21:21.400
This is because A^-1 times A equals the identity matrix, which is equal to A times A^-1.
00:21:21.400 --> 00:21:27.600
So, if you have the inverse to a matrix, you can multiply on the left side or the right side, and it will create the identity matrix.
00:21:27.600 --> 00:21:33.700
It creates the identity matrix I, which as we noted in the previous lesson has no effect in multiplication.
00:21:33.700 --> 00:21:41.100
A^-1A up here becomes I; and then I times B--well, the identity matrix times anything becomes just what we already had.
00:21:41.100 --> 00:21:43.900
So, we get B; so that is why A^-1 and A are cancelling out.
00:21:43.900 --> 00:21:47.400
They turn into the identity matrix, and then that just doesn't do anything.
00:21:47.400 --> 00:21:51.000
I want you to notice that we can multiply from the left side or the right side.
00:21:51.000 --> 00:21:53.200
It doesn't matter; it will cancel out in either direction.
00:21:53.200 --> 00:21:59.500
That is one of the nice things about inverses; they actually will commute, unlike pretty much everything else with matrices.
00:21:59.500 --> 00:22:05.700
It is important to note that, if we multiply an equation by a matrix on both sides, we have to choose a direction to multiply from
00:22:05.700 --> 00:22:08.700
and do the same for both parts of the equation.
00:22:08.700 --> 00:22:12.800
So, if we multiply from the left, we have to multiply from the left on both sides.
00:22:12.800 --> 00:22:16.400
If we multiply from the right, we have to multiply from the right on both sides.
00:22:16.400 --> 00:22:20.500
This is because pq is not equal to qp, in general.
00:22:20.500 --> 00:22:24.600
Multiplying on the left by p is generally very different than multiplying on the right by p.
00:22:24.600 --> 00:22:29.400
So, if we are going to keep up equality, we have to do the same action; we have to multiply from the left on both sides,
00:22:29.400 --> 00:22:33.300
because multiplying from different sides is actually a different action with matrices.
00:22:33.300 --> 00:22:38.100
So, you have to make sure that you multiply from the same side if you want to keep the equality of the equations.
00:22:38.100 --> 00:22:46.500
So, for example, if we have that A = B, then we can have CA = CB, where we multiply on the left for both sides.
00:22:46.500 --> 00:22:51.700
Or we could have AC = BC, where we multiply on the right for both sides.
00:22:51.700 --> 00:23:00.400
But usually, in general, CA is not going to be equal to BC, where we multiply on the left for one, and we multiply on the right for the other.
00:23:00.400 --> 00:23:04.300
It is in general not going to end up being true; so you will have lost your equality.
00:23:04.300 --> 00:23:10.400
So, make sure you notice that sort of thing; be careful here--it is dangerous.
00:23:10.400 --> 00:23:15.000
It is really easy to make this mistake, because so often, when we think about multiplying numbers and equations,
00:23:15.000 --> 00:23:20.300
like x = 10...we might multiply 3x = 10 times 3, but that is not how it can work in matrices.
00:23:20.300 --> 00:23:27.700
The only reason we can get away with that in a normal equation is because they commute, so it doesn't matter which side we multiply from.
00:23:27.700 --> 00:23:37.600
But with matrices, it matters which side we multiply from; so we can't have CA = BC; we have to make sure it is either CA = CB or AC = BC.
00:23:37.600 --> 00:23:41.500
We have to make sure that we are multiplying both on the left or both on the right.
00:23:41.500 --> 00:23:43.100
All right, we are ready for some examples.
00:23:43.100 --> 00:23:48.800
What is the determinant of this 3 x 3 matrix? -2, 1, -3, 4, 2, 0, -1, 0, 1.
00:23:48.800 --> 00:24:00.300
Our very first thing that we want to do is make a sign marker, just so we can see where all of the signs show up.
00:24:00.300 --> 00:24:05.800
So, at this point, we need to choose some row or some column to work with.
00:24:05.800 --> 00:24:09.400
We could choose the top one; that would be fine, but it doesn't have any 0's in it.
00:24:09.400 --> 00:24:14.600
It has some numbers that are larger than that; so I like this one, because it has -1, 0, and 1.
00:24:14.600 --> 00:24:18.100
So, one of them is going to cancel out, and the other ones have very little effect on the numbers.
00:24:18.100 --> 00:24:32.600
Let's work with that: -1 will cancel out those; so we have -1 times 1, -3, 2, 0.
00:24:32.600 --> 00:24:40.200
Then, the next one...it is still that, because that corresponds to that sign right there...
00:24:40.200 --> 00:24:49.800
Next, we have minus, because it corresponds to that one, 0, times...and we could figure out what this is,
00:24:49.800 --> 00:24:53.700
but it doesn't matter; because it is 0, it is going to knock itself out automatically.
00:24:53.700 --> 00:24:57.700
0 times anything is going to come out as 0, so we don't even have to worry about computing it.
00:24:57.700 --> 00:25:12.200
And then finally, the 1: that will knock out these, so we have a + here, + 1, times -2, 1, 4, 2.
00:25:12.200 --> 00:25:21.500
We calculate this; we have -1 times...1 times 0 is 0; 2 times -3 is -6; but it is minus that;
00:25:21.500 --> 00:25:28.900
so 1 times 0 is 0; minus 2 times -3, so it is a total of +6.
00:25:28.900 --> 00:25:40.400
And then, plus...1 times...just figure out what this is...-2 times 2 is -4; minus 4 times 1, another -4; so we have a total of -8.
00:25:40.400 --> 00:25:46.700
We work this out; we have -6 - 8; and we get -14.
00:25:46.700 --> 00:25:51.400
There are many ways to have done this; we could have also chosen to do this based on this column here.
00:25:51.400 --> 00:25:56.900
Really quickly, we would have had -3, since we are starting here.
00:25:56.900 --> 00:26:04.200
We start at positive, but it starts at -3; so -3 times 4, 2, -1, 0,
00:26:04.200 --> 00:26:16.400
minus...our next sign...0 times...we don't even have to care about it, because it will just knock itself out... plus 1 times -2, 1, 4, 2.
00:26:16.400 --> 00:26:18.900
Or we could have gone from a different place entirely.
00:26:18.900 --> 00:26:23.600
We could have also had this, and this would be equal; all of these ways will end up coming out to be the exact same thing.
00:26:23.600 --> 00:26:27.500
That is one of the cool properties of the determinant.
00:26:27.500 --> 00:26:46.400
-2 times 2, 0, 0, 1, minus 1 times 4, 0, -1, 1, plus -3 times 4, 2, -1, 0.
00:26:46.400 --> 00:26:54.500
There are many different ways to do this: this here is the same as this here, is the same as this here.
00:26:54.500 --> 00:26:59.900
They all end up being equal to -14; so the question of how we want to approach this--
00:26:59.900 --> 00:27:04.000
which row, which column--we just choose whichever one seems easiest to us.
00:27:04.000 --> 00:27:07.400
And even if we end up choosing the wrong one--we choose one that is slightly harder--
00:27:07.400 --> 00:27:09.500
it doesn't matter, because they all come out to be the same thing.
00:27:09.500 --> 00:27:13.800
We might have to do a few more extra arithmetic steps, but in the end, we will still get the same answer; so it is OK.
00:27:13.800 --> 00:27:16.400
You don't have to really worry about that.
00:27:16.400 --> 00:27:21.000
All right, what is this one? We have a 4 x 4, so at this point, we have to take the determinant of this.
00:27:21.000 --> 00:27:25.900
The first thing we want to do is get a nice sign grid, so we can see all of our plusses and minuses.
00:27:25.900 --> 00:27:36.200
+ - +...always a positive in the top left...- + - +, + - + -, - + - +; great.
00:27:36.200 --> 00:27:40.100
So, at this point we want to figure out which is our best row or column to choose.
00:27:40.100 --> 00:27:46.200
I see two zeroes on this column; so to me, that looks like it is going to make it easiest; I am going to go with that one.
00:27:46.200 --> 00:27:56.000
I have the 2; it crosses out these; that corresponds to this +1 here, so I just have 2 times...
00:27:56.000 --> 00:28:04.400
I cross out those other ones; I am left with -1, 3, 0, -4, 5, 4, 1, 1, 0.
00:28:04.400 --> 00:28:09.200
OK, and then 0 here and the 0 here...we don't even have to worry about them,
00:28:09.200 --> 00:28:12.200
because they are just going to multiply out to cancel out entirely.
00:28:12.200 --> 00:28:15.300
So, we only get to having to worry about the 3; that leaves us here.
00:28:15.300 --> 00:28:34.500
So, it is minus 3 times what gets crossed out: 3 times 2, -1, 3, 0, -4, 5, -3, 1, 1.
00:28:34.500 --> 00:28:38.700
OK, at this point, let's figure out, of these new ones, which ones we want to use.
00:28:38.700 --> 00:28:46.100
Let's make a new, smaller, 3 x 3 sign grid, so we can think in terms of that now.
00:28:46.100 --> 00:28:52.500
OK, so this one...what seems easiest to me is this column...and I would say this row here.
00:28:52.500 --> 00:29:01.300
We will work with those: we have 2 times whatever the determinant of that larger 3 x 3 is (this one right here);
00:29:01.300 --> 00:29:04.200
we are working with the 0, so the 0 is going to just knock things out;
00:29:04.200 --> 00:29:10.000
the only one that we really have to care about is this 4; it will be 4 times...
00:29:10.000 --> 00:29:15.200
oh, wait, 4 here is there; so we have a -4; we always have to pay attention to that cofactor
00:29:15.200 --> 00:29:19.900
bringing either a plus or a negative; that is why we make these sign grids here and here.
00:29:19.900 --> 00:29:22.000
So, we have to pay attention to cofactors.
00:29:22.000 --> 00:29:33.200
-4 times...that would cross out these things, so...-1, 3, 1, 1.
00:29:33.200 --> 00:29:41.900
And then, over here, minus 3; so we chose this one, so we are going to have this row starting here: -3 times -0...
00:29:41.900 --> 00:29:51.000
you don't have to worry about that one; plus...-4 times...it crosses out the other ones
00:29:51.000 --> 00:29:59.400
that it is horizontal and vertical on...2, 3, -3, 1 is what is left there;
00:29:59.400 --> 00:30:12.400
And then, minus 5...it crosses out, and we get 2, -1, -3, 1.
00:30:12.400 --> 00:30:16.400
All right, we start working these out; since they are 2 x 2 matrices, we can just work them out now.
00:30:16.400 --> 00:30:26.300
So, we have 2 times -4 times...-1 times 1 is -1, minus 1 times 3 is -4.
00:30:26.300 --> 00:30:46.200
Then, minus 3 times -4 times 2 times 1 (is 2), minus -3 times 3; so 2 - -9 gets +11.
00:30:46.200 --> 00:31:07.800
2 - 3(3)...we have -9...so -4 times 11, minus 5 times...2 times 1 is 2, minus 3(-1)...so 2 here, and then minus 3...
00:31:07.800 --> 00:31:22.400
-3 times -1 becomes positive 3, but we are subtracting by that, so it is 2 minus 1...2 minus 3...so we get -1.
00:31:22.400 --> 00:31:32.800
OK, so keep working that out: 2 times -4 times -4 is going to come out to be 2 times +16...
00:31:32.800 --> 00:31:54.900
minus 3...-4 times 11 is -44; these cancel out, and we get + 5; 2 times 16 is 32, minus 3...-44 + 5 is -39.
00:31:54.900 --> 00:32:09.600
These negatives cancel out; at this point we have this equal to 32 + 3(39) is going to be the same as 3(40) - 3, so + 117.
00:32:09.600 --> 00:32:21.700
32 + 117 comes out to be 149; so the determinant of our matrix is equal to 149.
00:32:21.700 --> 00:32:27.100
Great; so by carefully choosing which row we decide to work with, we can make this a whole lot easier.
00:32:27.100 --> 00:32:32.800
By choosing that third row down, we were able to get a 0 to show here and a 0 to show here,
00:32:32.800 --> 00:32:37.200
which allowed us to cancel out all of the things, so we only had to figure out two 3 x 3 determinants,
00:32:37.200 --> 00:32:41.400
which is a lot easier than having to figure out four of them or more--anything like that.
00:32:41.400 --> 00:32:47.600
So, by carefully choosing the row or column that you do your cofactor expansion on, you can make things a lot easier on yourself.
00:32:47.600 --> 00:32:51.900
The third example: Prove that, for any 2 x 2 matrix A, where the detA is not equal to 0,
00:32:51.900 --> 00:32:57.400
then A^-1 = 1/(ad - bc) times the matrix d, -b, -c, a.
00:32:57.400 --> 00:33:04.900
One thing that should be written here is that A is going to be equal to our standard form for just writing a general one, a, b, c, d.
00:33:04.900 --> 00:33:11.400
So, how would we prove this? Well, we just prove it by showing that A times this supposed A^-1
00:33:11.400 --> 00:33:14.900
does, indeed, come out to be the identity matrix, because that is what it means to be the inverse.
00:33:14.900 --> 00:33:18.700
That is that something times its inverse comes out to be the identity matrix.
00:33:18.700 --> 00:33:22.600
Some matrix times its inverse matrix comes out to be the identity matrix.
00:33:22.600 --> 00:33:24.800
That is what it means to be an inverse for matrices.
00:33:24.800 --> 00:33:30.700
So, let's just check that: let's say A^-1 times A.
00:33:30.700 --> 00:33:35.400
We don't know for sure that it actually is going to turn out to be the inverse, but let's try it.
00:33:35.400 --> 00:33:39.000
We were told that the detA is not equal to 0; it is the determinant of A...
00:33:39.000 --> 00:33:45.800
Well, remember: if this is our A right here, then the determinant of A is going to be equal to ad - bc.
00:33:45.800 --> 00:33:52.800
This would be our only worry in creating this A^-1: 1/(ad - bc)--if it is dividing by 0, everything blows up.
00:33:52.800 --> 00:33:57.300
But since we are told that the determinant of A (which is equal to ad - bc) is not equal to 0,
00:33:57.300 --> 00:34:00.200
we know that we don't have to worry about dividing by 0, so we can move on.
00:34:00.200 --> 00:34:13.500
A^-1 times A: we have 1/(ad - bc), times the matrix d, -b, -c, a.
00:34:13.500 --> 00:34:23.500
And then, times A is a, b, c, d...so first, we work through with matrix multiplication.
00:34:23.500 --> 00:34:34.500
We have our 1/(ad - bc); we will scale later; right now, it will be easier to just work with just the variables, without that fraction getting in the way.
00:34:34.500 --> 00:34:43.000
So, the first column: we know we will get out to a 2 x 2 matrix in the end; so first row times first column:
00:34:43.000 --> 00:34:53.500
d times a...actually, let's expand this even more...minus b times c; great.
00:34:53.500 --> 00:35:02.100
The next one: d times b, minus b times d.
00:35:02.100 --> 00:35:11.000
The second row on the first column now: -c,a on a,c; -c on a gets us -ca; a on c gets us + ac.
00:35:11.000 --> 00:35:19.000
The last one: -c,a on b,d gets us -cb + ad.
00:35:19.000 --> 00:35:24.600
So, we see this; and we do a little bit of simplification, moving things around.
00:35:24.600 --> 00:35:33.800
Well, db - bd...since b and d are just real numbers, they are commutative, so db - bd just cancel each other out.
00:35:33.800 --> 00:35:36.700
-ca + ac: once again, they knock each other out.
00:35:36.700 --> 00:35:42.600
We can rearrange things a little bit; so we have 1/(ad - bc) times the matrix.
00:35:42.600 --> 00:35:53.300
Well, da - bc is the same thing as ad - bc; this is 0, and this is 0; and -cb + ad...well, we can write that as ad - bc.
00:35:53.300 --> 00:36:01.700
So, 1/(ad - bc) times this...well, we will get 1, 0, 0, 1, which is exactly what we were looking for.
00:36:01.700 --> 00:36:06.100
So, this is, indeed, equal to identity matrix; and if we were to do it the other way,
00:36:06.100 --> 00:36:13.500
A times A^-1, to multiply our inverse from the right side, it would end up coming out the same; we would get the same answer.
00:36:13.500 --> 00:36:18.200
And it turns out that, if you find a matrix that works on one side, you know that it has to work on the other side.
00:36:18.200 --> 00:36:21.000
But that is a little bit of a deeper result that we haven't talked about explicitly.
00:36:21.000 --> 00:36:26.000
But you could prove this just by hand, if you wanted to show AA^-1; but that is pretty good.
00:36:26.000 --> 00:36:34.200
The final example: Given that B = -2, 3, 0, 4, and AB = -6, 29, 4, 22, find the matrix A.
00:36:34.200 --> 00:36:36.600
How are we going to do this? We don't know what A is.
00:36:36.600 --> 00:36:41.200
We know what AB is; we know what B is; well, notice that we can create a plan like this:
00:36:41.200 --> 00:36:46.500
AB = AB--that is kind of obvious, but it is true.
00:36:46.500 --> 00:36:56.300
So, if we came along, we could knock out that B with B^-1, so we could have AB = AB,
00:36:56.300 --> 00:37:00.700
and then we would come along and hit it with B^-1 on both sides.
00:37:00.700 --> 00:37:07.400
And now, we could rewrite this as A =...well, we could cancel out to A on the right side,
00:37:07.400 --> 00:37:14.700
but we could also see that it is just AB times B^-1.
00:37:14.700 --> 00:37:22.800
We know AB; we know B; and so, if there is a B^-1, we can figure out what it is from our B.
00:37:22.800 --> 00:37:26.500
So, our first step is to figure out what B^-1 is.
00:37:26.500 --> 00:37:32.300
And then, once we know what B^-1 is, we just have AB times B^-1, and we will have our A.
00:37:32.300 --> 00:37:36.600
So, that is our theoretical understanding; now it is time to just do the arithmetic.
00:37:36.600 --> 00:37:44.700
If B = -2, 3, 0, 4, then B^-1 equals 1 over the determinant, which is ad - bc,
00:37:44.700 --> 00:37:54.500
so -2 times 4, minus 0 times 3; so that is -8; times...we flip the location of the main diagonal,
00:37:54.500 --> 00:37:58.800
and then we put negatives on the other ones: -3 and -0 (we can write as just 0).
00:37:58.800 --> 00:38:06.800
Simplify that just a little bit to -1/8 times 4, -3, 0, -2.
00:38:06.800 --> 00:38:18.900
Great; so at this point, we know, from what we showed here, that A is equal to AB times B^-1.
00:38:18.900 --> 00:38:39.800
Well, we know that AB is -6, 29, 4, 22; and B^-1 is -1/8 times 4, -3, 0, -2.
00:38:39.800 --> 00:38:44.500
So, I think it is easier to bring the fraction in afterwards; so let's pull the fraction to the front.
00:38:44.500 --> 00:38:47.800
The fraction there is just a scalar, so it is just going to scale the matrix.
00:38:47.800 --> 00:38:54.100
We can scale the matrix any time we want; let's just pull it out to the front, so we can have our matrices do their multiplication.
00:38:54.100 --> 00:39:07.700
We have -6, 29, 4, 22; 4, -3, 0, -2; OK.
00:39:07.700 --> 00:39:13.900
There is still that fraction up at the front: -1/8 times whatever comes out of this.
00:39:13.900 --> 00:39:27.800
It will come out to be a 2 x 2; -6, 29 times 4, 0: -6 times 4 gets us -24; 29 times 0 is just 0.
00:39:27.800 --> 00:39:42.000
-6, 29 on -3, -2; -6 times -3 gets us positive 18; 29 times -2 gets us -58; so that gets us a positive 40.
00:39:42.000 --> 00:39:48.000
Oops, I'm sorry; it is not positive; 29 times -2 got us -58, so it is a -40; I'm sorry about that.
00:39:48.000 --> 00:39:56.000
4, 22 on 4, 0: 4 times 4 gets us 16; and 22 times 0 is just 0.
00:39:56.000 --> 00:40:07.400
4, 22 on -3, -2: 4 times -3 is -12; 22 times -2 is -44; -12 - 44 comes out to be -56.
00:40:07.400 --> 00:40:18.700
So, at this point, we can use our -1/8; we simplify this out: we get -1/8 times -24 will become...24/8 is 3; the negatives cancel out, so we get +3.
00:40:18.700 --> 00:40:29.400
-1/8 times -40 becomes positive 5; -1/8 times 16 becomes -2; -1/8 times -56 becomes positive 7.
00:40:29.400 --> 00:40:36.400
We have A = 3, 5, -2, 7; and there we are.
00:40:36.400 --> 00:40:40.900
We had to do a lot of arithmetic to get to this point, so let's double-check and make sure that that is the answer.
00:40:40.900 --> 00:40:48.000
We know that A times B has to be this right here, because we were given AB, right from the beginning.
00:40:48.000 --> 00:40:50.600
So, let's take a look: what would A times B be?
00:40:50.600 --> 00:40:56.500
Well, we know what the A that we just figured out is: that is 3, 5, -2, 7;
00:40:56.500 --> 00:41:02.800
and the B we started with, that we were given, is -2, 3, 0, 4.
00:41:02.800 --> 00:41:17.300
So, we work this out; the 3, 5 on -2, 0 is going to get us a -6; 3, 5 on 3, 4 is going to get us 9 + 20, so 29.
00:41:17.300 --> 00:41:31.000
-2, 7 on -2, 0 is going to get us -2 times -2...+4; and -2, 7 on 3, 4...-2 times 3 gets us -6; 7 times 4 gets us 28; add those together--you get 22.
00:41:31.000 --> 00:41:36.700
And so, that is exactly the AB that we started with; so it checks out--our answer is good.
00:41:36.700 --> 00:41:40.200
Great; all right, so that completes an understanding of determinants and inverses.
00:41:40.200 --> 00:41:43.500
We have a great understanding of how that works right now.
00:41:43.500 --> 00:41:45.600
We will see you at Educator.com later--goodbye!
00:41:45.600 --> 00:41:54.100
However, if you want to check out the stuff for if we want to be able to do inverses for larger than 2 x 2,
00:41:54.100 --> 00:41:58.900
larger than just that simple formula, let's take a look at it--let's look at that.
00:41:58.900 --> 00:42:05.300
Finding the inverse of larger matrices: for the method we are about to discuss, we will need some techniques we haven't learned just yet.
00:42:05.300 --> 00:42:12.300
In the first part of the next lesson, we discuss augmented matrices, row operations, and Gauss-Jordan elimination.
00:42:12.300 --> 00:42:17.100
You will need to be familiar with these things before what we are about to talk about will totally make sense.
00:42:17.100 --> 00:42:21.300
So, if you haven't already seen these things, go and check them out first, and then come back and watch this part.
00:42:21.300 --> 00:42:25.700
It is just the first half of the next lesson--actually, probably more like the first third.
00:42:25.700 --> 00:42:29.900
The method we are about to go over is applicable for finding the inverse of any m x n matrix.
00:42:29.900 --> 00:42:34.400
If the matrix has no inverse, if it is singular, this method will end up failing.
00:42:34.400 --> 00:42:39.400
It is normally easier to first check that there is going to be an inverse, before trying to put all of this work into it.
00:42:39.400 --> 00:42:41.900
Just check to make sure that there is an inverse by getting the determinant,
00:42:41.900 --> 00:42:46.200
because getting the determinant will actually take much less time that working through this method.
00:42:46.200 --> 00:42:51.300
It is a good idea to check the determinant first to make sure that what you are doing will actually manage to work out.
00:42:51.300 --> 00:42:58.400
All right, let's see how to do this: for an m x n matrix A, you begin by creating an augmented matrix with the identity matrix I<font size="-6">n</font>.
00:42:58.400 --> 00:43:05.800
So, if we have some A that is 1, 3, -2, -4, then we leave that part the same, and we drop in an identity matrix.
00:43:05.800 --> 00:43:11.500
Since this is a 2 x 2, this ends up being a 2 x 2 identity matrix, right here.
00:43:11.500 --> 00:43:21.400
We have 1, 3, 1, 0; -2, -4, 0, 1; we have it split in this middle, where the left side is A, and the right side is the identity matrix.
00:43:21.400 --> 00:43:26.600
OK, the next step: you start applying the method of Gauss-Jordan elimination.
00:43:26.600 --> 00:43:32.400
You use row operations to reduce A, that left side, to the identity matrix.
00:43:32.400 --> 00:43:37.500
The result of the augmented matrix, once you manage to finally get this to be the identity matrix--
00:43:37.500 --> 00:43:42.300
what you will have on the right side will be the inverse; you will have A^-1 on the right side.
00:43:42.300 --> 00:43:49.000
So, for example, if we have 1, 3, -2, -4, our first step is that we want to turn this into a 0.
00:43:49.000 --> 00:43:56.400
We are doing Gauss-Jordan: so we take our row 2, and we add 2 times row 1; so 2 times 1 gets us +2;
00:43:56.400 --> 00:44:04.000
that cancels to 0; 2 times 3 gets us +6 on -4; that goes to 2; 2 times 1 on 0 gets us 2;
00:44:04.000 --> 00:44:08.600
2 times 0 on 1 is the same as it was before; so we have our new matrix here.
00:44:08.600 --> 00:44:13.600
We continue with this method; we had 1, 3, 1, 0; 0, 2, 2, 1 on the previous slide.
00:44:13.600 --> 00:44:19.000
So at this point, we want to turn this into a 1; so we multiply that entire row by 1/2.
00:44:19.000 --> 00:44:25.100
This becomes 1; 2 times 1/2 becomes 1; 1 times 1/2 becomes 1/2.
00:44:25.100 --> 00:44:30.400
At this point, we now want to get rid of this; we want to turn this into a 0 to continue with Gauss-Jordan elimination.
00:44:30.400 --> 00:44:37.800
So, we subtract: we have a 1 here already, so we subtract 3 of row 2: so -3 times this:
00:44:37.800 --> 00:44:45.800
1 times -3 on 3 gets us 0; and also, 0 times -3 gets us 1; we don't have any effect there.
00:44:45.800 --> 00:44:52.600
Minus 3 here gets us -2; and -3 on 1/2 gets us -3/2.
00:44:52.600 --> 00:45:00.100
So, at this point, we have an identity matrix here; this is just an identity matrix, because it is 1's on the main diagonal and 0's everywhere else.
00:45:00.100 --> 00:45:06.500
So, what we have over here on the right side is our inverse matrix, A.
00:45:06.500 --> 00:45:12.000
That is our inverse matrix A; we just bring it down and turn that into a matrix, and we have our answer.
00:45:12.000 --> 00:45:15.800
Finally, you want to check your work; it is really easy to make a mistake in all of that arithmetic.
00:45:15.800 --> 00:45:21.700
We were doing the simplest possible of 2 x 2; if you have to do this by hand, you are going to have to be at least doing 3 x 3 or larger.
00:45:21.700 --> 00:45:25.000
So, it is really easy to end up making a mistake in all of that arithmetic.
00:45:25.000 --> 00:45:28.900
So, make sure to do notations of what your row operations were, what we saw on the left there,
00:45:28.900 --> 00:45:31.700
what we talk about in the next lesson when we explain this stuff.
00:45:31.700 --> 00:45:34.800
And also, at the end, once you get to the very end, check your answer;
00:45:34.800 --> 00:45:38.000
make sure that A^-1 times A is equal to the identity matrix,
00:45:38.000 --> 00:45:40.800
or A times A^-1 is equal to the identity matrix.
00:45:40.800 --> 00:45:45.500
So, for example, we started with A = this, and we figured out that A^-1 should equal this.
00:45:45.500 --> 00:45:50.200
So, we check our work: we multiply the two matrices together.
00:45:50.200 --> 00:45:57.700
1, 3 times -2, 1: well, 1 times -2, plus 3 times 1...-2 + 3; that comes out to be 1.
00:45:57.700 --> 00:46:06.200
1, 3 on -3, 2; that gets us -3, 2 + 3, 2, so that comes out to be 0; they cancel out.
00:46:06.200 --> 00:46:15.600
Next, -2, -4 on -2, 1; -2 times -2 is 4, minus 4 times 2...4 - 4...that comes out to be 0.
00:46:15.600 --> 00:46:28.400
And then, -2, -4 on -3, 2...3/2 times 1/2...so -2 times -3/2 gets us positive 6/2, minus 4/2; so we get 1 out of that.
00:46:28.400 --> 00:46:35.600
Ultimately, it all checks out; we have figured out that this is, indeed, the inverse; it does end up working out just fine.
00:46:35.600 --> 00:46:40.900
It is a really good idea to check your work at this point, because it is easy to make a mistake when you are doing that much arithmetic.
00:46:40.900 --> 00:46:45.300
So, if you have to do this stuff by hand, always check your work at the end, because it is going to be a small amount of time
00:46:45.300 --> 00:46:47.400
compared to the massive amount of time that you spend doing this.
00:46:47.400 --> 00:46:49.800
And it would be a real shame if it ended up not being true.
00:46:49.800 --> 00:46:55.000
All right, I hope that gives you a pretty good sense of how all this inverse and determinant stuff works.
00:46:55.000 --> 00:47:00.400
And we will see you in the next lesson, when we finally get to see an application of just how powerful matrices are--
00:47:00.400 --> 00:47:05.400
why we have been interested in them; it is because they allow us to do all sorts of really amazing things
00:47:05.400 --> 00:47:10.400
that make things much easier than they would be from what we are used to so far--some pretty cool stuff.
00:47:10.400 --> 00:47:12.000
All right, we will see you at Educator.com later--goodbye!