Transcript for:
Linear Systems: No and Infinite Solutions

Hey folks, my name is Nathan Johnston and welcome to lecture 21 of Introductory Linear Algebra. Today we're going to finally address an issue that we've been sort of sweeping under the rug for a little while, and that is how do you solve a linear system that has either no solution or infinitely many solutions? Okay, the examples that we've looked at up until now, they all had unique solutions. So how do we handle the other cases? Well, let's start off with an example to see how you handle the no solutions case.

Okay, so suppose you had this linear system here. What we're going to do is we're going to start off the exact same way that we would solve any other linear system. Just throw it into an augmented matrix and then do row operations to try to bring it to row echelon form.

So what I'm going to do is I'm going to say, oh, I don't like these non-zero entries down here below this leading entry, so I'm going to do row operations that turn them into zeros. And while the obvious row operations that do that are row two minus double row one, and row three minus row one. That'll give me zeros there and there. Okay, and I can see it gave me a couple other zeros, but those are just coincidences. I wasn't aiming for those, they just happened.

Okay, because I get 4 minus double 2, so that's 0, and then the other entries as well. You have to compute all of these rows, so 1, and then careful if you double negative, it's going to be 1 plus 4 is 5, and 0 plus 8, again careful of your double negative, that's going to be 8. Okay, and then here you're going to get 0, that's why we're doing row 3 minus row 1. Here you're going to get 2 minus 2, that's also a 0, but that's a coincidental 0. Here you're going to get 7 plus 2, careful of your double negative, so that's 9, and 2 plus 4 is 6. Okay so now my leading entries are here and here, okay, and I don't like that there's a zero or a non-zero entry down here because here's another leading entry right below a leading entry. So I've got a zero out this entry here, so I'm going to do the natural row operation that does that. I'm going to do some multiple of row 2 plus row 3, okay.

And when I do that, I mean when I work out what multiple it's got to be, I'm going to do row 3 minus 9 fifths row 2. So I'm going to scroll back up just a little bit to show you why that is. Right, I've got 9 here. I want to turn this 5 into a 9 so that when I subtract it I get a 0. So if I multiply 5 by 9 fifths, then I'm going to get 9 up here.

I'll get 9 minus 9 is 0 in this entry. Okay, so that's why I'm doing that weird scalar here, because I want a 0 down here. All right, and then unfortunately I've got to compute the new bottom right entry.

And that's going to be 6 minus 9 fifths times 8. And when you work out that ugly mess, it's going to be minus 42 over 5. Now, if you stare at this augmented matrix a little bit, you're going to notice that there's something a little weird. Remember, your augmented matrices, they correspond to linear systems. Your columns correspond to variables. Your rows correspond to equations. And this bottom equation here, this is saying 0 times x plus 0 times y plus 0 times z.

equals minus 42 over 5, right? That bottom row means 0x plus 0y plus 0z equals minus 2 over 45, and that makes no sense, right? The question is, you know, what do x, y, and z have to be to make this true, okay? And there's no value of x, y, and z that make that true.

No matter what you choose for x, y, and z, this left-hand side is always going to be 0, not minus 42 over 5, okay? So for this linear system, we conclude, based on this, that there's no solution, okay? And the remarkable thing is that if your linear system has no solution, this is always going to happen. When you row reduce to try to get into row echelon form, you can always, always, always get it to the form where there's a row of zeros except a non-zero right-hand side. Okay.

And that is your signal that tells you, ah, this linear system has no solution because I can't get zero equal to a non-zero thing. All right. So that's how you handle the no solution case. All right, well, let's think a little bit now about how to solve the infinitely many solutions case, okay?

And this is trickier, okay? Because when you have infinitely many solutions, it's not just difficult to find them, but how do you even describe them, right? If there are infinitely many solutions, you can't just list them out, okay? So you've got to describe them somehow.

How do you tell someone, hey, these infinitely many different vectors are all solutions, but nothing else is? All right, well, let's go through an example to see how to do this, and we're going to focus first on... the describing part and then we'll focus on the actual solving part in our next example. So for now how do you describe all the solutions?

All right so let's look at this linear system here. How would you describe the solutions of this linear system? And the thing to notice here is when you throw it into an augmented matrix it's actually already in reduced row echelon form, right? Here I've got a leading entry, oh it's a one, everywhere else is a zero in that column.

Here's my next leading entry, oh everywhere else is a zero and it's a one. Here's my next leading entry. It's a 1 and everywhere else in that column is a 0. This is in reduced row echelon form and I claimed in the previous video that when you have a reduced row echelon form you can just read off the solution.

You don't need to do any more work and that's true but how do you do it when there are infinitely many solutions? How do you read off what those infinitely many solutions are? Okay, well what you do is you focus on these leading entries here and remember again every column corresponds to a variable in the original linear system. Okay, so there's a leading entry in this v column, there's a leading entry in the x column, and there's a leading entry in the y column. Okay, and then the point is you can rearrange all of those sort of what we're going to call leading variables, right, variables corresponding to leading entries, so v, x, and y in this case.

We're going to rearrange the equations so that we solve for those variables in terms of the other variables. So let's see how we do it. And what we're going to do is we're going to introduce a little bit of terminology.

So these variables corresponding to columns with leading entries, we're going to call those leading variables. So in this example v, x, and y, those are our leading variables. And we're going to call everything else a free variable.

So w and z in this example, there are no leading entries in those columns, so we're going to call those free variables. And the reason we're calling them free is we're thinking of them as completely unrestricted. We can't solve for them.

Okay that's what makes there be infinitely many solutions is we have some variables that we can't solve for. All right but we are going to solve for the leading variables and in particular we're going to solve for them in terms of the free variables. So everything in our solution is going to be in terms of w and z and then there's going to be no restrictions on w and z. All right so again remember that each of these equations, sorry each of these rows in this augmented matrix corresponds to an equation. And what this says is v minus 2w plus 2z equals 3. And if we just move everything except for v over to the right-hand side, what we get is we get v equals 3 plus 2w minus 2z.

And then we do the same thing with all of the other leading variables as well. The second equation, this tells me x minus 3z equals 7. I just move everything except for the leaving variable over to the right hand side and I'm going to get x equals 7 plus 3z and that's why I've written down down here x equals 7 plus 3z and then I do the same thing with the last leaving variable. Okay this bottom equation here this tells me y plus z equals 4. If I move that over to the other side I get y equals 4 minus z and that's why I've written down down here y equals 4 minus z. Okay, so that's great.

I've written each of the leading variables v, x, and y in terms of the free variables. So there's only w's and z's in those entries. But I still have to figure out the other two entries. w and z entries, I just say they're equal to themselves, right? w equals w, certainly that's true, and z equals z, certainly that's true.

All right, so what I get here is I learned that every single solution of this linear system looks like this for some choice of w and z. Okay, and w, z are free. They can be anything.

No matter what value of w and z I pick, this will be a solution. So you can start picking specific values if you want. Pick w and z both equal to zero, you'll get some solution of the linear system. Pick w to be seven and z to be minus three, you'll get another solution of that linear system. No matter what values you pick for them, you'll get some solution.

And in fact, you can get every solution in this way. Every solution is described by a vector of that form. All right, well let's do an example now that actually requires some calculation to actually find the reduced row echelon first, and then again we'll do this method of sort of rearranging in terms of free and leading variables to describe the solutions.

All right, so let's solve this system of linear equations. Okay, so we don't know ahead of time how many solutions it has, if it has zero or one or infinitely many, so just do what we always do. Represent it in an augmented matrix and row reduce.

Okay, so here's the augmented matrix form of it. Okay, and start doing row operations to get these zeros down here below this leading entry. Okay, so I'm going to do row 2 minus double row 1 to get a 0 right here where this 2 is. And I'm going to do row 3 plus row 1 to get a 0 in this bottom left corner. Okay, and when I do that, this is the new matrix that I have.

And now my next leading entry is the 1 here. And hey, I want a 0 down there. Okay, and actually I'm going to do two things. I'm going to go all the way to reduced row echelon form. So I'm going to do sort of two steps in one.

I'm not only going to get a 0 below it, but because I'm going to reduce row echelon form, I know I also want a 0 above it as well. Okay, so I'm going to do row one plus row two to get a zero up here as well. And that's just because I'm going to go all the way to reduce row echelon form.

If I was just going to row echelon form, I would not need to do this row one plus row two. I wouldn't care about whether or not there's a zero up there. Okay, but now I look at this and I say, hey, great, that's in reduce row echelon form now, right?

I mean, all my zero rows are tucked away at the bottom. All my leading entries are ones and I've got zeros everywhere else in the columns that have those leading entries. So now...

I know how many solutions I have because hey I've got a leading variable w, I've got a leading variable y, but I've got two free variables as well. I've got x and I've got z. If you've got free variables and you don't have like the zero row equals non-zero thing business going on, you know right away you've got infinitely many solutions.

You're going to be able to describe the solution set in terms of these two variables x and z that can be anything, and because they can be anything you're going to get infinitely many solutions. Alright, so how do we do that description? Well, you just take each of these equations here and you rearrange them.

You solve leading variable equals junk in terms of free variables. Alright, so taking this top equation here, if we rearrange that, then what are we going to get? Well, we want to get our leading variable in terms of the free variables, and the leading variable in this equation is w. Okay, so I want to get w in terms of my free variables, x and z.

I just move them over to the other side, and I get 2 plus x minus z. Okay, so equation one was w minus x plus z equals two. Move things over to the other side and I get w equals two plus x minus z.

Okay, and that's leading variable in terms of free variables. That's what I want. All right, next up, do the second equation. Okay, so equation two right now, it says y minus z equals one.

Just rearrange that. Get y in terms of the free variables. Get y in terms of z.

All right, so y equals one plus z. Okay, and then once you've done that, you're done. Okay, that's your description of the solution set. So the vector w, x, y, z, it's got to be, well, what is w?

Ah, w is 2 plus x minus z. What is x? Well, x is free. It's just itself.

Then what is y? y is 1 plus z. And then what is z?

Well, z is free. It's just itself. Okay, so every single solution vector, it looks like that for some choice of x and z. Okay, and you can choose x and z to be whatever you want, and you'll get some solution of that linear system. Okay, so it has infinitely many solutions and maybe even a little bit more particularly Not only does it have infinitely many solutions, but because there are two free variables here That's sort of saying that there are sort of two dimensions of solutions, right?

Like you've sort of got a solution in the X direction and in the Z direction Like you've got sort of a whole line of solutions going this way and a whole line of solutions going that way But then sort of things in between as well. So what happens is the number of free variables It corresponds to the dimensionality of the solution set Okay, here the fact that you've got two free variables, that's telling you that the solution set, it's two-dimensional. In other words, it's a plane, right? It's a two-dimensional set living in four-dimensional space, right? I mean, it's living in four-dimensional space, and you have these four variables here, but then the solutions of the linear system are just ones lying on a certain plane in that four-dimensional space.

Alrighty, so that'll do it for today, and actually that wraps up week five, okay? So now you know how to solve linear systems of equations.