WEBVTT mathematics/pre-calculus/selhorst-jones
00:00:00.000 --> 00:00:02.500
Hi--welcome back to Educator.com.
00:00:02.500 --> 00:00:05.900
Today, we are finally going to see why we have been studying matrices--just how powerful they are.
00:00:05.900 --> 00:00:09.700
We are going to use matrices to solve systems of linear equations.
00:00:09.700 --> 00:00:19.300
Consider the following system of linear equations: x + y + z = 3; 2x - 2y + 3z = -4; and -x - z = 0.
00:00:19.300 --> 00:00:23.100
Notice that, as long as we keep the variables in the same order for each equation (we can't swap it
00:00:23.100 --> 00:00:31.500
to y + x + z; we keep it in xyz order every time), we could write these coefficients to all of the variables as a coefficient matrix.
00:00:31.500 --> 00:00:37.200
What we have in front of this x is just a 1; in front of this y is just a 1; and in front of this z is just a 1.
00:00:37.200 --> 00:00:44.700
So, we can write a first row of 1, 1, 1, all of these coefficients that are on that row right there of the equation.
00:00:44.700 --> 00:00:55.100
For the next one, we have 2, -2, 3; so we put them all down here; so we have done that equation as the coefficients in that row, showing up there.
00:00:55.100 --> 00:01:00.200
And since we can always trust that we are going to have the x, the y, and the z here,
00:01:00.200 --> 00:01:08.200
because we are always staying in this order of x, y, z (that is why we have to keep the variables in the same order each time),
00:01:08.200 --> 00:01:14.100
we can create this coefficient matrix; and finally, we have -1 here and -1 here.
00:01:14.100 --> 00:01:20.700
And why do we have a 0? Well, if y doesn't show up, it must be because we have a 0y; so that is why we get a 0.
00:01:20.700 --> 00:01:25.600
So, we have done all 3 equations, the coefficients to the variables in all three equations.
00:01:25.600 --> 00:01:29.400
This idea of converting the information in a linear system into a matrix
00:01:29.400 --> 00:01:34.200
will allow us to explore ways that we can have linear systems interact with matrices and vice versa.
00:01:34.200 --> 00:01:38.600
How can a matrix allow us to solve a linear system of equations?
00:01:38.600 --> 00:01:43.700
Our first idea is the augmented matrix; we can take this idea of the coefficient matrix and expand on it.
00:01:43.700 --> 00:01:48.900
Instead of just representing coefficients for the equations, we can represent an entire linear system,
00:01:48.900 --> 00:01:51.900
the solutions included, with an augmented matrix.
00:01:51.900 --> 00:01:58.000
So, previously we didn't have the constants for the equations, what was on the right side of the equals sign.
00:01:58.000 --> 00:02:01.500
So now, we have that show up on the right side over here.
00:02:01.500 --> 00:02:06.300
So now, we have the coefficients, and we have what each of those equations is equal to.
00:02:06.300 --> 00:02:16.300
So, each row represents an equation of the system: x + y + z = 3 is 1, 1, 1, 3, because that first 1
00:02:16.300 --> 00:02:22.400
represents the coefficient on x; the first one on the y; the first one on the z; and it all comes together to equal 3,
00:02:22.400 --> 00:02:27.200
because we know that just addition is what is going on between all of those coefficients, because it is a linear system.
00:02:27.200 --> 00:02:33.600
Each left-side column gives a variable's coefficients: all of the coefficients to x show up here.
00:02:33.600 --> 00:02:40.600
We have 1, 2, and -1 on the x, and we have 1, 2, and -1 in that column, as well, on the left side.
00:02:40.600 --> 00:02:43.500
Where the variable does not appear, it has a coefficient of 0.
00:02:43.500 --> 00:02:51.400
The 0 is to show that we have nothing for y here, because if you have nothing, we can think of it as just 0 times y.
00:02:51.400 --> 00:02:59.500
The vertical line represents equalities; since this vertical line here is representing each of these, there is an equals sign here.
00:02:59.500 --> 00:03:03.400
And finally, the right-side column, this column here, gives us...
00:03:03.400 --> 00:03:06.900
This column of our matrix is the constant terms from our equations.
00:03:06.900 --> 00:03:12.500
So, we have a way of converting that entire set of equations into a single matrix.
00:03:12.500 --> 00:03:19.100
So now, we can look at how we can play around with this matrix to have it give up what those variables are equal to.
00:03:19.100 --> 00:03:25.700
Since we can represent a linear system as an augmented matrix, we can do operations on the matrix the same way we interact with a linear system.
00:03:25.700 --> 00:03:29.600
Anything that would make sense to do to a linear system, to an equation in a linear system,
00:03:29.600 --> 00:03:33.100
should make sense--there should be a way to do it over on the matrix version,
00:03:33.100 --> 00:03:39.900
because since we can do it to a linear system, and our augmented matrix is just showing us a linear system--
00:03:39.900 --> 00:03:44.400
it is a way to portray a linear system--then if we can figure out a way to interact with our matrix
00:03:44.400 --> 00:03:48.100
that is the same as interacting with a linear system, we know that it is just fine.
00:03:48.100 --> 00:03:51.600
So, that gives us the idea of 3 row operations.
00:03:51.600 --> 00:03:55.600
The first one is to interchange the locations of two rows.
00:03:55.600 --> 00:03:58.900
If I have row 1 and row 2, I can swap their places.
00:03:58.900 --> 00:04:03.000
Our next idea is to multiply or divide a row by a non-zero number.
00:04:03.000 --> 00:04:09.200
I can multiply an entire row by 2 or by 5 or by -10--whatever I want to--
00:04:09.200 --> 00:04:13.200
or divide by 2, because that is just the same as multiplying by 1/2.
00:04:13.200 --> 00:04:16.700
And then finally, add or subtract a multiple of one row to another.
00:04:16.700 --> 00:04:27.000
If I have row 2 here and row 5 here, I can have row 5 subtract twice on itself; so it is row 2 - 2(row 5).
00:04:27.000 --> 00:04:30.500
I can have a multiple of one row subtract from another one.
00:04:30.500 --> 00:04:34.000
So, why does this make sense--how is this like a linear system?
00:04:34.000 --> 00:04:37.800
Well, all of these operations are completely reasonable, if we had a linear system.
00:04:37.800 --> 00:04:44.600
If we have an equation here and an equation here, it is totally meaningless for us to swap the order that the equations come in.
00:04:44.600 --> 00:04:48.700
The location of the equation isn't an important thing when we are working with a linear system.
00:04:48.700 --> 00:04:52.200
We just have to look at all of them, so it doesn't matter which came first and which came last.
00:04:52.200 --> 00:04:54.000
So, we can move them around, and it doesn't matter.
00:04:54.000 --> 00:04:58.600
That means that we can move our rows around, and it doesn't matter, because it is just representing a linear system.
00:04:58.600 --> 00:05:02.400
Similarly, multiplying both sides of an equation is just algebra.
00:05:02.400 --> 00:05:07.900
If I have an equation, I can multiply 2 on the left side and 2 on the right side, and that is just fine.
00:05:07.900 --> 00:05:12.800
You can think of that as multiplying each of the numbers inside of the equation.
00:05:12.800 --> 00:05:18.500
If we multiply each of the numbers inside of the equation, that is the same thing as just multiplying an entire row of our augmented matrix.
00:05:18.500 --> 00:05:21.800
Finally, adding a multiple of an equation is elimination.
00:05:21.800 --> 00:05:27.500
Remember: when we were talking about linear systems at first, elimination was when we can add a multiple of one equation to another equation.
00:05:27.500 --> 00:05:32.900
Well, that is the same thing as adding a multiple of one row to another row over in the augmented matrix version.
00:05:32.900 --> 00:05:35.900
So, everything here has a perfect parallel between the two ideas.
00:05:35.900 --> 00:05:41.100
Each one of our row operations makes total sense, if we were just working with a linear system.
00:05:41.100 --> 00:05:48.200
And since our augmented matrix is just representing a linear system, they make sense over here with the augmented matrices, as well.
00:05:48.200 --> 00:05:56.200
While row operations are a simple idea (each one of these is pretty simple--swap; multiply; or add a multiple--not that crazy)--
00:05:56.200 --> 00:05:59.700
working with them will involve a lot of arithmetic and steps.
00:05:59.700 --> 00:06:04.500
You are going to have a lot of calculations going on, and while none of them will probably be very hard calculations,
00:06:04.500 --> 00:06:08.200
you are going to be doing so many that it is easy to make mistakes.
00:06:08.200 --> 00:06:11.700
So, when you are working on row operations, when you are working on doing this stuff,
00:06:11.700 --> 00:06:16.100
I want you to be careful with what you are doing, and counter the fact that you are likely to make mistakes
00:06:16.100 --> 00:06:20.000
by noting each step: note what you just did for each step.
00:06:20.000 --> 00:06:24.200
In addition to this being a good way to keep you from making mistakes, some teachers will simply require it,
00:06:24.200 --> 00:06:26.600
and won't give you credit if you don't do it; and that is pretty reasonable,
00:06:26.600 --> 00:06:31.400
because you will definitely end up making mistakes sooner or later if you don't do this sort of thing.
00:06:31.400 --> 00:06:37.600
So, take a note of what you did on each step; show what you did between the first one, and then the second one,
00:06:37.600 --> 00:06:41.100
and then the third one, by writing on the side what you just did.
00:06:41.100 --> 00:06:45.400
This will make it easier to avoid making mistakes, and it will help you find any that manage to creep through.
00:06:45.400 --> 00:06:48.600
If you get to the end, and you see that this doesn't make sense--something must have gone wrong--
00:06:48.600 --> 00:06:53.600
you can go up and carefully analyze each of your steps, and figure out where you made a mistake.
00:06:53.600 --> 00:06:56.400
Or maybe things actually do come out to be weird for some reason.
00:06:56.400 --> 00:06:59.900
So, here are some suggested symbols for each of the three row operations.
00:06:59.900 --> 00:07:04.500
You don't have to use them; use whatever makes sense to you (and if your teacher cares about it, whatever makes sense to your teacher).
00:07:04.500 --> 00:07:07.900
But these work well for me, and I think they make sense, pretty clearly.
00:07:07.900 --> 00:07:15.000
If we are interchanging row i and row j (we are swapping their locations), I like just a little arrow, left-right, between them.
00:07:15.000 --> 00:07:19.800
We show some row by using a capital R to talk about a row, and then the number of it.
00:07:19.800 --> 00:07:24.600
For example, if we want to talk about the second row, we would just talk about it as R₂.
00:07:24.600 --> 00:07:29.900
If we wanted to talk about the ninth row, it would be R₉; and so on, and so on.
00:07:29.900 --> 00:07:35.200
So, if we are swapping row i and row j, we have R<font size="-6">i</font>, little arrow going back and forth, R<font size="-6">j</font>.
00:07:35.200 --> 00:07:43.600
If we want to multiply row i by the number k (we are multiplying by k), we just have k times row i--as simple as that.
00:07:43.600 --> 00:07:52.300
And finally, if we are adding a multiple of row i to row j, then we have kR<font size="-6">i</font> (k times row i,
00:07:52.300 --> 00:07:57.100
the thing that we are adding the multiple of) to what it is being added to.
00:07:57.100 --> 00:08:02.600
We will see these pretty soon, when we are actually starting to see how this stuff gets done.
00:08:02.600 --> 00:08:09.200
Gauss-Jordan elimination: here is an idea: since all of our row operations make sense for solving a linear system--
00:08:09.200 --> 00:08:14.400
they all make sense for a way to do it--we can apply them to find the value of each variable.
00:08:14.400 --> 00:08:24.900
If we manage to get our augmented matrix in a form like this form right here, we would immediately know what each variable is; why?
00:08:24.900 --> 00:08:31.300
Well, notice: this first row here has 1, 0, 0; well, 1 here would correspond to the x here.
00:08:31.300 --> 00:08:36.600
And then, this one here would be non-existent, because there are two 0's there; so there would be no y; there would be no z.
00:08:36.600 --> 00:08:39.800
And we know that it is equal to -17.
00:08:39.800 --> 00:08:47.700
The exact same thing is going on here; we know that y, because that is the y column, must be equal to 8 (nothing else shows up),
00:08:47.700 --> 00:08:51.400
and that z (since that is the z column) must be equal to 47.
00:08:51.400 --> 00:08:56.100
We have managed to solve the system by just moving stuff around in this augmented matrix.
00:08:56.100 --> 00:09:01.100
We know that that has to be true, because that augmented matrix must be equivalent to the linear system,
00:09:01.100 --> 00:09:05.900
because we turned our linear system into an augmented matrix, and then we had all of these row operations
00:09:05.900 --> 00:09:08.100
that are just the same as working with a linear system.
00:09:08.100 --> 00:09:11.200
So, what we have here is still the same as our original linear system.
00:09:11.200 --> 00:09:15.900
So, we can convert back to the linear system and see what our answers are.
00:09:15.900 --> 00:09:23.100
We call this format for a matrix reduced row echelon form; it is a mouthful, and it is kind of confusing at first.
00:09:23.100 --> 00:09:29.000
Echelon has something to do with a triangle shape; it is "row echelon" because the rows are kind of arranged in a triangle,
00:09:29.000 --> 00:09:31.700
and "reduced" because they all start with 1's, and there are 0's...
00:09:31.700 --> 00:09:37.400
Honestly, don't really worry about it; just know reduced row echelon form, that really long name, and you will be fine.
00:09:37.400 --> 00:09:41.200
While it has a formal definition (there is a way to formally define it), it is going to be enough
00:09:41.200 --> 00:09:45.200
for us to just think of it in this casual way, where it is a diagonal of 1's.
00:09:45.200 --> 00:09:51.100
That main diagonal will have all 1's on it; it will start at the top left, and it will continue down diagonally.
00:09:51.100 --> 00:09:53.000
And it will have 0's above and below.
00:09:53.000 --> 00:10:03.200
So, we have 1's along the main diagonal, and above and below our 1's, there will be 0's.
00:10:03.200 --> 00:10:07.200
So, we have a 0 here above the 1's and a 0 here below the 1's.
00:10:07.200 --> 00:10:11.500
We have 0's here above the 1's and a 0 here below the 1's.
00:10:11.500 --> 00:10:16.200
Finally, the numbers on the far right can be any number.
00:10:16.200 --> 00:10:20.600
Over here, -5, 8...it doesn't matter; over here, we manage to have two columns,
00:10:20.600 --> 00:10:28.300
because the 1 diagonal's part of the reduced row echelon form is just an identity matrix.
00:10:28.300 --> 00:10:31.700
So, it can't get any farther than whatever the square portion of it would be.
00:10:31.700 --> 00:10:34.100
So, we can end up having multiple columns, as well.
00:10:34.100 --> 00:10:41.500
But in our case, when we are working on this elimination to solve linear systems, we will always only have a single column on the far right.
00:10:41.500 --> 00:10:48.000
Anyway, the point is that we have this diagonal of 1's with 0's above and below; and the stuff on the far right can be any number.
00:10:48.000 --> 00:10:53.600
Now, from what we have just discussed, if we can use row operations to put an augmented matrix in reduced row echelon form,
00:10:53.600 --> 00:10:56.800
like this one right here, we will solve its associated linear system,
00:10:56.800 --> 00:11:02.100
because we will know that, since there is only one of a variable in that row, it must be equal to the constant
00:11:02.100 --> 00:11:09.400
on the other side of the augmented matrix--one the right side of the augmented matrix, past that vertical line that shows equality.
00:11:09.400 --> 00:11:11.700
We will have solved its associated linear system.
00:11:11.700 --> 00:11:16.400
Gauss-Jordan elimination is just named after the people who created it.
00:11:16.400 --> 00:11:22.800
It is a method we can follow to produce reduced row echelon form matrices through row operations to solve linear systems.
00:11:22.800 --> 00:11:29.600
It is just a simple method of being able to get 0's to show up and 1's to show up on the diagonal, and then we are done.
00:11:29.600 --> 00:11:34.900
So, it is just a method that we can follow through that will always end up resulting in a reduced row echelon form.
00:11:34.900 --> 00:11:36.700
All right, so let's see how it is done.
00:11:36.700 --> 00:11:45.000
The very first thing you do for Gauss-Jordan elimination is: you take your linear system, and you write it in augmented matrix form.
00:11:45.000 --> 00:11:47.600
So, we have our augmented matrix form over here.
00:11:47.600 --> 00:11:55.100
We look at the coefficients; we convert them over; the line to show the equals signs is here, and then our constants are on the far right side.
00:11:55.100 --> 00:12:01.800
All right, the next thing: you use row operations to attain a 1 in the top left
00:12:01.800 --> 00:12:06.400
(we start in the top left here), and then 0's below.
00:12:06.400 --> 00:12:11.400
We get a 1 here; and then we wanted 0's below it, because it is a 1, and 0's are above and below.
00:12:11.400 --> 00:12:20.000
So, we start working with 1's, creating 1's...well, sorry, from your point of view...creating 1's and creating 0's underneath them.
00:12:20.000 --> 00:12:26.000
So, we first get a 1 up here; and then we create the 0's underneath it.
00:12:26.000 --> 00:12:31.500
Once we have done that, we move on to creating the next one diagonally down and doing 0's below that.
00:12:31.500 --> 00:12:34.500
And we just keep repeating until we have made it all the way down the diagonal.
00:12:34.500 --> 00:12:40.500
So, you just keep going until you are all the way down the diagonal, creating 1's and creating 0's below.
00:12:40.500 --> 00:12:44.200
First, we started with a 1 up here; we already have the first thing done.
00:12:44.200 --> 00:12:47.600
So, our next step is...how do we get this stuff to turn into 0's?
00:12:47.600 --> 00:12:56.400
We do row operations: we want to get rid of this 2, so since row 1 has a 1 there, we subtract by 2(row 1).
00:12:56.400 --> 00:13:15.600
2 row 1 gets us -2 here, -2 here; this becomes a 0; -2 times 1 on -2 gets us -4; 1 times -2, added to 3, gets us 1; and -2 times 3, added to -4, gets us -10.
00:13:15.600 --> 00:13:20.300
Next, we are adding row 1, because we need to get rid of this -1 here.
00:13:20.300 --> 00:13:33.100
So, we add row 1, because it is positive 1; add +1 to -1; we get 0; add +1 to 0; we get 1; add +1 to -1; we get 0; add +3,
00:13:33.100 --> 00:13:41.300
because it is just a multiple--how many times we are adding whatever is on that first row, because it was just 1 of row 1-- 3 on 0 gets us 3.
00:13:41.300 --> 00:13:44.300
All right, at this point, we have 0's below; great.
00:13:44.300 --> 00:13:48.300
So now, we are ready to move on to the next step in the diagonal.
00:13:48.300 --> 00:13:51.900
All right, our next step in the diagonal is going to be this -4 here.
00:13:51.900 --> 00:13:53.900
We want to get that to turn into a 1.
00:13:53.900 --> 00:14:04.300
We could do this by manipulating it with canceling things out, or by dividing both sides of that entire row by -4,
00:14:04.300 --> 00:14:09.700
or multiplying the entire row by -1/4; but we might notice that we already have a 1 here.
00:14:09.700 --> 00:14:18.300
Well, let's just use that: if we swap these two rows, we will manage to have a 1 in our next location; great--we do that instead.
00:14:18.300 --> 00:14:24.500
So, we make row 2 swap with row 3, because up here, they used to be row 2 and row 3.
00:14:24.500 --> 00:14:31.000
And now, they take their new spots; they swap locations; and we have our new matrix right here.
00:14:31.000 --> 00:14:41.900
The next step: we see that we have the 1 here, so our next step is...we need to turn everything below the 1's to 0's on this first portion.
00:14:41.900 --> 00:14:47.500
So, how do we do that? Well, we can add +4 times row 2, because we have a 1 here.
00:14:47.500 --> 00:14:51.200
So, we add 4 times that, and that will cancel out the -4.
00:14:51.200 --> 00:14:57.300
4 times 1, added to this, gets us 0; 0 times 4, added to 0--we still have 0.
00:14:57.300 --> 00:15:02.900
0 times 4, added to this--we just have 1 still; 3 times 4, added to -10, gets us 2.
00:15:02.900 --> 00:15:10.200
So, at this point, notice that we have nothing but 1's on our main diagonal, and we have 0's all below it.
00:15:10.200 --> 00:15:17.100
However, we don't have 0's above it yet; there are things other than that; so that is the next step.
00:15:17.100 --> 00:15:26.700
Once you have 1's all along the main diagonal and 0's all along below that main diagonal,
00:15:26.700 --> 00:15:29.700
the next step is to cancel out the stuff above it.
00:15:29.700 --> 00:15:39.900
Our first thing is: we work from the bottom right of the diagonal, and we cancel out above the 1's.
00:15:39.900 --> 00:15:44.200
You work your way up: so our first step is to cancel out everything here and here.
00:15:44.200 --> 00:15:48.600
But we notice that, because this row is 0, 1, 0, we can actually do it in one step,
00:15:48.600 --> 00:15:53.800
where we can subtract one of row 3 and one of row 2 (it is getting kind of hard to see, with all of those colors there).
00:15:53.800 --> 00:16:04.300
So, subtracting one of row 3: we have 1 here, minus 1; so now we subtract 2 on this, so we have 3 - 2 so far,
00:16:04.300 --> 00:16:11.100
for what is going to show up here; let's also subtract by row 2; row 2...minus here...
00:16:11.100 --> 00:16:16.300
1 - 1 comes out to be 0; since it is zeroes everywhere else on that row, we don't have to worry about them interfering,
00:16:16.300 --> 00:16:25.900
except for over here; we have it subtracting by another 3; so 3 - 2 - 3 comes out to be equal to -2, and we get -2 here.
00:16:25.900 --> 00:16:29.700
At this point, we have reduced row echelon form.
00:16:29.700 --> 00:16:34.700
We have 1's on the main diagonal and 0's above and below, so we can convert this.
00:16:34.700 --> 00:16:42.300
Our x here becomes -2; the representative -1 of y here becomes 3, so we have y = 3.
00:16:42.300 --> 00:16:47.400
And the representative 1z becomes z = 2; so now we have solved the thing.
00:16:47.400 --> 00:16:52.700
And I want you to know: if there is no solution, or infinitely many--if our linear system can't be solved,
00:16:52.700 --> 00:16:56.700
or it has infinitely many solutions--this method will end up not working.
00:16:56.700 --> 00:17:03.600
You will not be able to achieve reduced row echelon form if there is no solution or infinitely many solutions.
00:17:03.600 --> 00:17:06.100
So, that is something to keep in mind.
00:17:06.100 --> 00:17:12.700
All right, a new way to do this: we are going to look at a total of 3 different ways to solve linear systems, each using matrices.
00:17:12.700 --> 00:17:15.000
Another way to do this is through Cramer's Rule.
00:17:15.000 --> 00:17:17.600
We can find the solutions to a linear system by this rule.
00:17:17.600 --> 00:17:21.900
Given a two-variable system (we will start with 2 x 2, until we get a good understanding of what is going on),
00:17:21.900 --> 00:17:30.400
where we have the a's (each of our a's here is just a constant), a<font size="-6">11</font>x, a<font size="-6">12</font>y, a<font size="-6">21</font>x, a<font size="-6">22</font>y,
00:17:30.400 --> 00:17:35.300
is equal to constants on the right side (b₁ and b₂ are also constants),
00:17:35.300 --> 00:17:43.400
we can create a normal coefficient matrix (A is the normal coefficient matrix).
00:17:43.400 --> 00:17:48.200
All of our coefficients, a<font size="-6">11</font>, a<font size="-6">12</font>, a<font size="-6">21</font>, a<font size="-6">22</font>...
00:17:48.200 --> 00:17:51.600
show up just like they would normally in a coefficient matrix.
00:17:51.600 --> 00:18:03.500
Now, A<font size="-6">x</font>...what it is going to do is take this column here on a, and it is going to replace it with the constants to the equation.
00:18:03.500 --> 00:18:09.400
It is going to replace a₁, a<font size="-6">21</font> with this; and so, we have b₁, b₂ for that column.
00:18:09.400 --> 00:18:11.800
And then, the rest of A is like normal.
00:18:11.800 --> 00:18:17.900
Similarly, for y, we are going to swap out the y constants from A.
00:18:17.900 --> 00:18:25.600
And so, we are going to have A like normal, except we swap out the constant column for where the y variables were occupying.
00:18:25.600 --> 00:18:28.500
The y column gets swapped to the constant column.
00:18:28.500 --> 00:18:30.700
So, the constant column goes in there.
00:18:30.700 --> 00:18:38.700
Notice that A<font size="-6">x</font> is just like A, except that it has this constant column replacing the x column.
00:18:38.700 --> 00:18:45.600
Similarly, A<font size="-6">y</font> has the constant column replacing the y column from our normal coefficient matrix.
00:18:45.600 --> 00:18:51.300
All right, that is the idea; now if the system has a single solution, if it comes out to be just one solution--
00:18:51.300 --> 00:18:57.100
it isn't infinitely many; it isn't no solutions at all; if the system has a single solution,
00:18:57.100 --> 00:19:03.300
then x will be equal to the determinant of A<font size="-6">x</font>, over the determinant of A,
00:19:03.300 --> 00:19:09.800
the determinant of its special matrix, divided by the determinant of the general coefficient matrix.
00:19:09.800 --> 00:19:19.700
Similarly, y is going to be equal to the determinant of its special matrix, divided by the determinant of the general coefficient matrix.
00:19:19.700 --> 00:19:25.300
OK, this method can be generalized to any linear system with n variables.
00:19:25.300 --> 00:19:29.000
Let A be the coefficient matrix for this n-variable linear system.
00:19:29.000 --> 00:19:37.100
Let A<font size="-6">i</font> be the same as A, except the ith column; the column that represents
00:19:37.100 --> 00:19:42.200
the variable we are currently working with--the variable that we want to solve for--that column
00:19:42.200 --> 00:19:45.600
will be replaced with the column of constants.
00:19:45.600 --> 00:19:50.800
So, we replace the column for the variable we are interested in solving for with the column of constants.
00:19:50.800 --> 00:19:55.000
And that makes A for whatever variable we were looking for: A<font size="-6">i</font> in this case,
00:19:55.000 --> 00:20:01.900
if we are looking for the ith variable, up until we are looking for the ith one.
00:20:01.900 --> 00:20:06.400
We replace it with the column of constants from the linear system, just the right side of the equations,
00:20:06.400 --> 00:20:09.700
the b₁, b₂ on our previous 2 x 2 example.
00:20:09.700 --> 00:20:16.200
OK, with that idea in mind, if the determinant of A, the determinant of our normal coefficient matrix, right up here,
00:20:16.200 --> 00:20:23.300
is not equal to 0, then the ith variable, x<font size="-6">i</font>, this variable we are trying to solve for,
00:20:23.300 --> 00:20:27.300
is equal to the determinant of its special matrix that has that column replacing it,
00:20:27.300 --> 00:20:31.700
divided by the determinant of the normal coefficient matrix; that is what we have right here.
00:20:31.700 --> 00:20:35.700
It is just like in the 2 x 2 form, except we can do it on a larger scale, as well.
00:20:35.700 --> 00:20:42.600
You swap out this one column; you take the determinant of that special matrix; you divide it by the determinant of the normal coefficient matrix.
00:20:42.600 --> 00:20:47.100
And that gives you the variable for whatever column you had swapped.
00:20:47.100 --> 00:20:51.200
We will get the chance to see this done on a more confusing scale (which is the sort of thing
00:20:51.200 --> 00:20:55.200
that we want to be able to understand--this on a larger scale) in Example 3.
00:20:55.200 --> 00:20:59.300
And we will just see this get applied normally in Example 2 for a 2 x 2 matrix.
00:20:59.300 --> 00:21:06.300
Also notice: if the determinant of A is equal to 0, then the system will have either no solutions or infinitely many solutions.
00:21:06.300 --> 00:21:10.700
All right, the final method to do this: we can solve with inverse matrices.
00:21:10.700 --> 00:21:15.800
This one is my personal favorite for understanding how this stuff works; I think it is the easiest to understand.
00:21:15.800 --> 00:21:17.700
But that is maybe just me.
00:21:17.700 --> 00:21:22.200
Using matrix multiplication, we can write a linear system as an equation with matrices.
00:21:22.200 --> 00:21:24.200
How can we do this as an equation?
00:21:24.200 --> 00:21:27.300
It made sense with an augmented matrix, because we talked about the special thing.
00:21:27.300 --> 00:21:38.400
But how is 1, 1, 1, 2, -2, 3, -1, 0, -1--notice that that is just our normal coefficient matrix A showing up here--
00:21:38.400 --> 00:21:52.700
if we multiply it by the column matrix x, y, z equals our coefficient column here, that ends up being just the same--
00:21:52.700 --> 00:21:58.900
it is completely equivalent; these two ideas here are completely equivalent--multiplying the matrices
00:21:58.900 --> 00:22:03.200
versus the linear system, and the linear system versus the matrices being multiplied together; they are completely the same.
00:22:03.200 --> 00:22:07.400
Let's see why; let's just do some basic matrix multiplication on this.
00:22:07.400 --> 00:22:14.700
What is going to come out of this? We have a 3 x 3 (3 rows by 3 columns), 3 rows by 1 column;
00:22:14.700 --> 00:22:22.400
so yes, they match up, so they can multiply; that is going to produce a 3 x 1, 3 row by 1 column, matrix in the end.
00:22:22.400 --> 00:22:25.900
So, let's see what is going to get made out of this.
00:22:25.900 --> 00:22:35.900
We are going to have a 3 x 3; our first row times the only column is 1, 1, 1, 1; so I'll make this a little bit larger,
00:22:35.900 --> 00:22:49.000
so we can see the full size of what is going to go in...1 times x + 1 times y + 1 times z is x + y + z.
00:22:49.000 --> 00:22:58.600
Next, 2, -2, 3 on x, y, z gets us 2x - 2y + 3z.
00:22:58.600 --> 00:23:09.300
Finally, -1, 0, -1 on x, y, z gets us -x + 0y (so let's just leave it blank) - z.
00:23:09.300 --> 00:23:15.600
Now, if we know that that is equal to our coefficient matrix, because we said it from the beginning,
00:23:15.600 --> 00:23:22.900
then all we are saying...3, -4, 0...well, for two matrices to be the same thing, for them to be equal to each other,
00:23:22.900 --> 00:23:29.200
every entry in the two matrices has to be equal to its entry in the same location.
00:23:29.200 --> 00:23:36.400
So, the top one, x + y + z, equals 3; that is just the exact same thing as this.
00:23:36.400 --> 00:23:44.500
2x - 2y + 3z has to be equal to -4; well, that is the same thing as saying 2x - 2y + 3z = -4.
00:23:44.500 --> 00:23:50.600
And the same thing: -x - z is saying it is equal to 0 through the matrices; and that is the same thing it was saying by the linear system.
00:23:50.600 --> 00:23:54.500
So, the linear system, taken as a whole, is just the same thing as taking the coefficient matrix,
00:23:54.500 --> 00:24:03.700
multiplying it by this coefficient column matrix...and that is going to come out to be equal to our constant matrix,
00:24:03.700 --> 00:24:11.100
which was the constants for the equations; that is the idea that is going to really be the driving force behind using inverse matrices.
00:24:11.100 --> 00:24:22.900
All right, we can symbolically write this whole thing as Ax = B; A times x equals B,
00:24:22.900 --> 00:24:36.000
where A is the coefficient matrix right here; then X is a single-column matrix of the variables;
00:24:36.000 --> 00:24:43.900
that is our x, y, z; whatever variables we end up using are going to go like that; and then finally,
00:24:43.900 --> 00:24:52.200
B is a single-column matrix of the constants (3, -4, 0 gets the same thing right here); OK.
00:24:52.200 --> 00:24:59.500
Notice: if we could somehow get X alone, if we could get our variable matrix, our variable column, alone on one side,
00:24:59.500 --> 00:25:03.300
whatever it was on the other side, if it equals numbers on the other side in a matrix,
00:25:03.300 --> 00:25:08.100
then we would have solved for it, because we would say that x is equal to whatever the corresponding location is on the other side;
00:25:08.100 --> 00:25:14.000
y is equal to whatever its corresponding location is on the other side; z is equal to whatever its corresponding location is on the other side.
00:25:14.000 --> 00:25:14.800
We would have solved for this.
00:25:14.800 --> 00:25:21.000
So, if we can somehow get X alone, we will be done; we will have figured out what x, y, and z are equal to.
00:25:21.000 --> 00:25:24.800
How can we do that, though--how can we get rid of A? Through inverse matrices!
00:25:24.800 --> 00:25:27.400
That is no surprise, since this thing is titled Inverse Matrices.
00:25:27.400 --> 00:25:37.000
We cancel out A; if A is invertible, then there exists some A^-1 that we can multiply that by that will cancel out A.
00:25:37.000 --> 00:25:42.200
So, we started with Ax = B; we can multiply by A^-1 on the left side on both sides.
00:25:42.200 --> 00:25:48.100
Remember: if you multiply by the left and the right, for matrix equations that doesn't work.
00:25:48.100 --> 00:25:53.000
You have to always multiply both from the left or both from the right.
00:25:53.000 --> 00:25:58.100
You are not allowed to do them on opposite sides; they have to both be coming from the same side when you multiply.
00:25:58.100 --> 00:26:06.600
We multiply by A^-1 on the left side on both cases; the A^-1 here and the A cancel out, and we are left with just X = A^-1B.
00:26:06.600 --> 00:26:13.000
So, if we can compute A^-1, and then we can compute what is A^-1 times B, we will have solved our system.
00:26:13.000 --> 00:26:15.100
We will have what our system is equal to.
00:26:15.100 --> 00:26:19.400
Just make sure that you multiply from the same side for your inverse on both sides of the equation.
00:26:19.400 --> 00:26:22.600
You have to multiply both from the left; otherwise it won't work out.
00:26:22.600 --> 00:26:28.600
Finally, if A is not invertible (if the determinant of A is equal to 0, then you can't invert it),
00:26:28.600 --> 00:26:33.500
then that means that the system has either no solutions or infinitely many solutions.
00:26:33.500 --> 00:26:36.400
All right, let's try putting these things to use.
00:26:36.400 --> 00:26:40.900
Oh, sorry; before we get into using them, the mighty graphing calculator:
00:26:40.900 --> 00:26:46.400
all of these methods work great for solving linear systems: augmented matrices with Gauss-Jordan elimination,
00:26:46.400 --> 00:26:51.200
Cramer's Rule, inverse matrices--they are all great ways to solve linear systems.
00:26:51.200 --> 00:26:57.200
But they all have the downside of being really tedious; they take so much arithmetic to use.
00:26:57.200 --> 00:27:02.900
We can work through it; we can see that we can do this stuff; but it is going to take us forever to actually work through this stuff by hand.
00:27:02.900 --> 00:27:11.200
I have great news; it turns out that, if you have a graphing calculator, you can already do this right now, really fast, really quickly, and really easily.
00:27:11.200 --> 00:27:15.800
Almost all graphing calculators have the ability to do matrix and vector operations.
00:27:15.800 --> 00:27:21.000
You can enter matrices into your calculator, and then you can multiply them; you can take determinants of the matrices;
00:27:21.000 --> 00:27:24.900
you can find inverses; or you can put them in reduced row echelon form.
00:27:24.900 --> 00:27:29.100
Look on your graphing calculator, if you have a graphing calculator, for something that talks about where...
00:27:29.100 --> 00:27:32.400
just look for a button about matrices; look for something like that.
00:27:32.400 --> 00:27:36.700
And it will probably have more information about how to create a matrix, and then how to do things with it.
00:27:36.700 --> 00:27:41.400
Inverse is probably just raising the matrix to the -1, and it will give out the value.
00:27:41.400 --> 00:27:45.500
Each graphing calculator will end up being a little bit different for how it handles inputting the matrices.
00:27:45.500 --> 00:27:48.800
But they will almost all have this ability, for sure.
00:27:48.800 --> 00:27:55.400
If you have real difficulty figuring out how to do it on your calculator, just do a quick Internet search for "[name of your calculator] put in matrices."
00:27:55.400 --> 00:27:58.600
Use "matrices," and you will be able to figure out an easy way to do it very quickly.
00:27:58.600 --> 00:28:00.600
Someone has a guide up somewhere.
00:28:00.600 --> 00:28:07.000
Also, if you don't have a graphing calculator, don't despair; it is still possible to get this stuff done really easily and really quickly.
00:28:07.000 --> 00:28:10.400
There are a lot of websites out there where you can do these things for free.
00:28:10.400 --> 00:28:18.500
Just try doing a quick Internet search for matrix calculator; just simply search the words matrix and calculator,
00:28:18.500 --> 00:28:24.000
and the first 5 hits or so will all be matrix calculators, where you can plug in matrices,
00:28:24.000 --> 00:28:28.200
and you can normally multiply them, or you can take their determinants, or you can get their inverses.
00:28:28.200 --> 00:28:31.000
Or you can do other things that you don't even know you can do with matrices yet.
00:28:31.000 --> 00:28:34.500
But just look for the things that you are looking for; there are lots of things you can do with it.
00:28:34.500 --> 00:28:41.300
Do a quick Internet search for the words matrix and calculator, and you will be able to find all sorts of stuff for those.
00:28:41.300 --> 00:28:44.500
So, even if you don't have a graphing calculator, there are lots of things out there.
00:28:44.500 --> 00:28:48.700
If you are watching this video right now, you can go and find websites that will let you do this for free.
00:28:48.700 --> 00:28:52.100
Finally, while this is great that we can do all of this stuff with a calculator,
00:28:52.100 --> 00:28:57.800
and the calculator will do the work for us, I still want to point out that it is important to be able to do this stuff without a calculator.
00:28:57.800 --> 00:29:04.200
So, it makes it so much easier to be able to use a calculator; but we still have to understand what is going on underneath the hood.
00:29:04.200 --> 00:29:08.800
We don't have to constantly be using it, but we have to have some sense of what is going on under the hood
00:29:08.800 --> 00:29:13.800
if we are going to be able to understand more, higher, complex-level stuff in later classes.
00:29:13.800 --> 00:29:16.900
So, you want to be able to understand this stuff, just because you want to be able to understand things,
00:29:16.900 --> 00:29:19.500
if you are going to be able to make sense of things that come later.
00:29:19.500 --> 00:29:22.500
And also, you usually need to show your work on your tests.
00:29:22.500 --> 00:29:27.300
Your teacher is not going to be very happy if you are taking a test, and you just say, "My calculator said it!"
00:29:27.300 --> 00:29:28.700
You are not going to get any points for that.
00:29:28.700 --> 00:29:31.400
So, you can't just get away with it all the time.
00:29:31.400 --> 00:29:35.600
That said, it can be a great help for checking your work, so you can work through the thing by hand,
00:29:35.600 --> 00:29:40.200
and then just do a quick check on your calculator to tell you that you got the problem right; that is really useful on tests.
00:29:40.200 --> 00:29:45.800
Or if you are dealing with really huge matrices, where it is 4 x 4, 5 x 5, 6 x 6, or even larger,
00:29:45.800 --> 00:29:51.100
where you can't reasonably be able to do that by hand, you just use a calculator, and that is perfectly fine.
00:29:51.100 --> 00:29:53.300
All right, now let's go on to the examples.
00:29:53.300 --> 00:29:59.100
The first example: Using Gauss-Jordan elimination, solve 2x + 5y = -3, 4x + 7y = 3.
00:29:59.100 --> 00:30:03.000
Our very first thing to do is: we need to convert it into an augmented matrix.
00:30:03.000 --> 00:30:09.300
We have 2 as the first coefficient on the x, and then 5 as the first coefficient on the y, and that equals -3.
00:30:09.300 --> 00:30:18.200
So, there is our bar there; 4, 7, 3; we have converted it into an augmented matrix.
00:30:18.200 --> 00:30:24.800
Our coefficients are on the left part of the matrix, and our constant terms are on the right part of the matrix.
00:30:24.800 --> 00:30:27.800
All right, at this point, we just start working through it.
00:30:27.800 --> 00:30:33.800
The very first thing that we need to do is to get that to turn into a 1--get the top left corner to turn into a 1.
00:30:33.800 --> 00:30:38.800
So, we will do that by multiplying the first row: 1/2 times row 1.
00:30:38.800 --> 00:30:48.800
All right, that is what we will do there: 2 times 1/2 becomes 1; 5 times 1/2 becomes 5/2; -3 times 1/2 becomes -3/2.
00:30:48.800 --> 00:30:53.100
4, 7, 3; the bottom row didn't get touched, so it just stays there.
00:30:53.100 --> 00:30:58.100
The next thing to do: we want to get this to turn into a 0.
00:30:58.100 --> 00:31:06.100
So, we will subtract the top row; the top row is not going to end up doing anything on this step,
00:31:06.100 --> 00:31:17.100
but we will subtract the top row 4 times, because we have 4 here; so - 4R₁ + our second row.
00:31:17.100 --> 00:31:39.900
-4 times 1 plus 4 gets us 0; -4 times 5/2 gets us -10; -10 + 7 gets us -3; -3/2 times -4 gets us +6; we got +6 out of that, so that gets us +9.
00:31:39.900 --> 00:31:48.200
Our next step: we want to get this to turn into a 1; we will bring this whole thing up here.
00:31:48.200 --> 00:31:55.800
The next step is to get the second row to turn into a 1: 1, 5/2, -3/2.
00:31:55.800 --> 00:32:10.500
We multiply the bottom part by -1/3 times row 2; so 0 times -1/3 is still 0; -3 times -1/3 becomes +1; 9 times -1/3 becomes -3.
00:32:10.500 --> 00:32:20.300
At this point, we can now turn this into a 0; we don't need to do anything to our bottom row; it is still 0, 1, -3.
00:32:20.300 --> 00:32:32.700
But we will add -5/2 of row 2 to row 1; so 0 times anything is still going to be 0; so added there...it is still 1 there.
00:32:32.700 --> 00:32:43.500
Then, -5/2 on 1 + 5/2 becomes 0; -5/2 times -3 becomes +15/2, and then still -3/2.
00:32:43.500 --> 00:32:54.700
Let's simplify that: we have 1, 0, 0, 1...15/2 - 3/2 becomes 12/2; 12/2 is 6...6, -3.
00:32:54.700 --> 00:33:02.800
So, at this point, we can convert that into answers; x = 6; y = -3.
00:33:02.800 --> 00:33:07.500
There are our answers; however, we did have to do a whole lot of calculation to get to this point.
00:33:07.500 --> 00:33:12.400
And it could be even more if we were working on a larger augmented matrix; they get big really fast.
00:33:12.400 --> 00:33:17.700
So, it might be a good idea to do a quick check; let's just check our work and make sure it is correct.
00:33:17.700 --> 00:33:24.400
Let's plug it into the first one: 2 times 6, plus 5 times -3; what does that come out to be?
00:33:24.400 --> 00:33:31.100
We hope it will come out to be -3: 12 + -15 = -3; indeed, that is true.
00:33:31.100 --> 00:33:35.500
We could check it again with this equation, as well, if we want to be really, really extra careful.
00:33:35.500 --> 00:33:44.900
4 times 6, plus 7 times -3, equals positive 3; 24 - 21 = 3; that is true.
00:33:44.900 --> 00:33:51.100
So, both of our checks worked out; we know that x = 6, y = -3; that is definitely a solution--great.
00:33:51.100 --> 00:33:54.600
All right, the second example: let's see Cramer's Rule in action.
00:33:54.600 --> 00:33:59.000
The first thing we want to do, if we are going to use Cramer's Rule, is: we need to get a coefficient matrix going.
00:33:59.000 --> 00:34:08.100
A =...what are our coefficients here? We have a 2 x 2: 2, 5, 4, 7.
00:34:08.100 --> 00:34:14.900
There are the coefficients; our next step is...we want A<font size="-6">x</font>--what is A<font size="-6">x</font> going to be?
00:34:14.900 --> 00:34:22.000
Here is our x column; we are going to swap that out for the constants here.
00:34:22.000 --> 00:34:27.200
-3 and 3 replaces what had been our x column here.
00:34:27.200 --> 00:34:32.900
And then, the rest of it is just like normal; so we replace that one column, but everything else is just the same.
00:34:32.900 --> 00:34:35.000
A<font size="-6">y</font>: what will A<font size="-6">y</font> be?
00:34:35.000 --> 00:34:40.800
The same sort of thing, except now we are replacing the y column--what is the y column going to turn into?
00:34:40.800 --> 00:34:48.100
It is going to also become -3, 3; so 2, 4 is just as it was before; the first column is still the same, because that is the x column.
00:34:48.100 --> 00:34:52.800
But now we are swapping out the y column, so it becomes the constants, -3 and 3.
00:34:52.800 --> 00:35:02.900
All right, so we were told that Cramer's Rule says that x is equal to the determinant of its special, swapped-out matrix, A<font size="-6">x</font>,
00:35:02.900 --> 00:35:06.800
divided by the determinant of the normal coefficient matrix.
00:35:06.800 --> 00:35:18.600
The determinant of -5, 3, 5, 7, divided by the determinant of 2, 5, 4, 7:
00:35:18.600 --> 00:35:29.800
-3 times 7 gets us -21; minus 3 times 5 (is 15), over 2 times 7 (is 14), minus 2 times 5 (is 20);
00:35:29.800 --> 00:35:39.700
we have -36/-6 =...that comes out to be positive 6, so we now have x = +6.
00:35:39.700 --> 00:35:42.300
That checks out with what we just did in the previous one.
00:35:42.300 --> 00:35:46.300
If you didn't notice, these equations are the same as what they were in the previous example,
00:35:46.300 --> 00:35:49.200
so we are just seeing two different ways to do the same problem
00:35:49.200 --> 00:35:52.700
(well, at least the part where we are trying to solve for x and y).
00:35:52.700 --> 00:35:55.100
So, that checks out, because we checked it in the previous problem.
00:35:55.100 --> 00:36:02.200
Now, what about y? y is going to be the same thing; y is equal to the determinant...same structure, at least...
00:36:02.200 --> 00:36:08.300
of A<font size="-6">y</font>, its special matrix, divided by the determinant of A, once again.
00:36:08.300 --> 00:36:12.700
We could calculate the determinant of A, but we already calculated the determinant of A.
00:36:12.700 --> 00:36:16.900
We figured out that it comes out to be -6, so we just drop in -6 here.
00:36:16.900 --> 00:36:22.700
You only have to do it once; it is not going to change--the determinant of A will stay the determinant of A, as long as A doesn't change.
00:36:22.700 --> 00:36:26.800
Then, the determinant of A<font size="-6">y</font>: we don't know what A<font size="-6">y</font>, that special matrix, is, yet.
00:36:26.800 --> 00:36:37.500
2, -3, 4, 3: 2 times 3 is 6, minus 4 times -3 (-12); that cancels out; so we have 6 + 12,
00:36:37.500 --> 00:36:45.600
divided by -6; 18/-6 equals -3; so y comes out to be -3.
00:36:45.600 --> 00:36:49.900
Once again, that is the same answer as we had on the previous example, so we know that this checks out.
00:36:49.900 --> 00:36:52.800
If you had just done this for the very first time, I would recommend doing a check,
00:36:52.800 --> 00:36:55.800
because once again, you have to do a lot of arithmetic to get to this point.
00:36:55.800 --> 00:37:00.300
And it is going to be even more if you are doing a larger Cramer's Rule, like, say, this one.
00:37:00.300 --> 00:37:04.400
All right, so if we are working on this one, we only have to solve for the value of y.
00:37:04.400 --> 00:37:07.000
There is one slight downside to only solving for one variable.
00:37:07.000 --> 00:37:11.500
It means you can't check your work, because we can't plug in y and be sure that it works out to be true.
00:37:11.500 --> 00:37:13.700
But we can at least get out what it should be.
00:37:13.700 --> 00:37:20.300
All right, using Cramer's Rule, the first thing we need to do is figure out what our coefficient matrix A is.
00:37:20.300 --> 00:37:30.500
A =...all of our first variables is w, so 2w, 3w...there is no w there at all, so it must be 0w; -2w.
00:37:30.500 --> 00:37:37.900
Next, our x's: there are no x's in the first equation, so it is 0 x's; -2, -3, +5.
00:37:37.900 --> 00:37:50.000
Next, 4y, 1y, 2y, 0y, -1z, 4z, 0z, 1z.
00:37:50.000 --> 00:37:54.600
Great; now, we are looking to figure out what y is going to be.
00:37:54.600 --> 00:38:01.000
We figure out that A<font size="-6">y</font> is going to be the same thing, except it is going to have its y column swapped.
00:38:01.000 --> 00:38:06.800
Notice that the y column is the third column in; so we are going to swap out the third column for the constants.
00:38:06.800 --> 00:38:09.300
Other than that, it is going to look like our normal coefficient one.
00:38:09.300 --> 00:38:20.900
So, we can copy over what we had in the previous one, except for that one column: 2, 3, 0, -2, 0, -2, -3, 5.
00:38:20.900 --> 00:38:28.800
Now, this is the third column--this one right here--so we are swapping out for the column of constants.
00:38:28.800 --> 00:38:37.100
That is 5, 16, 0, 17; and then back to copying the rest of it: -1, 4, 0, 1.
00:38:37.100 --> 00:38:42.300
So, at this point, we have A<font size="-6">y</font>; we have A; so we are going to need to figure out determinants.
00:38:42.300 --> 00:38:44.600
First, let's figure out what the determinant of A is.
00:38:44.600 --> 00:38:50.900
The determinant of A: if we want to figure out this here, remember: if we are going to be figuring out determinants,
00:38:50.900 --> 00:39:06.000
we are going to be using cofactor expansion; so the very first thing we want to do is make a little +/- field: + - + -, - + - +, + - + -, - + - +.
00:39:06.000 --> 00:39:07.700
We can use that as a reference point.
00:39:07.700 --> 00:39:13.700
Which one would be the best one if we are looking to get the determinant of A?
00:39:13.700 --> 00:39:17.900
If we are looking to get the determinant of A, which would be the best row or column to expand on?
00:39:17.900 --> 00:39:21.900
I see two 0's on this column, so let's work off of that one.
00:39:21.900 --> 00:39:28.100
The first 0 just disappears, because it is 0 times its cofactor; blow out that cofactor, because it is 0.
00:39:28.100 --> 00:39:36.400
The next one is -3; so we are on the third row, second column, so that corresponds to that symbol, a negative.
00:39:36.400 --> 00:39:44.200
It is negative, and then -3, what we have for what we are expanding around; negative -3 is minus -3;
00:39:44.200 --> 00:39:49.800
and then times...what happens if we cut out everything on a line with that -3?
00:39:49.800 --> 00:40:00.200
We have 2, 3, -2, 4, 1, 0, -1, 4, 1.
00:40:00.200 --> 00:40:06.300
We have to keep going; now we are on the 2; let's swap to a new color.
00:40:06.300 --> 00:40:26.400
2 here; we are on a + now, so it is +2 times...cut out what is on a line with that 2; so we have 2, 3, -2, 0, -2, 5, -1, 4, 1.
00:40:26.400 --> 00:40:33.000
All right, at this point, we want to figure out what are the easiest rows or columns to expand on for these two matrices.
00:40:33.000 --> 00:40:39.800
I notice that there is a 0 here and a 0 here; I personally find it easier to do expanding
00:40:39.800 --> 00:40:44.900
based on a row than based on a column, so I will just choose to do rows.
00:40:44.900 --> 00:40:52.600
- -3; these cancel to +3; so +3 times...expand on -2 first, so...
00:40:52.600 --> 00:40:56.800
oh, and we are on a 3 x 3 now, so we are on that + there; so it is still positive...
00:40:56.800 --> 00:41:02.200
it is 3 times...now we are figuring out the determinant of that matrix: -2 times...
00:41:02.200 --> 00:41:11.000
cross out what is on a line with that: 4, -1, 1, 4; minus 0...but - 0 cancels out, so what is next after that?
00:41:11.000 --> 00:41:24.800
Another plus: + 1 times...cross out what is on a line with that 1 here; 2, 4, 3, 1.
00:41:24.800 --> 00:41:29.000
All right, let's work on our other half, the other determinant.
00:41:29.000 --> 00:41:35.200
+2, times whatever the determinant is inside of this matrix: 2 here; 2 is a positive here,
00:41:35.200 --> 00:41:44.500
because it is in the top left: so 2 times...whatever is on a line with that gets cancelled out.
00:41:44.500 --> 00:41:48.100
So, we are left with -2, 4, 5, 1.
00:41:48.100 --> 00:41:51.500
Then, 0 next: the 0 here we don't have to worry about.
00:41:51.500 --> 00:42:04.800
And then, we are finally onto a +; but it is a negative 1, so + -1 times...cross out what is on a line with the -1; we are left with 3, -2, -2, 5.
00:42:04.800 --> 00:42:09.700
OK, at this point, we just have a lot of arithmetic to work through.
00:42:09.700 --> 00:42:20.300
3, -2...take the determinant of this matrix; we have 4 times 4; that is 16; 16 - -1 gets us +17.
00:42:20.300 --> 00:42:30.500
Plus 1 times...forget about the 1...2 times 1 is 2, minus 3 times 4 is 12; so 2 - 12 is -10.
00:42:30.500 --> 00:42:40.600
Plus 2 times...-2 times 1 is -2; minus 5 times 4 (is 20); so -2 - 20 is -22.
00:42:40.600 --> 00:42:57.600
Plus -1...let's make it a negative...times...3 times 5 is 15; minus...-2 times -2 is +4; so 3 times 5 is 15, plus 4 is 19.
00:42:57.600 --> 00:43:01.900
If you have difficulty doing that in your head, just write out the 2 x 2, as well.
00:43:01.900 --> 00:43:21.900
Keep working through this: 3 times...-2 times 17 comes out to be -34; -34 - 10 + 2 times -22 (is -44), minus 19;
00:43:21.900 --> 00:43:42.100
3 times -44 + 2(-44) - 19 becomes...oops, a mistake was made...oh, here it is.
00:43:42.100 --> 00:43:45.000
I just caught my mistake--see how easy it is to make mistakes here?
00:43:45.000 --> 00:43:49.600
That should be an important point: be really, really careful with this; it is really easy to make mistakes.
00:43:49.600 --> 00:44:00.000
3 times 5 is 15, minus...-2 times -2 (let's work this one out carefully)...3 times 5, minus -2 times -2...
00:44:00.000 --> 00:44:04.500
well, these cancel out, and we are left with +4; so 15 - 4 becomes 11.
00:44:04.500 --> 00:44:08.700
So, this shouldn't be 19; it should be 11.
00:44:08.700 --> 00:44:12.200
This shouldn't be a 19 here, either; it should be 11.
00:44:12.200 --> 00:44:18.100
So, -44 - 11 becomes -55; see how easy it is to make mistakes?
00:44:18.100 --> 00:44:22.600
I make mistakes; it is really easy to make mistakes; be very careful with this sort of stuff.
00:44:22.600 --> 00:44:29.900
It is really, really a sad way to end up missing things, when you understand what is going on, but it is just one little, tiny arithmetic error.
00:44:29.900 --> 00:44:31.600
All right, let's finish this one out.
00:44:31.600 --> 00:44:50.800
3 times -44 becomes -132; plus 2 times -55 becomes -110; we combine those together, and we get -242.
00:44:50.800 --> 00:45:01.000
-242 is the determinant of A; it is equal to -242; it takes a while to work through, doesn't it?
00:45:01.000 --> 00:45:06.300
All right, the next one: We figured out the determinant of A; that comes out to be -242.
00:45:06.300 --> 00:45:16.500
So, to use Cramer's Rule, we know that y is going to be equal to the determinant of A<font size="-6">y</font>, over the determinant of A.
00:45:16.500 --> 00:45:20.100
We now need to figure out what A<font size="-6">y</font> comes out to be.
00:45:20.100 --> 00:45:26.900
The determinant of A<font size="-6">y</font>...let's figure this out.
00:45:26.900 --> 00:45:33.100
We work through this one; I notice this nice row right here--we have three 0's on it.
00:45:33.100 --> 00:45:43.900
That is going to make it easy to work through; if we are doing a cofactor expansion, we want to make our sign table.
00:45:43.900 --> 00:45:45.600
OK, we can work along with that.
00:45:45.600 --> 00:45:51.900
Our first one is a + on 0, but that doesn't matter; the next one is a - on -3.
00:45:51.900 --> 00:46:11.700
- -3 on...we cut out what is on a line with that -3; we have 2, 3, -2, 5, 16, 17, -1, 4, 1.
00:46:11.700 --> 00:46:14.300
Next is 0; once again, we don't have to worry about that.
00:46:14.300 --> 00:46:16.700
Next is 0; once again, we don't have to worry about that.
00:46:16.700 --> 00:46:26.000
All right, so we see that these cancel out, and we have 3 times...now we need to choose what we are going to expand along--which row or column.
00:46:26.000 --> 00:46:33.500
Personally, I like the top row; I like expanding along rows, and 2, 5, -1 does at least have some kind of small numbers.
00:46:33.500 --> 00:46:36.800
So, I will expand across that, just because I feel like it.
00:46:36.800 --> 00:46:41.400
2, 5, -1: we will do it in three different colors here.
00:46:41.400 --> 00:46:53.900
2 corresponds to this, so it is a positive 2, times what cuts along this...we are left with 16, 17, 4, 1.
00:46:53.900 --> 00:47:02.100
The next one (do it with green): that corresponds to a negative there, so that is minus 5;
00:47:02.100 --> 00:47:11.100
what does it cut out? We are left with 3, -2, 4, 1.
00:47:11.100 --> 00:47:30.300
And then finally, go back to red; -1 corresponds to a positive, so + -1 times...what does it cross out? We have 3, -2, 16, 17 left.
00:47:30.300 --> 00:47:40.200
All right, let's work this out: we have 3 times all of this stuff; 2 times...16 times 1 is 16; minus 17 times 4...
00:47:40.200 --> 00:47:54.400
17 times 4 comes out to be -68; the next one: minus 5 times...3 times 1 is 3
00:47:54.400 --> 00:48:02.100
(after that mistake last time, let's be careful) minus...-2 times 4 is -8; so that will cancel out to plus.
00:48:02.100 --> 00:48:19.500
Finally, we turn this to a minus, since it was times -1; 3 times 17 comes to 51; minus -2 times 16 becomes -32.
00:48:19.500 --> 00:48:31.100
OK, keep working this out: 3 times 2 times 16 - 68 is -52,
00:48:31.100 --> 00:48:49.000
minus 5 times 3 + 8 is 11, minus 51 - -32 becomes 51 + 32; 51 + 32 is - 83.
00:48:49.000 --> 00:49:01.400
So, 3 times...2 times -52 becomes -104; minus 5 times 11 becomes -55; and still, minus 83.
00:49:01.400 --> 00:49:07.900
We combine all of those together, and that gets us 3 times -242.
00:49:07.900 --> 00:49:13.300
Now, you could go through and multiply this together, and you would get a number out of it.
00:49:13.300 --> 00:49:22.200
But notice: we have -242 here, and later on, in just a few moments, we are about to divide by that previous detA at -242.
00:49:22.200 --> 00:49:35.700
So, why don't we just leave this as 3 times -242; that is equal to the determinant of A<font size="-6">y</font>, our special matrix for A<font size="-6">y</font>.
00:49:35.700 --> 00:49:43.500
At this point, we know from Cramer's Rule that y equals (cut out a little space for it)
00:49:43.500 --> 00:49:51.100
the determinant of its special matrix, A<font size="-6">y</font>, divided by the determinant of the coefficient matrix.
00:49:51.100 --> 00:50:02.300
We figured out that the determinant of our special matrix is 3(-242), so 3(-242) divided by the determinant
00:50:02.300 --> 00:50:13.500
of our coefficient matrix--that is also -242; -242/-242--those parts cancel out, and we are left with 3; so y = 3.
00:50:13.500 --> 00:50:18.000
Sadly, there is no good way to check it at this point, if we are going to have to work through the whole thing,
00:50:18.000 --> 00:50:23.300
because we would have to solve for each one of them, w and x and z.
00:50:23.300 --> 00:50:29.800
On the bright side, solving for w, x, and z is only having to figure out the determinant of A<font size="-6">w</font>, A<font size="-6">x</font>, and A<font size="-6">z</font>,
00:50:29.800 --> 00:50:31.200
because we have already figured out the determinant of A.
00:50:31.200 --> 00:50:36.300
But still, it clearly takes some effort to take the determinants of even just a size 4 x 4, so it is pretty difficult.
00:50:36.300 --> 00:50:41.800
However, if you have a graphing calculator, it would be pretty easy to go through and enter the matrix,
00:50:41.800 --> 00:50:49.000
and then enter an augmented matrix, including the constants, and then get the reduced row echelon form
00:50:49.000 --> 00:50:52.600
and see if y = 3 pops out as the answer that you would have from it.
00:50:52.600 --> 00:50:55.100
It would be the case that that is what you would get out of it.
00:50:55.100 --> 00:51:01.500
Or you could use Cramer's Rule and do determinants: figure out what A<font size="-6">x</font> is; figure out what A<font size="-6">w</font> is;
00:51:01.500 --> 00:51:05.900
figure out what A<font size="-6">z</font> is; and then, be able to plug them all in and check afterwards.
00:51:05.900 --> 00:51:12.700
Or you could also go through and do it with inverse matrices and see if y comes out to be 3, once you have figured out that on your calculator.
00:51:12.700 --> 00:51:15.400
You can do this stuff by hand if you have to do it on a test;
00:51:15.400 --> 00:51:18.700
but then, you can also, if you are allowed to just use the calculator (you just have to show your work)...
00:51:18.700 --> 00:51:22.900
you can check your work in a second, different way to make sure that your work did come out to be true.
00:51:22.900 --> 00:51:25.700
So, you can definitely get the problem right.
00:51:25.700 --> 00:51:30.300
All right, the final example: do you remember that monster from solving systems of linear equations?
00:51:30.300 --> 00:51:34.800
It is back, and we are going to solve it: we are going to knock out this thing that was way too difficult for us then.
00:51:34.800 --> 00:51:39.200
It is going to be really easy for us now, because we have access to how inverse matrices work.
00:51:39.200 --> 00:51:44.400
We can use calculators to be able to calculate an inverse matrix very quickly; this thing is going to be easy.
00:51:44.400 --> 00:51:57.600
Our plan: remember, the idea was that we have the coefficient matrix A, times the column of the variables, is equal to the column of the constants.
00:51:57.600 --> 00:52:05.500
So, AX = B: if we can figure out what A^-1 is, we can multiply by A^-1 on the left side on both cases.
00:52:05.500 --> 00:52:14.300
A^-1 cancels out there, and we are left with X = A^-1B.
00:52:14.300 --> 00:52:19.600
We already know what B is: B is this thing right here, so that part is pretty easy.
00:52:19.600 --> 00:52:21.300
Can we figure out what A^-1 is?
00:52:21.300 --> 00:52:29.100
Well, this is A; I am assuming that we have access to a graphing calculator or some way to do matrix calculations.
00:52:29.100 --> 00:52:32.900
Once again, matrix calculations are easy to do, but really tedious.
00:52:32.900 --> 00:52:38.900
They take all of this time; it is easy to make a mistake, because just doing 100 calculations, you tend to make a mistake somewhere.
00:52:38.900 --> 00:52:44.100
But that is what calculators and computers are for; that is why humans invented those sorts of things--
00:52:44.100 --> 00:52:48.100
to be able to make tedious calculations like that go away, where we can trust the calculator
00:52:48.100 --> 00:52:54.300
to do the number-crunching part, and we can trust us to do the thinking part (hopefully).
00:52:54.300 --> 00:53:08.100
We figure what A is; it is going to be a big one: our u's first: 1u, -4u, 1u, -2, 1/5u, 2u;
00:53:08.100 --> 00:53:26.700
next, our v's: 2v, 2v, 1v, 1/2v, -3v, +4v; 7w, 1w, 0w (because it didn't show up), 3w, -1w, -1w;
00:53:26.700 --> 00:53:45.300
-3x, 1/3x, 0x, 0x, 2x, -3x; 4y, 2y, 1y, 2y, -1y, 5y; 2z, 1z, 1z, 4z, 4z, 0z.
00:53:45.300 --> 00:53:49.900
So, what you do is: you take A, and you enter that into your graphing calculator.
00:53:49.900 --> 00:53:53.600
You put that into a graphing calculator; you put that into some sort of matrix calculator.
00:53:53.600 --> 00:54:02.700
You enter this into a calculator, or a computer, or something that is able to work with matrices.
00:54:02.700 --> 00:54:05.600
Lots of programs are, because matrices are very useful.
00:54:05.600 --> 00:54:11.200
Once again, we aren't even beginning to scratch the surface of how useful they are; we are just getting some sense with this one problem.
00:54:11.200 --> 00:54:16.700
So, we enter this whole thing into a calculator; then you tell the calculator to take the inverse.
00:54:16.700 --> 00:54:20.900
So, we do that; and I want to point out, before we actually go on to talk about the inverse:
00:54:20.900 --> 00:54:27.800
you tell the calculator to take the inverse; before you do that, double-check that you entered the matrix correctly.
00:54:27.800 --> 00:54:34.000
If you entered this wrong--if you entered this A, 6 x 6...that is 36 numbers that you just put into your calculator.
00:54:34.000 --> 00:54:37.000
Chances are that you might have accidentally entered one of them wrong.
00:54:37.000 --> 00:54:40.200
If you enter one of them wrong, your entire answer is going to be wrong.
00:54:40.200 --> 00:54:43.100
Chances are it will end up being this awful decimal number, so you will think,
00:54:43.100 --> 00:54:46.400
"Well, my teacher probably didn't give me something that would come out to be an awful decimal number."
00:54:46.400 --> 00:54:49.900
But if you are working with something like physics, where you don't already know what the answer is going to be,
00:54:49.900 --> 00:54:53.900
it is up to you to make sure that you get it in correctly the first time.
00:54:53.900 --> 00:54:59.700
So, double-check: if you are entering a very large matrix, make certain that you entered that matrix correctly.
00:54:59.700 --> 00:55:04.200
We have the entire matrix set up in our calculator, and we have double-checked that it is correct.
00:55:04.200 --> 00:55:09.900
Now, we punch out A^-1: on most calculators, that is going to end up being: take the matrix and raise it to the -1.
00:55:09.900 --> 00:55:15.100
What does it come out to be; it comes out to be really ugly--it is awful.
00:55:15.100 --> 00:55:36.700
For example, the very first term is going to be 1780/14131; the first row, second column, would be 45/14131; the third...this is awful.
00:55:36.700 --> 00:55:38.700
So, what are we going to end up doing?
00:55:38.700 --> 00:55:40.000
Do we have to write the whole thing down?
00:55:40.000 --> 00:55:42.600
No, we don't have to write the whole thing down--it is in our calculator.
00:55:42.600 --> 00:55:48.300
We just tell the calculator A^-1, and then we don't have to worry about A^-1 at all.
00:55:48.300 --> 00:55:52.300
We don't have to figure it out and write the whole thing down on paper; there is no need for it.
00:55:52.300 --> 00:55:55.800
The calculator will keep track of what the numbers for A^-1 are,
00:55:55.800 --> 00:56:01.800
because all we are concerned about is taking A^-1 and applying it against B.
00:56:01.800 --> 00:56:10.500
We leave it in the calculator; we know that X is going to be equal to A^-1 times B.
00:56:10.500 --> 00:56:14.000
All right, that is what we just figured out from our plan of thinking about this.
00:56:14.000 --> 00:56:18.000
So, we have, in our calculator, that A^-1 is in there.
00:56:18.000 --> 00:56:22.700
We have it in the calculator; we don't have to actually see what the whole thing is, because it is already there.
00:56:22.700 --> 00:56:36.200
What is our B? We enter in the column matrix, 41, 39, 4, 23, -30, 44; we make sure that our A^-1 is multiplying from the left side.
00:56:36.200 --> 00:56:37.900
Otherwise, it won't work at all.
00:56:37.900 --> 00:56:39.900
And what does this end up coming out to be?
00:56:39.900 --> 00:56:50.400
This comes out to be the deliciously simple -5, 4, 1, -3, 6, -1.
00:56:50.400 --> 00:57:00.600
So, we just figured out that our X (all of our variables at once) is equal to...what were all of our variables?
00:57:00.600 --> 00:57:05.300
It was u, and then we put in v, and then we put in w, and then we put in x, y, z.
00:57:05.300 --> 00:57:23.500
So, they go in that order in our column: u, v, w, x, y, z = this thing that we just punched out, -5, 4, 1, -3, 6, -1.
00:57:23.500 --> 00:57:30.500
So, u = -5; v = 4; w = 1; x = -3; y = 6; z = -1.
00:57:30.500 --> 00:57:35.400
If we really wanted to at this point, we could check it; we could plug each one of these into any one of these equations;
00:57:35.400 --> 00:57:38.500
and if it came out right, chances are that we probably got the entire thing right.
00:57:38.500 --> 00:57:40.600
So, it might not be a bad idea to check at that point.
00:57:40.600 --> 00:57:47.100
But also, as long as we were really careful with entering in our A, and careful with entering in our column of constants, our B,
00:57:47.100 --> 00:57:50.600
everything should have worked out fine there; otherwise there is some other error that cropped up.
00:57:50.600 --> 00:57:55.400
So, it becomes really, really easy, with just a little bit of thinking, and this calculator
00:57:55.400 --> 00:58:01.700
(to take care of the awful manual work of the numbers, of just having to work through that many numbers)--
00:58:01.700 --> 00:58:05.000
as long as we have the calculator to be able to do that part, so that it is quick and easy,
00:58:05.000 --> 00:58:08.800
and we can trust that it came out right, and we are able to do the thought of what is going on,
00:58:08.800 --> 00:58:15.900
we see that A^-1, our coefficient matrix inverted, times what the equations come out to be,
00:58:15.900 --> 00:58:20.200
our constant column matrix, just comes out to be the answers for each one of them.
00:58:20.200 --> 00:58:26.000
It is really cool, really fast, and really easy; any time you have a large linear system,
00:58:26.000 --> 00:58:29.500
or even a small linear system, and you just want to check it, you can have it done like that,
00:58:29.500 --> 00:58:32.200
if you have access to a matrix calculator--pretty cool.
00:58:32.200 --> 00:58:34.000
All right, we will see you at Educator.com later--goodbye!