 In 1922, on Gaussian elimination, this is math 1050, College Algebra, I'm Dennis Allison and I teach in the mathematics department here at UVSC. Let's look at the objectives for today's episode. Let's see, first of all, we'll talk about the matrix representation of a system of linear equations and related to that, we'll talk about the three elementary row operations. This leads us to item number two called Gaussian elimination, which is a technique for solving a system of linear equations. And then finally, we'll talk about two special cases, those are the inconsistent systems and the dependent systems. So we'll do all of these things today. First of all, let's go to the green screen and let me remind you how we go about solving a system of equations. Let's take one fairly simple. Suppose we have x plus 2y equals 4 and another equation that says 2x minus 3y equals 1. Okay, now, when we solve a system of linear equations, by the way, this is referred to as a system of linear equations because I have more than one equation in it and these are all linear equations because if I graphed them, they would be graphs of straight lines. And I refer to this as a 2 by 2 system of linear equations. Now when I say 2 by 2, what I mean is that there are two equations and two unknowns. So the first number refers to the number of equations, the second number refers to the number of unknowns. So I've got two equations here and I have two unknowns, so we call it a 2 by 2 system. Now when I'm solving a system of linear equations, there are really only three things I can do to the system that can make it look different but keep the same answer. For example, I can interchange, number one, I can interchange two equations. I can interchange two equations. So in other words, if I just switch equation one and equation two, just invert them there, that wouldn't affect the outcome but it would certainly make the system look a little different. I think we would recognize it but it would still have the same solution. The second operation I can perform is I can multiply any equation by a non-zero constant. For example, if I wanted to eliminate the x's, what I could do is multiply the first equation by negative 2 and I would write it as negative 2x minus 4y equals negative 8. I've multiplied through there by negative 2 and I could rewrite the second equation. Let's see, that's a minus right there. And this looks like a different system of equations. In fact, I guess technically it is but it still has the same solution and the purpose of multiplying through by a negative 2 is so that maybe in this case I could make my x terms add to be to be zero. Okay, so I can multiply any equation by a non-zero constant, by a non-zero constant. So in this case I multiplied by negative 2. The third thing that I can do to a system of equations that won't destroy the solution but will make it look different is I can take a multiple of any equation and add it to another equation. So I can add a multiple of one equation to another equation. Now let me just back up here to item number two. You know in number two it says that we could multiply the equation by a non-zero constant. Why do you think it has to be non-zero? What's wrong with multiplying an equation by zero? Stephen? You get something like 0x minus 0y equals zero and that can be anything. Yeah, for example, you see if I multiply the first equation here, if I multiply both sides by zero I get zero equals zero and what that means is now I pick up solutions here that may not be solutions for both of these because everything solves zero equals zero. I mean this doesn't discriminate, x can be any value, y can be any value but the second equation says the x's and the y's have to satisfy that certain equation. Over here they had to satisfy not only the second equation but the first equation. So when you multiply by zero you essentially wipe out that equation and you've just deleted that information. So you multiply by a non-zero constant so you don't completely wipe it out. And then the third step or the third operation is to take a multiple of any one equation and add it to another. Okay, well let's go to the first example and I'll demonstrate what's called Gaussian elimination using these, oh we have the elementary row operations on a graphic. Let's go to that one. It says, number one I can interchange two rows, we were just discussing that. Number two I can multiply a row by a non-zero constant and number three I can add a multiple of a row to another row. Those are the only three things you can do to a system of equations that won't change the answer to some other answer. So we want to keep these three operations in mind. Okay now let's go to the next example. Here we have an example of a two by two system of equations but I want to demonstrate a new method for solving it that I don't think you've seen before. This is called Gaussian elimination. Now the system of equations says that 2x plus 5y is eleven and 3x minus 2y is seven. Let me write this on the screen here, 2x plus 5y is eleven and 3x minus 2y is seven. Okay so if we come to the green screen, the first thing I'm going to do is I want to abbreviate this system of equations so I don't have to write down so many symbols. You may say but Dennis there aren't that many symbols here to have to write down. Well you know if this got bigger, if this had been like a five by five system of equations, five equations and five unknowns, there'd be a lot of writing involved. So I'd like to abbreviate it as much as possible. So what I'm going to do is put square brackets here and inside I'm going to put these coefficients 2, 5, 11, 3, negative 2 and 7. Now I refer to this as a matrix and not unlike the movie called The Matrix. This matrix is an array of numbers. You'll sometimes see expressed with square brackets. Sometimes you'll see parentheses written on there so you can do it either way with parentheses or with the square brackets. So one thing you wouldn't want to put around it are two vertical bars because that's going to mean something else later on in these episodes. So either parentheses or square brackets. Now I would call this matrix a two by three matrix because it has two rows and it has three columns and the last column represents the constants. In some textbooks you'll see a little dotted line put in right here to separate the constants from the coefficients of the variables. I'll probably not do that because on this green board it just adds more writing and it may make it harder for you to read on the TV screen. But sometimes you'll see a dotted line in there to separate the coefficients of the variables from the constants. So on the first line you can see our first equation. That's 2x plus 5y is 11. We know that the first column are coefficients for x, the second column are the coefficients for y and the last column are the constants. And then the second row says 3x minus 2y equals 7. Okay now with this matrix I want to begin to reduce it so that it eventually has this form. Let me just jump down here further down on the green board and here's what I would like to see. I would like to see a one in this position and a zero below it. And then I would like to see a one in this position and just some number up above it. It doesn't really matter what number goes there. And then on the other side of the dotted line I'm going to get two numbers to appear. Now let me just make up some numbers to fill in these spaces. I don't think they're the actual numbers we're going to get eventually. But suppose there's a 2 here, suppose there's a 5 here and suppose there is a 6 here. Now if I can make this matrix turn into this form then I'll have ones along what I call the main diagonal starting in the upper left hand corner and going down diagonally. Ones along the main diagonal and zeros below the ones. Now if I can get my matrix in this form then what this matrix says as a system of equations is that x plus 2y equals 5. What's just the second equation saying? It says y equals 6. So right away we know the value for y is 6. And then if I back substitute that y into the other equation that says that x plus 12 equals 5 and so x would be negative 7. I don't really think that's the solution for my system of equations but this is just to demonstrate why I want to get my matrix in this form. I can get one of my variables y equals 6 and then I can back substitute into the other equation and I can go back and get x. Now you might say well Dennis how can you make that matrix become this matrix? What I'm going to do is use the three elementary row operations so that I don't destroy the solution along the way. You know there is a term I forgot to mention here this matrix that represents that system of equations. Matrix has a name and it's called the augmented matrix. The augmented matrix that's the 2 by 3 matrix that I've written down here. If I had only listed the coefficients and made a square matrix like this then that's referred to not surprisingly as the coefficient matrix but I've attached the constants as well in the last column. So there's an augmented matrix and there's a coefficient matrix both of these you'll hear me use these terms as these episodes progress. So let's go back to the 2 by 3 augmented matrix for this system. Now what I'd like to do is to get a 1 in this first position and then get a 0 below it and then going to the second column I'd like to get a 1 in this position and then I should have the matrix in the form I'd like. So how can I get a 1 here? Well let's see what are my three elementary operations? I can interchange two rows but I don't see that that would help if I interchange these two rows I'll have a 3 rather than a 2. Another possibility is I can multiply by a non-zero constant and you know I can multiply the first row by a half but I'm going to avoid doing that because that would introduce fractions. If I multiply by a half I'll get 5 halves and 11 halves as well as the 1 in the first position and I'd like to avoid fractions only because it's a little bit more difficult for us to deal with. So I'll stick with integers as long as I can and the last possibility is I can take a multiple of one row and add it to another row. Well here's what I think I'll do I'm going to change this matrix to a new one and I'm going to take a multiple of row 1 and add it to row 2. I'm going to take row 2 and add on negative 1 times row 1. Now you see if I multiply row 1 by negative 1 and add it to row 2 I'll have a 1 in this position and then afterwards I can interchange the two rows and I'll have a 1 up above. Okay so let's do this I'm not actually going to change row 1 I'll go ahead and put in the dotted lines for a while but I am going to change row 2. I'm taking row 2 and adding negative 1 times row 1 that'll give me a 1 here. And if I take this entry and add on negative 1 times 5 I'll get negative 7. And if I take this entry 7 and add on negative 1 times 11 what number will I get there? Negative 4. Okay so what I've done is I've produced a 1 in the second position of the first column. So now I'm going to interchange those two rows. Now the way I'll denote that is I'm just going to put an arrow going from row 1 to row 2 to indicate I'm interchanging those and I'll put 1, negative 7, negative 4 and then 2, 5 and 11. Now at any given moment I could stop, take this matrix, this augmented matrix, write a system of equations for it and solve it but I don't see that solving what I have here would be any simpler than what I had originally. So let's keep going. I have a 1 here I'd like to get a 2 in this position, excuse me a 0 in this position. So what I'll do is I'll take row 2 and I'll add on negative 2 times row 1. Now you see by doing that I'll have a 2 plus a negative 2 is a 0. I'll get a 0 there. I'm not actually going to change row 1 so I'll rewrite what I have. And if I take negative 2 times row 1, add it to row 2 that'll be a 0. That's what I was after. So I have the first column the way I want. Now let's complete this. If I take negative 2 times the first entry and add it to 5 that's going to be 19 I think. And if I take negative 2 times negative 4 and add it to 11 I think that'll be 19 also. You notice I'm not putting equal signs between these matrices. I'm putting this little wiggly tilde sort of thing. The reason is these two matrices well none of these matrices are actually equal because for example this matrix has a 3 in the second row first column. This has a 1 in the second row first column. So these matrices have different entries so they're not equal. What they have in common is these represent systems of equations that have the same solution. So I'm not saying they're equal but I'm putting a different symbol in between. Okay now I'd like to get a 1 in this position and I think the simplest way to do it would be to multiply by 1 over 19. So I'll do that next. So this is 1 over 19 times row 2. I'm not going to change row 1 but I will change row 2 and it becomes 0, 1, 1. Well you know this is the form of the matrix I was after. I wanted to get a 1 in the upper left hand corner and a 0 below it. And I wanted to get 1's all the way down the main diagonal. And now I'm going to step out and write the system of equations. The first equation says x minus 7y equals negative 4. The second equation says y equals 1. So there's my solution for y. And if I back substitute into the first equation that says x minus 7 is negative 4. And therefore x is equal to 3. So I could give my solution this way. I could say x equals 3, y equals 1. But if you look at the back of your book, here's what you'll probably see is parentheses 3, 1. In other words, these numbers are entered in an ordered pair in alphabetical order. And this takes up less space in the back of the book than saying x equals 3, y equals 1. Now how shall I interpret that answer? Well this is the only pair of numbers that will satisfy both equations. If I go back up here to the beginning, if I put a 3 in the first position and a 1 in the second position, let me get that a little bit lower so maybe you can see that on the screen, then 2 times 3 is 6, plus 5 times 1 is 5, 6 plus 5 is 11. And in the second equation, 3 times 3 is 9, 9 minus 2 is 7. And that's the only pair of numbers that'll solve that system. Now if I were to graph these lines, and if you might imagine over here if I were to graph these lines, one of the lines, I'll just draw something, might look like that. And the other line might look like that. And where those lines intersect is the ordered pair 3, 1. So this would be 3, y would be 1. So one interpretation is I found a point of intersection of two lines. Another interpretation is I found a common solution for two separate equations. And they all make sense as a response. And this is the answer that you get. Now you might say, well Dennis, actually we've solved things like this before. We didn't use this method. But you might say we've solved these by graphing. We've graphed lines in intermediate algebra, elementary algebra, and found the intersection point. And we've also graphed these by the substitution method and by the elimination method in intermediate algebra. So what's the purpose of going through all this? This seems to take longer than what we've learned before. Well, as these systems of equations get more complicated, let's say you have 10 equations and 10 unknowns, the methods that you've learned in previous courses are more complex and very slow. And this is relatively fast as the systems get more complicated. Let's go to another example and I'll demonstrate this. Let's go to the next graphic. OK, here we have a system of equations. I would call this a 3 by 3 system because I have three equations and I have three unknowns. And this is solved by Gaussian elimination. OK, so I'm going to write the system of equations up here. I'll put it over here in the corner. x minus y plus 3z equals 4. And then there's x plus 2y minus 2z equals 10. And then 3x minus y plus 5z equals 14. OK, this is a 3 by 3 system of equations. One thing I should mention before I begin is why is this called Gaussian elimination? Well, first of all, it's called elimination because this is very similar to the elimination method you learned in intermediate algebra where you add and combine equations to eliminate a variable. When I produce zeros, that's exactly what I'm doing is eliminating a variable. Gaussian elimination because this method was invented by a fellow named Carl Friedrich Gauss a little over 150 years ago. OK, so let's try Gauss's method for this. First, I'm going to write an augmented matrix. So my augmented matrix will be 1, negative 1, 3, 4. And I think I'll put in that dotted line temporarily to separate the constants from the coefficients. 1, 2, negative 2, 10. And then finally, 3, negative 1, 5, 14. OK, so this is the augmented matrix for this 3 by 3 system of equations. And you know that the people who actually use this are people going into computer science. People who are going to be majoring in mathematics and related disciplines. Because whereas the arithmetic in these processes can get more and more involved as the systems get bigger and bigger, if we have a computer do this, the computer can do it very efficiently. Because computers can add, subtract, multiply, and divide very quickly. So it might take just a split second to solve this on a computer. For us, it takes a little bit of time to sort of labor through the arithmetic. OK, so here we go. I'd like to get a 1 in the upper left position. And I have a 1 there. So now my goal is to get a 0 here and here, to get 0s below that 1. After I've taken care of the first column, I want to get a 1 in this position. This is sometimes called the 2, 2 position. It's the second row, second column. So I want to get a 1 in the 2, 2 position. And then I want to get a 0 below it. That would be the 3, 2 position, third row, second column. And after I've taken care of that, I want to get a 1 where the 5 is. That's the 3, 3 position. So I want to get 1s along the main diagonal and 0s below it. And I do this one column at a time. OK, so to get a 0 here and here, I think what I should do is to take row 2 and add on negative 1 times row 1. And then on row 3, I should take row 3 and add on negative 3 times row 1. Because row 1 is OK already. I have a 1 there, so I'll just rewrite that. And if I take negative 1 times row 1, add it to row 2. I'll get a 0 here. That was the whole purpose of this maneuver. Then if I take negative 1 times the second entry and add it to the 2, I'll get a 3. And if I take negative 1 times the 3 and add it to negative 2, I'm going to get a negative 5. And what would the last number be over here? Negative 1 times 4, add it to 10. 6. It'll be a 6, right? OK, now we have the last row to compute. Can anyone tell me what the last row would be? We're taking negative 3 times row 1 and adding it to row 3. Negative 3 times the first row, add it to the third row. What number goes here? 0. 0, right. And what goes here? 2. A 2, right. Now for those people at home, and as well as the students here in the studio, you might imagine this is the place where if there's an error made, it's in simple arithmetic. It's not that the process is complicated, but there are so many additions and subtractions and multiplications, it's easy to kind of miss a number here or there. But of course, accuracy is everything in this process. OK, Susan, you said 0 and 2. What would the next number be? 4. Let's see now, we're multiplying by negative 3 and we're adding it to 5, so I think it'd be a negative 4. See, that's going to be a negative 9 added to 5. And one more number, one more number. What's going to go here? 2. 2, exactly. OK, now you see, if you were to miss any of these arithmetic calculations, you're now solving a different problem. And it's no longer equivalent to the original system. So you may come up with an answer, but it wouldn't be the answer for that system. Now, by the way, when you're doing this at home, don't be surprised if you make a careless error like that, because I make careless errors too and you just try to be as accurate as you can. OK, now continuing, let's see. I have the first column taken care of. I have a 1 at the top and 0s below it. So now I go to the next column and I don't really care what's above the 3, but I do care what's in the 2, 2 position. I'd like for that to be a 1. And I'd like to have a 0 right below it. Now my first goal is to get a 1 in that position. Can anyone tell me a way that you could get a 1 where the 3 is? Matt. Well, you can add to it negative 1 times the third row. Exactly, right. If you take negative 1 times the third row and add it to the second row, that will be a 1. Now an alternative, some of you might be thinking, would be to just multiply the second row by a third. That would give you a 1 and you'd have a 2 over here. But the problem is this would be a negative 5 thirds. And if you think we make mistakes with integers, we really make mistakes when we get to fractions. So I generally avoid fractions if I can. If you decide to multiply row two by a third to get a 1 there, that's perfectly OK. It's perfectly legal and you could do that on your homework or on an exam, but I would recommend doing what Matt just suggested and staying with integers. So let's see, I think I'll come down here to write this. We're going to take row two and add on negative 1 times row three. Now this is my own notation that I've invented for putting out here in front to always remind me how these numbers are being computed. I'm writing this right across from row two. Row one hasn't changed, so I'll just rewrite it. And row three hasn't changed, but row two changes because I'm taking negative 1 times row three, adding it to row two, that's still going to be a zero. And I'm taking negative 1 times 2, adding it to 3, and that'll be a 1. That's what I was after. What will the next number be? Negative 1 times this, add it to negative 5. Close, not 1. It'll be a negative 1. Yeah, because see, multiplying by a negative 1 makes it a plus 4. Plus 4 added to negative 5 is negative 1. And the last entry will be? A 4. Is a 4, exactly. OK, well, we're halfway there. I have the first column taken care of. I have the second column half completed. I need to get a zero right here. How can I get a zero where the 2 is? Take negative 2 times row 2 and add it to row 3. Add it to row 3, exactly. And I'm writing those instructions in front of row 3 because that's the row that's going to change. Row 1 doesn't change. And row 2 doesn't change. I want to keep that 1 where it is. But now I want to get a zero here. You know, I think what this points out is why we want to get the 1 first. Once you have a 1 there, you can use it as a lever to eliminate any other number. So if you want to eliminate a 2, you multiply the 1 by a negative 2 and add it to it. So I got the 1 because that would be easier to work with and say if I had a 3 there, if I had a 3 here and tried to eliminate the 2, I'd have to use fractional multipliers. Well, let's see, this would be a zero and another zero. The next entry will be negative 2. And the next entry will be negative 6. OK, I have column 1 taken care of. I have column 2 taken care of. Now I come to column 3. What would I like to see where the negative 2 is? A 1. Would like to see a 1. And how can you get a 1 there? Divide by negative 2. Right, you can divide by negative 2. I'll say multiply by negative 1 half. You say potato, I say potato. The difference is in our elementary row operations, we said we could multiply by non-zero scalars. I'm sort of thinking of multiplication. But I understand exactly what you're doing. You'd be dividing by negative 2. Let me point out some things that wouldn't work. What if someone said, Dennis, if you take row 1 and add it to row 3, you will get a 1 in that position? That's true, but that's not what we'd want to do. Why not, Matt? Because you'd also have to add the negative 1 to the 0's, and that would eliminate 0's. And then you'd lose those 0's. And we've worked hard to get those 0's. So we don't want to lose the 0's. So I don't think I'd want to add row 1 or row 2, any multiple of it to row 3, because I'll lose the 0's. And you say, well, so why do you want the 0's? Well, just stay tuned here, and you'll see at the end of the problem why those 0's are really very precious. We're going to multiply, better make that a little bit lower. We're going to multiply row 2 by negative 1 half and add it to row to row 3. So it looks like this. My top row is left unchanged, 1, negative 1, 3, 4. My second row is left unchanged, 0, 1, negative 1, and 4. But my last row becomes 0, 0, 1, 3. Well, this is what we're after. We have all three columns in the form we want for Gaussian elimination. Now what do we do with this? Well, now I step out of this augmented matrix and I write the corresponding system of equations. x minus y plus 3z is 4. That's what the first equation says. The second one says that y minus z is 4. And the last one says that z is equal to 3. So now I'm going to back substitute, and I'll get y. Do you see a mistake? Row 2 and row 3 there at the very end. Wouldn't you add something? Oh, yes. I've got the wrong instruction here, thank you. Yeah, I did the right thing. I wrote the wrong instruction. This should be minus 1 half times row 3. That's all there was to it. Yeah, thank you, Jeff. I think I was thinking of so many different additions of rows that I wrote it that way here. We didn't add row 2 to row 3. We just multiplied row 3. OK, thanks. Well, I hope everybody wasn't confused by that. So now I'm going to back substitute. Can you tell me what y would equal here? y minus 3 is 4. What is y going to equal? 7. Y is going to be 7. Let's see, so we have z. We have y. Now I'm going to back substitute in both places up here and go back and get x. I need a little room, so I think I'll erase this last matrix. So in that first equation, we have x minus y plus 3z is 4. And we know that y is 7, so this is x minus 7, plus 3 times 3 is 4. And therefore, x minus 7 plus 9 is 4. So x plus 2 is 4, so x is 2. OK, so you see, at the end of the class, OK, so you see, at this point, things come together very rapidly. And my solution then is 2, 7, 3. I would write that as an ordered triple, 2, 7, 3. And that's the way you'd see the answer probably in the back of the book. If you said, Dennis, I'd like to write the answer. x equals 2, y equals 7, z equals 3. That's OK with me, but I don't think that's how you'll see it in the textbooks, because they try to save a little space when they record these. OK, let's go to the next example. And now we'll see an application of Gaussian elimination to a problem where we have to actually set the problem up in some fashion. This is called a partial fraction problem, and it goes like this. It says write the rational expression 5x plus 7 over x minus 1, x plus 1, x plus 2 in the form of a constant over x minus 1 plus a constant over x plus 1 plus a constant over x plus 2. Now, you might say, well, that actually work. Well, let me give you an example. Suppose I were to take a problem like 1 sixth. If we go to the green screen, 1 sixth. Now, 1 sixth is 1 over 2 times 3. And this is what we refer to as a proper fraction, because the numerator is smaller than the denominator. Now, whenever you have a proper fraction and you factor the denominator into two factors, like 2 and 3, you can write this as some constant over 2 plus some constant over 3. And these will both be proper fractions as well. If that's a proper fraction, this will be a proper fraction. Now, in this particular case, I happen to know what the answer is. It's not too complicated. I think we should put a 1 there and put a negative 1 over here. Now, this is a negative fraction, but it's still a negative proper fraction. 1 half minus 1 third is 1 sixth. Let's try this one more time. Suppose we had 5 over 21. Now, 21 is 7 times 3. I'll put the 3 first. 3 times 7. I'll put the smaller than the larger. Not that it really matters. And so a proper fraction with a denominator that factors into two different factors, like a 3 and a 7, can be written as something over 3 plus something over 7. And that sum, I bet one of the numerators could possibly be negative, should equal 5 over 21. Now, what would that be? Well, let's see. Let me just play around with some things here. What if I put a 1 here, 1 third? How many 21sts is 1 third? 7. That's 7. OK, 7. So what I need to do is subtract off 2 21sts. I don't see how I can make that 2 21st. So let's put a 2 3rds here. Put a 2 3rds here. How many 21sts is 2 3rds? 14. 14 21sts. So what I need to do is subtract off 9 21sts. 9 21sts. Now you know 9 over 21 is the same thing as 3 over 7. And we said subtract it off. I think that should be a negative 3. Now you notice this is a proper fraction and this is a proper fraction. And that sum is equal to 5 over 21. That's not a fact that you necessarily hear about in previous courses, but it's a fact that you will use later on if you take a course in calculus. Let's go back to our example and see how we're going to use this fact to solve this partial fraction problem. We have 5, let's see, 5x plus 7 over the product x minus 1, x plus 1, and x plus 2. And this is a proper fraction in the sense that I have the smaller degree on top. So I should be able to write this as a sum of proper fractions, something over x minus 1, something over x plus 1, and something over x plus 2. And these are proper fractions as well. That means the numerator has a degree smaller than the denominator. But these denominators are first degree. So the numerators must be 0 degrees, in other words, constants. So I'll just say a, b, and c for those constants. So the question is, what should a, b, and c be in order to decompose this original fraction? These are called the partial fractions because they each play a part in composing the original fraction. Well, to figure out what a, b, and c are, I'm going to multiply both sides by the product x minus 1, x plus 1, and x plus 2. Now, if I multiply on the left by that, I get 5x plus 7. And if I multiply on the right by that product, well, different things happen with each expression. In the first case, x minus 1 cancels, and I get a times x plus 1 times x plus 2. And then in the second fraction, if I multiply by the three factors, I get b times x minus 1 times x plus 2. And in the third situation, x plus 2 cancels, and what would be left? C times x minus 1 times x plus 1. Times x plus 1. OK, now I'm going to multiply out the left hand, the right hand side, and collect terms. That's going to be a times x squared plus 3x plus 2 plus b times x squared plus x minus 2 plus c times x squared minus 1. OK, so that's going to be a x squared plus 3ax plus 2a. This is just a bunch of basic algebra here. I'll multiply by b, and I get bx squared plus bx minus 2b. I know you've been wondering 2b or not 2b. Negative 2b is the answer to that. OK, so this is going to be cx squared minus c. Now, collecting terms, how many x squares will there be? How many x squares are there? Well, I've got ax squared plus bx squared plus cx squared. That's a plus b plus cx squared. How many x's are there? Well, I've got 3a plus b, and that's it, 3a plus b. And then finally, there's a constant term. What's the constant term going to be? 2a minus 2b minus c. 2a minus 2b minus c. Now, you remember on the left-hand side, this is equal to 5x plus 7. So here's what I can conclude. The constant term here has to equal 7. The constant terms have to be the same. What do you think 3a plus b is going to have to equal? Has to equal 5, because this is how many x's, and I have 5x's. And last of all, what is a plus b plus c going to equal? Zero. It's got to be zero, because there aren't any x squares over here. So a plus b plus c is zero. 3a plus b is 5. 2a minus 3b minus c is 7. I want to solve that system of equations, and then I'll know what those numerators should be. Let me just write down that information here before I lose it in this space. So what we have is that a plus b plus c is zero. And then we have 3a plus b is 5. And we have 2a minus 2b minus c equals 7. OK, I want to solve this using a system of equations. Now, I think I'll stop here and go over to the board, because I'm going to need more room to do this. So I'm going to walk over there to write this down. OK, so over here at the board, I've listed our system of equations. It's a 3 by 3 system. And I'm immediately going to change it to its augmented matrix. So the matrix is 1, 1, 1, 0. And then 3, 1, 0, 5. And then 2, negative 2, negative 1, and 7. OK, so watch me carefully, because it's easy to make careless errors on these things. Looks like I have a 1 OK, but let's get zeros where the 3 and the 2 are. I can do that simultaneously. I'm going to say rho 2 plus negative 3 times rho 1 and rho 3 plus negative 2 times rho 1. I think that'll give me zeros here and here. The first row doesn't change. It's 1, 1, 1, 0. But the next row will be 0 and negative 2 and negative 3 and 5. The 5 doesn't change because we're adding a multiple of 0 to it. And on the bottom row, I'm going to get 0 and negative 4 and negative 3 and 7. OK, so the first column is taken care of. Now in the second column, I'd like to get a 1 there. The first thing that comes to mind is I could multiply by negative 1 half. But if I do that, I'm going to get fractions over here. And I'd rather avoid introducing fractions as long as possible, because it's easier to make careless errors with those. So I think I'll do this. What if I were to subtract? Well, what if I were to add negative 1 times rho 3, add that to rho 2? And I think all these odd numbers will become even over here. So let's try that. I'm going to take rho 2 and add on negative 1 times rho 3. Now, rho 1 doesn't change. And rho 3 doesn't change, in this case. But rho 2 does. I'm adding negative 1 times rho 3 to rho 2. Well, negative 1 times 0 plus 0 is still 0. So my 0s haven't changed. But the negative of negative 4 added to negative 2 is plus 2. And I think the rest of the rho is going to be a 0 and a negative 2. Well, you see now, all of these numbers are even. So I can now multiply by 1 half. And I'll still have integers. So this will be, let's see, I'm going to take 1 half of rho 2. So that's going to be 1, 1, 1, 0. 0, 1, 0, negative 1. And the bottom row is 0, negative 4, negative 3, 7. OK. Next, I've got a 1 there. I need to get a 0 right below it. So I'll add 4 times rho 2 to rho 3. Let's do that back over here. Rho 3 plus 4 times rho 2. The top row hasn't changed. The second row hasn't changed, but the bottom row does. 0, 0, negative 3, and 3. Well, you know, now the only step left to do is to get a 1 in this position. So what I'll do is take negative 1 third of rho 3. And my matrix is 1, 1, 1, 0. 0, 1, 0, negative 1. And 0, 0, 1, negative 1. OK. This is the augmented matrix that I wanted to arrive at. And I'll now solve that to get the A, B, and C. Let's go back over to the green screen. And we'll finish this up. And we can substitute it into our fractions as well. OK. I'm going to write down that augmented matrix. I'll just copy it over here. It's 1, 1, 1, 0, 0, 1, 0, negative 1. And then 0, 0, 1, negative 1. OK. So I'm ready to step out and write down the new system of equations. That would be A plus B plus C is 0. And then there's B equals negative 1. And there's C equals negative 1. Well, we're in luck here because there's no back substitution to make into the second equation. I have B and C completely isolated. So I'll substitute them both in the first equation. A plus negative 1 plus negative 1 is 0. So A is 2. So what that tells me is the numerator of the first fraction should be 2. The numerator of the second fraction should be negative 1. And also the third fraction negative 1. So if you take 2 over x minus 1 minus 1 over x plus 1 minus 1 over x plus 2, that is a partial fraction decomposition of the original fraction given back here. Now, this is a technique that's important if you take calculus. I know not all of you are going to take calculus. But on the other hand, the process of reducing matrices using Gaussian elimination is important to students who are going to major in business, in computer science in particular, and in other related areas in the sciences. Knowing about a matrix reduction is important there. OK, let's go to another example. And in this example, I want to illustrate that a system doesn't have to be square. I've done 2 by 2s and 3 by 3s. Here's a system that's a 2 by 4. And I want to show you how to solve this. And I think we can do this one on the green board. One of the things to point out, though, is that when you have a system that has more unknowns than you have equations. So we have 4 unknowns and only 2 equations. What that means is this system cannot have a unique solution like x equals 2, y equals 3, z equals 0, w equals 4. It's going to have either no solution or it's going to have infinitely many solutions. And let me show you how that will play out in this problem. Now the system of equations says x plus y minus 4z minus w equals 5. And the next equation says x minus y plus 2z plus w equals 1. Now when I write my augmented matrix, it's going to look a little different from the others. It's going to be 1, 1, negative 4, negative 1, 5. I better put that dotted line in there. It's getting so long. And the other equation is 1, negative 1, 2. That's a z there. Plus, well 1, don't need to put a plus on it. And a 1. OK, now the strategy is still the same. In the first column, I get a 1 at the top, which I have. And I get a 0 below it. And then in the next column, I get a 1 in the 2, 2 position. And I don't really care what's above it. And that's where the problem ends. These other columns I'll not be able to complete because they don't come further down. My main diagonal does not extend. So this will be a relatively short problem. Let's begin by putting a 0 in the 2, 1 position, second row, first column. So I'm going to take row 2 and add on negative 1 times row 1. And here's the matrix we get. 1, 1, negative 4, negative 1, that's a 5. And here I get a 0. And I get a negative 2. And I get a 6. And I get a 2. And I get a negative 4. I want to get a 1 right here. Well, all these numbers are even. So multiplying by negative 1 half is no problem at all. Let's do that on the next line. So this says, if I take negative 1 half of row 2, this will look like, on the second row, 0, 1, negative 3, negative 1, 2. OK, but what does this mean? Well, if I step out and write my new system of equations, I have x plus y minus 4z minus w is 5. It turns out that equation never changed. That's exactly the original equation I had up here. The other equation says y minus 3z minus w equals 2. That's a 2 there. OK, what can we make of this? Well, let me just show you. I'm going to erase the rest of the screen here. And let me put that new system of equations over here. x plus y minus 4z minus w equals 5. And then y minus 3z minus w equals 2. OK, so how are we supposed to interpret this? Well, here's what we do. In the second equation, you solve for y. y is equal to 3z plus w plus 2. Yeah, I've got to add 3z to both sides. I've got to add w to both sides. I'm going to back substitute into the other equation. And that says x plus y, and I'll put this in for y, 3z plus w plus 2. And then if I complete that equation, minus 4z minus w equals 5. Now, if I collect terms, this says x minus z. The w is canceled out, plus 2 equals 5. OK, in this equation, I'm going to solve for x. x is equal to z plus 3. OK, so I got this equation, and I got this equation. And somehow out of this, I'm supposed to establish an answer. Well, my answer is as follows. x equals y equals z equals w equals. Those are the four variables in the problem. What does x equal? Well, x is equal to this. Let's see, z plus 3. What does y equal? y is equal to this. 3z plus w plus 2. What does z equal? Well, for lack of a better name, I'll say z equals z. And I'll say w equals w. So how do we interpret all that? Well, you notice on the right-hand side, I have only z's and w's. Those are called parameters in this answer. z and w are called parameters. And what this says is you can pick any value you want for z and for w, and plug them in here, and calculate the corresponding x, y, z, and w. And you will always get answers to that problem. For example, suppose we let z equals 0, and suppose we let w equals 0. What would be the corresponding x, y, z, and w? Well, if z is 0, what is x? 3. 3. And if z and w are both 0, what is y? 2. 2. And then we said z would be 0 and w would be 0. This is a solution to the problem. But it's only one of many. You could pick other answers this way. Suppose we decided to let z be 1 and let w be 2. What would be the corresponding x, y, z, and w? Well, if z is 1, x would be 4. And if z is 1 and w is 2, I think that turns out to be y equals 7. And then we said z would be 1, y would be 2. This is another solution for the problem. So you see, we could keep doing this indefinitely. We could just keep picking new z's and new w's and just coming up with new answers. So how are we going to record this answer, say if you were to look in the back of the book? The answer would be recorded this way. I'll put in an x, a y, a z, and a w as an ordered four-coordinate point. I'd put z plus 3. I'd put 3z plus w plus 2. I'd put z and I'd put w. And that tells me this is the x, this is the y, this is the z, this is the w. And there's no way I can list all the solutions, except to give them in this form. Now, when you have more equations, when you have fewer equations than unknowns, then you're going to come up with a system of equations that looks like this. I'll be doing another one of these in the next episode. So this is just by way of introduction. How would I know if there's no solution for the system? Well, let me just back up and show you what would happen if there were no solution. Suppose you're in the middle of reducing a matrix and you have, let's say, a 1 here. I'll just fill in some other numbers, 2, negative 5, 3. And you have 0s below this. Suppose in the next equation, you have a 1. And then you have a 4. And over here, you have a negative 2. And suppose in the last, oh, you get a 0 below that. Now, our goal would then be to get a 1 in this position. But suppose you get a 0 there. And over here, you get, let's say, 6. Well, I don't see any way I can get a 1 there. I can't bring in multiples of other rows here, because I'll lose my 0s. In fact, what does this equation say right here? 0 equals 6. It says 0 equals 6, which, of course, is a contradiction. So if your matrix reduces to something that has a contradiction, then you can stop right there and just say, there's no solution. Those are the shortest problems of all if you see a contradiction. But you know, another possibility is what if there is a 0 here as well as over there? In this case, the equation says 0 equals 0. And that's certainly true. That's not a contradiction. What that means is you can eliminate that row, because there's no new information in it. And you go up here and you solve these two equations. Now, because I wasn't able to get a 1 in the next position, that tells me this is going to have infinitely many solutions. I'll have to use a parameter in my final answer and get x and y in terms of z. OK, well, we're sort of in the middle now of a big question about how to solve the system of equations using matrices. We've looked at a method today called Gaussian Elimination. Gaussian Elimination produces 1s along the main diagonal and 0s below it. And then you use back substitution to solve for all the other variables that you don't get immediately at the bottom. But this can sometimes lead to problems with infinitely many solutions. And we'll look at some more of these sort of cases next time. And you can occasionally get a problem with no solution. And so when we meet in the next episode, we'll talk about an alternative to Gaussian Elimination that takes a little bit longer, but it doesn't require the back substitution. So in one sense, it's longer. In one sense, it's shorter. And that's called Gauss-Jordan Elimination. And we'll look at all of these cases again and see what happens in those situations. So I'll see you for the next episode.