 In this video, we're going to talk about a very important question in linear algebra. How do we determine whether a vector is a linear combination of some other vectors? So case in point, let's consider three vectors a1, which is 1, 2, 3, 4, one of my favorite vectors, a2, 1, 0, 0, 1, and a3, which is 3, 0, 5, 7. While it's easy to create linear combinations of a1, a2, a3, you just pick your three favorite numbers to use as scalars, what we need to determine is if we have a specific vector in mind, b, which in this case will be negative 7, 4, negative 4, negative 9, is b, a combination of these three vectors. Now, if b were a combination of these vectors, then there would be some scalars, x1, x2, x3, which would multiply by a1, a2, a3 respectively and add together. This would add up to be the vector b. Therefore, determining whether b is a linear combination of the a's or not is equivalent to solving this vector equation. And as we've seen before, solving this vector equation corresponds to solving a system of linear equations whose augmented matrix is presented here below. Now, when one constructs this augmented matrix, let me point out to you that there's a correspondence between the vectors and the columns here. The first column of the matrix is just the vector a1. The second column of the augmented matrix is just the vector a2. And the third column of the coefficient matrix is just the vector a3. So these are the vectors that are going to be combined together, coefficient matrix. And then the augmented column is the vector b, that is the vector we're trying to determine whether it's a combination or not. And so we would want to go about solving this system of equations using this augmented matrix. As we're learning about row or doucy matrices, let's see a little bit of details what's going on here. So for the first one, well, it's just starting off. We're going to have a pivot position in the 1, 1 position. The first column is the leftmost non-zero column. We put a pivot position in the first spot. Fortunately, we already have a 1 in the pivot position, so that's great. So we want to get rid of the numbers below the pivot just by a row replacement. We're going to take row 2 minus 2 times row 1, row 3 minus 3 times row 1, and row 4 minus 4 times row 1. That means we're going to take minus 2, minus 2, minus 6, and plus 14. For row 3, we're going to get minus 3, minus 3, minus 9, and plus 21, sorry, and then for the last one minus 4, minus 4, minus 12, and then plus 28. And so we add those things together, right? 2 minus 2 is 0, 0 minus 2 is negative 2, 0 minus 6 is negative 6, and 4 plus 14 is 18. For the third row, we're going to get 3 minus 3 is 0, 0 minus 3 is negative 3, 5 minus 9 is negative 4, and 21 minus 4 is 17. For the fourth row, the force canceled out there, 1 minus 4 is a negative 3, 7 minus 12 is a negative 5, and negative 9 plus 28 is a 19. So we do all those operations there. Now, if we were to follow the Gaussian elimination technique, what we would do is we take the pivot in our second position, the 2, 2 position is in our pivot, which is great. And then we want to get rid of these numbers below right here. And so we accomplish that by taking row 3, we're going to take minus 3 halves row 2. But I'm going to stop you right there. Whenever I can avoid it, I don't want to use fractions. So we're going to take a slightly different approach. So one thing I notice is that when you look at row 2, everything's actually even. So deviating from the standard algorithm, I'm going to divide everything in this row by negative 1 half. I should say divide everything by negative 2. So we're going to scale the row by negative 2. What that's going to do for us is that, well, 0 divided by negative 2 is 0, 1, our negative 2 divided by negative 2 gives us a 1, negative 6 divided by negative 2 is a positive 3, and 18 divided by negative 2 is a negative 9. So you get a nice coefficient of 1 right there. And then you can proceed like you're doing already. But another observation I'm going to make here is that these numbers right here, I want to get zeros below the negative 2. And how I do it, as long as I don't break through. So the one way of doing that is I could take row 4 minus row 3. That way no multiplication is actually necessary. You're just going to take a plus 3, a plus 4, and then you're going to get a minus 17. And so when you do that, you're going to get a 0 for the second column, a negative 1 for the first column, and then you're going to get a negative 2 for the last column right there. So very quickly you are going to get the 0 there. So we'll have to get a 0 here. And we basically can't avoid another row operation. We're going to have to do R3 plus 3 times row 2 this time. So we get a 3, we get a 9, and we're going to get a negative 27 right there. Also, I would like that to be a positive one. So I'm going to take the last row and times everything by negative 1. So when I do that, by times the last row of a negative 1, I get a 1 and a negative 2, which is great. But then in terms of row operations, the replacement, those will cancel out. 9 minus 4 is a 5, and then negative 27 plus 17 is a negative 10. We're good right there. And so now you see that your third and final pivot position will be in the 3, 3 spot. It would be great if there was a 1 right there, which, you know what, I already have a 1, I'm like a carpenter thinking one step ahead. In which case we can swap the 1 and the 5, and therefore we get a 1 in our pivot position, like so. Now to get rid of the 5 below, we're just going to take row 4 minus 5 times row 3. You can see what's going to happen here, going to minus 5 and a plus 10. These things cancel entirely. You can get this row of zeros. Now this row of zeros should give us pause. It's not a contradiction, and now we're in echelon form. So we see that our matrix, since it's an echelon form, the corresponding system of equations is going to be consistent. We can see that there's no contradictions in an echelon form, so the system is consistent. Coming back up to the original question, right, is B a linear combination? Is B a linear combination of a1, a2, a3? Because this system is consistent, the answer to this question is yes. Now once we get the question, the answer to the question is yes. We typically want to follow it up with, well, how do you do it then? How is it done? So we have to continue solving the system of equations. So picking up where we left off, we have this echelon matrix right here. I want to get rid of these 3s right here, so I'm going to do row replacement. Take row 1 minus 3 times row 3, and we're going to do that same thing for row 2. Row 2 minus 3 times row 3. So we get minus 3, minus 3. We're going to get plus 6, plus 6. These will just cancel, giving us the zeros we expect. And then negative 7 plus 6 is a negative 1, and negative 9 plus 6 is a negative 3. Now the last thing to do is to get rid of the 1 that's in the position right here. We're going to do row 2 minus row 1. So we get a minus 1, and we're going to get a plus 3. So this cancels, giving us a 0, and then negative 1 plus 3 is a 2. So this right here is our row reduced echelon form. From this, we can see the solution is exactly going to be x1 is 2, x2 is negative 3, and x3 is negative 2, as illustrated right here. These are the coefficients of the linear common A. Notice if I take 2 times A1, negative 3 times A2, and then negative 2 times A3, that's going to give you the vector B. And if you have any doubts about that, we can actually multiply these things out, right? 2 times the first vector gives us 2, 4, 6, 8. Who do we appreciate? The next one gives us a negative 3, 0, 0, negative 3. And then the last one gives us a negative 6, 0, negative 10, and negative 14. Combining all these things together, you're going to get 2 minus 3 minus 6. You'll notice that 2 and negative 3 come together to give us a negative 1, minus 6 is a negative 7. Well, that's good to know. And you're going to get 4 plus 0 plus 0. That's an easy one to do. That's a 4. And then the next one, you're going to get 6 plus 0 minus 10. That should be a negative 4. Well, there you go. And then finally, 8 minus 3 minus 14. 8 take away 3 is 5, 5 take away negative 4, 5 take away 14. It's going to be a negative 9. And so we can check our work. In fact, this is the right linear combination that forms B.