All right in this video. I'm going to start talking about solving linear systems of equations using Matrices
[so] a little bit before we get started some notation this [roasts] [about] R
Sub I and then the little arrows in between rows of J. What that means we're going to do
We're going to switch the I throw and the J throw
[there's] another rule that says you can multiply any row by a constant and just replace that row so that's what this second
notation is going to mean
And then the last one says you can add or equivalently subtract rows and replace a certain row
okay, so that's what's going on there and
in General
We're going [to] have a system of equations [that] we're trying to solve the goal is we want to make it look basically
Something like this, okay?
So I'm going to put some stuff on the left side some stuff on the right side this will make more sense in a second
you basically want ones going down the diagonal and zeros everywhere else and
What this means is your system of equations is going to have a unique solution?
You know [there's] cases if you if you've done elimination by addition or substitution sometimes you find that there's no solutions
Or that there's infinitely many solutions, and that can happen as well
There's going to be
Infinitely many solutions if one of your rows ends up becoming 0 equals and then 0 on the right side of the bar
You'll find out that. There's no solutions if you end up with a number on the left side
[I] should be careful
We'll come back to this in a [different] video. It's probably [easier]. So just to start off with let's solve this first linear system of
equations
And notice I've got my exes lined up my [wise] lined up and my numbers lined up. I'm going to make [a] Matrix I
take basically the coefficients the coefficient on the x is a
1/4 and then I make a little bar some people don't do this
But I like to do it just to kind of remind myself of where the equal sign is
then I have a 2 a 9 and a 5
All right, so in this case
I'm going to try to get a 1 here [a] 1 here
Zeros and zeros, and I'll figure out what happens in the meantime over here
Well the good thing is I've already got a 1 in my top left entry which is what I want, so
[we] don't have to do anything there
to make the second
to make this 2 into a 0 what we can take is we can take negative 2 times the first row and
add that to [our] second row and
Then replace the second row with those new [values]
So notice if I do this I'll take negative 2 times 1 which [is] negative 2 negative 2 Plus 2
is 0 so the only thing that's going to get replaced is Row 2
I'll get negative 2 times 4 which is negative 8 negative 8 plus 9 is positive 1 and
Then if I do negative 2 times 3 that's negative 6 negative 6 plus 5 is
Negative 1 and [I] [don't] do anything at all with the first row. I just leave that completely alone
okay, so
Well now I want to make I want ones along the diagonal so again
I got lucky here everything worked out nicely where I've already got a 1 here
But I need a 0 in the place above it. So I'm going to do the same thing. I'll take Negative 4
times this Time Row 2
I'll add that to Row 1 and
that's going to give me my new Row 1
So let me grab another piece [of] paper here
so if we do that
Again [row] [ones] the only thing changing, so I usually always put down the roads that aren't changing just so I don't get confused
So I'll take negative 4 times 0 I'm now multiplying row two and add that to one well
That'll just give me [1] I'll get negative 4 times 1 which is negative 4 negative 4 plus 4 is [0]
I'll take Negative 4 times negative 1 which [is] positive 4
positive 4 Plus 3 gives me 7
so if you think about this as being xy and your numbers on the right side
It says 1x plus 0 y equals 7 or equivalently x equals 7 and
it says 0x plus 1y equals negative 1 and
Let's see if that works because again our original system of equations was x plus 4 y equals 3
[2x]
+ 9 y equals 5 so this was our original system
notice if you plug 7 in you'll get 7
over here
you'll get a negative 4 well 7 minus 4 is [3] [if]
You plug x into the second one you'll get 2 times 7 which is 14
minus 9
14 minus 9 is 5 so this is our solution to this linear system of equations again?
You could have done elimination by addition or substitution
But the point is when you have more complicated
Matrices those techniques are going to get a little more complicated and really what we're doing here is
Elimination by addition anyway to come up with new equations. We're just doing it in a more efficient Manner
So let's see if we can't do one other one here real quick before we run out of time, so I'll go through this one
Maybe a little bit faster, so [here] we've got the system of equations [x] plus 2y plus z equals 6
[2x] minus y minus z is 1 x plus 3y minus 4z is negative 3
so the first thing I'm going to do is make my
Matrix, so I take the coefficients 1 2 1 from the first equation, I take the coefficients
from the second equation and
Then I take the coefficients from the third equation as well
[ok] so I've already got a 1 in the top left corner, and that's exactly what I want
So I'm going to do two steps at once I'm going to take
Negative 2 times row one and add that to row 2 to give me my new Row 2 and
then I'm also just going to take negative 1 times row 1 and add that to Row 3 and
that will give me my new Row 3
Ok so nothing's happening to the first row
so if I take negative 2 times the first row I'll get negative 2 plus [2] will give me 0
Negative 2 times 2 is negative 4 plus negative 1 is [negative] 5 negative
2 times 1 is negative 2 minus 1 is negative 3 negative
2 times 6 is negative 12 negative 12 plus 1 is negative 11
The negative I'll take negative 1 row 1 and add that to row 3 I'll get negative 1 plus 1 which is 0
I'll get [negative] 2 plus 3 which is 1 I'll get
Negative 1
Minus 4 is negative 5 then I'll get negative 6 minus 3 which is negative 9
All right, so I've now got my 1 and my zeros now
I'm going to move to the next column [I] want to make the entry in the middle of one
To me the easiest way to do this would just be to switch Row 2 and Row
3 because then that will put a 1 [in] the middle
You could divide or multiply the second entry by negative 1/5, but to me this seems easier
So I'll leave the first part alone
1 2 1 6 I'm switching so the third row is going to become the second row and the
[second] Row is going to become the third Row
so I'm just replacing the order and
Now I need to get zeros everywhere above that, so I'll take
Negative 2 times row 2 and add that to row 1 to give me my new Row 1 and
I'll just take 5 times row 2 and add that to Row 3
To give me a new row 3 [so] I'm just thinking what's going to give me zeros above and below this one
So it looks like nothing is happening to the second row, so I'm just going to write that [down]. Just like it is
so negative 2 times 0 plus 1 is 1
[I'll] get negative 2 plus [2] which will give me 0 looks like I'll get 10 plus 1 which is 11
Looks like I'll get 18 plus 6 which [is] 24 then
[when] I change the bottom one again, I'll get a 0
I'll get a 5 minus 5 which is a 0 [I'll] get negative 25 minus 3 that's negative
28
Getting some big numbers here, and then I'll get it looks like
Where'd we go so 5 times negative 9 that's negative 45?
Minus 11 is negative 56
All right, so it looks like we're getting some pretty big numbers [here], but that's okay
So now what I'm going to do. I want this entry in the bottom left to be a
just a positive one, so
notice if I take negative one over 28 and multiply that by New by [Row] 3 that will give me my new Row 3
That looks like I'm about to run out of time here
[the] 10 minute YouTube time limit so take a look for another video [right] around here
I will finish this problem off so don't go too far look around it'll be part two of this video