 In this video, I want to consider again the question, is B a linear combination of other vectors? So in this situation is B a linear combination of the vectors a1, a2, a3, and a4. So we have four vectors in consideration this time. Another thing that we're going to change here is we're going to change the scalars. In the previous example, we worked over the real field, the real numbers. But this time I want to work mod 5. We're going to work mod 5 here. So z53 means that we're going to work arithmetic mod 5 and our vectors will have three entries in it. So our first vector a1 will be the vector 123, a2 will be 102, a3 will be 224, and a4 will be 114. Can these four vectors be combined in such a way to produce the vector B, which is 421? Remember, when we work mod 5, we only have five numbers in our arithmetic, 0, 1, 2, 3, and 4. That's it. Now, if B were a linear combination of the AIs, then that means there would be some scalars, x1, x2, x3, x4, so that these things combine together to give us B right here. Now, since we're working mod 5, you might think, well, I could just try every possibility, right? There's only five options for the first, five options for the second, five options for the third, five options for the fourth. We could try every possibility to see if that works. Well, admittedly, if you do that, that's going to be 5 to the fourth, which is 625. That's a lot of possibilities. I mean, it's not the worst thing in the world, but you know, you might be better just solving it than just guessing and checking along the way. So we're going to solve this using the elimination techniques for operations that we've seen before. Solving this vector equation is equivalent to working with this augmented matrix whose first equation is the first vector, whose first column is the first vector, whose second column is the second vector, whose third column is the third vector, whose fourth column is the fourth vector, right? So the columns of the coefficient matrix are the vectors that have to be linearly combined together. And then the last column is the vector we're trying to see if it can be produced from the linear combination. We want to solve the linear system associated to this matrix. Now, I should have left some space right here, so I'm just going to work on the left. We have our pivot position ready to go, the 1-1 position. We want to get rid of the 2s and the 3s down here. So to do that, we could take row 2 minus 2 times row 1, and we could take row 3 minus 3 times row 1 as well. But I want to mention that since we're working mod 5, technically speaking, there is no negative 2, right? But negative 2 is actually the same thing as plus 3. Because negative 2 plus 3, these numbers are congruent mod 5. And same thing with this one right here. Instead of subtracting 3, when you work mod 5, we really could actually just get plus 2 or 1. Notice that 2 and 3 add together to give us 5, right? Their difference is a multiple of 5. And so we don't even have to worry about subtraction here. We're going to take row 1 in times it by 3. This gives us 3, 3. 3 times 2 is 6, which 6 reduces to 1 mod 5. 1 times 3 is 3. And 3 times 4 is 12, but 12 reduced mod 5 is 2. For the next row, we're going to times the first row by 2. So we get 2, 2, 2 times 4 is 4. 2 times 1 is 2. And then 2 times 4 is 8, but 8 reduces to 3 mod 4. And so notice what happens when we combine things this time. 2 and 3 together give you 5, which is congruent to 0 mod 5. 0 plus 3 is a 3. 2 plus 1 is a 3. 1 plus 3 is a 4. And 2 plus 2 is a 4. No other reduction was necessary except for the first one. Now for the third row, 3 plus 2 is 5, which is the same thing as 0. 2 plus 2 is 4. 4 plus 4 is 8, which, like we mentioned, reduces to 3. 4 plus 2 is 6, like we've mentioned, reduces to 1 mod 5. And then 1 plus 3 is 4. And that takes care of the reduction right there. So how do we do the next one, right? So we have a 4 right here. We have a 3 we need to use to cancel out. If this were real numbers, we'd do something like R3 minus 4 times 3 R2. And now we would probably curse and scream because we have to do fractions. The good news is when you work mod 5, you don't have to use any fractions whatsoever. So for example, we can say that 1 third is actually congruent to 2 working mod 5 here. And the reason for that is, is that 3 times 2 is equal to 6, which is 1 mod 5. So notice that 2 times 3 gives you 1. So 2 is the reciprocal of 3. It's the number which multiplies by 3 to give you 1. And so therefore, if you take 4 thirds, this is the same thing as 4 times 2, which is 8, which reduces to be 3 mod 5. You could do it that way. Or another approach that students seem to like is you could replace the numerator with something equivalent to 4, such as 9. 9 divided by 3 is in fact 3. And so you see in either situation when you work mod 5, 4 thirds is going to give you a 3. And so that tells us that this fraction could be removed and we could write this as R3 minus 3 R2. But if you're in an optimistic mood, we don't want to use negative 3. We actually want to use positive 2. And so that's all we have to do. 3 times 2, 3 times 2 is 6. We're going to add 1 to 4. 3 times 2 is 6. That's a 1. 4 times 2 is 8, which is 3 mod 5, and you get a 3 right there. So notice what happens. 1 plus 4 is a 5. That's 0, giving you this right here. 3 plus 1 is a 4. 3 plus 1 is a 4. And 4 plus 3 is a 7. 7 reduces to 2, mod 5. So so far, so good. And now when we look at the next pivot position right here, we'll notice that our matrix is now in echelon form, right? So this tells us that our system is consistent because there's no contradictions here. There's going to be a free variable in here. There's going to be multiple solutions. Now as we start the backwards phase here, we're going to divide everything in this row by 4. Divide everything by 4. And row 3, excuse me. Now some of these are going to be pretty obvious, right? 4 divided by 4 is going to give you a 1. 1 right there. What do you do with the 2 fourths? How does that one handle? Well, 2 fourths, just as a regular fraction, you can simplify that to be 1 half. You still have to do something about the 2. Now 1 is congruent to 6, mod 5. And so this is actually congruent to 3, which is where this number comes from. So just work through the arithmetic, mod 5, and you're going to be just fine. So the bottom row becomes 1, 1, 3. Now to get rid of the numbers up here, we do have to do some cancellation, right? We're going to do row 2 minus 3 times row 3. But if you want to be optimistic, no pessimism here. You're going to get R2 plus 2 R3. And how do you get rid of the 2? Well, we're going to do R1 plus 3 times R3 right there. So we're going to get a 2, a 2, and a 6, which is 1. We're going to get a 2, a 2, and I'm not sorry, not 2, 2, 2. We're going to get a 3, a 3, and then a 9. 9 is 4, mod 5. So when you combine those together, 2 and 3 gives us 5, which is 0. You're going to get 3 plus 1, which is a 4. And then 4 plus 4 gives us 8, which gives us the 3. Great. 3 and 2 gives you 5, which is the same thing as 0. 4 and 2 is 6, which reduces to 1. And 4 plus 1 is, again, 5, which is 0. So that's what our reduction looks like down here. Now the last thing to do to reduce this thing is to get rid of the 1 right here. Well, I guess actually, let's divide everything by 3 in this situation. Let's divide by 1 third R2. But remember, dividing by 3 is the same thing as multiplying by 2. So we're just going to times everything by 2. So the 3 will become a 1 when you divide by 3. The 1 divided by 3 is going to be the same thing as 1 times 2, which is just 2. And then times things by 0 is still going to be 0. And so now we have a 1 here we want to get rid of this. So let's just take R1 minus R2. And if you're sick of all the addition, you want to be pessimistic for once. We can just attract minus 1 and a minus 2 right here, in which case 1 minus 1 is a 0 and 4 minus 2 is a 2. And so now we see our matrix in REF in all of its glory right here. If we switch this back to a system of linear equations, we will get something like the following. We're going to get that x1 plus 2 times x4 is equal to 3. That's the first equation. The second equation will say that x2 plus 2 times x4 is equal to 0, like you see right here. And then finally, x3 plus 1x4 is equal to 3. You see this right here. And so like we predicted, x4 is going to be a free variable in this system. If you solve for the dependent variables x1, 2, and 3, you get that x1 equals 3x4 plus 3. x2 equals 3x4 and x3 equals 4x4 plus 3. You'll notice here, right, when you move the x4 to the other side, you should have a negative 2x4, which of course is 3. When you move this over here again, you're going to get 3x4. And then lastly, when you move x4 over here, a negative x4 is actually 4x4 when you work on 5. So we get these things right here. And so for any choice of x4, you get a solution to the linear system. So for example, if x4 equals 0, you're going to get 3030. If x4 equals 1, you're going to get 3 plus 3, which is 6, which gives you 1. You're going to get 3. You're going to get 4 plus 3. 4 plus 3 is 7, which is just a 2. And then you get a 1 right there. If you have that x4 equals 2, again, going through the arithmetic here, 2 times 3 is 6, which is 1 plus 3, which is 4. 2 times 3, like we said, was 6, which reduces to 1. And then 4 times 2 is 8, which reduces to 3. 3 plus 3 is 6, which reduces to 1. And then finally, x4 was 2 right there. And that's where all these other ones come from. This is what happens when x equals 4. And this happens when x4 equals 3 and then x4 equals 4. These are the five possibilities. And it turns out using any of these as your coefficients would give you a combination for b, right? So remember the original vectors. a1 was 123. a2 was 102. a3 was 224. And a4 was 114. And this is supposed to add up to b421. So we can plug in the coefficients that we discovered right here. Plug in 3030, ignoring the zeros for a moment, right? If you look at the things across the top, you're going to get 3 plus 6, which is 1. You're going to get 3 times 2, which is 6, which is a 1, plus 6, which is a 1. And then lastly, you get 3 times 3, which is 9, which is a 4. And then 3 and 4 is a 12, which actually is a 2. And so you combine these together, you get 4, 2, and 6, which 6 reduces to 1. That's a b. All right, let's try a different one real quick. Put that back. Let's try it when x4 equals 1 this time. We're going to get 1, 3, 2, and 1. So when we combine these together, you're going to get 1 plus 3 plus 4 plus 1. You're going to get 2 plus 0 plus 4 plus 1. And then finally, you're going to get 3 plus 6, which is 1, plus 8, which is 3, plus 4. When you combine those together, you're going to get 1 plus 3, which is 4, plus 4, which is 8, plus 1, which is 9. 2 plus 0 is 2, plus 4 is 6, plus 1 is 7. And 3 plus 1 is 4, plus 3 is 7, plus 4 is 11. And so when you reduce these things down, 9 goes to 4, 7 goes to 2, and 11 would go to 1, all on 5. And so we can see that these linear combinations in fact work, and all five of these would work. You have multiple solutions. The reason there's five is because we're working mod five. If we were working mod seven, we would have actually gotten seven solutions here. When you have multiple solutions, it turns out for a finite field, the number of solutions is going to be of some power of your modulus here. So like five or seven, we could get five squared if we had two free variables, we only had one here, so we got five to the first. So we can check whether we have a linear combination and actually produce linear combinations working over a finite field. The complex numbers, any field we want, the algebra is the same, the arithmetic changes based upon your field.