 Welcome back to our lecture series linear algebra done openly. As usual, I'll be your professor today, Dr. Angel Misseldine. We've seen in the previous section, particularly at the end of section 1.5, that solving systems of linear equations when the augmented matrix is an echelon form is very nice, very simple. In fact, it's even better when you're in a reduced echelon form. And the reason what's so simple is the following. If your matrix is an echelon form, as you can see in the example below, right? So let's just double check. Notice that the pivots of this matrix would be in the 1, 1 position, the 2, 2 position, the 3, 3 position that you see right here. To be an echelon form, if there's any rows of zeros in the coefficient matrix, they have to be at the bottom. This doesn't have any rows zero, so that step's ignored. The pivots have to make a downward staircase, which we see happening right here. And then lastly, everything below a pivot needs to be zero. So this matrix is in fact an echelon form. When we translate that echelon form back to the system of equation, you'll notice the very last equation, because we were at echelon form, only involves one of the variables. It only involves z. And so what we can then do is we could divide both sides by 15. And then very quickly solve for z, we would see that z in this situation is none other than 75 divided by 15, which is 5. So we were able to solve for the first variable using the last equation. Now the equation above it only depends on two variables, y and z. If we were to plug in the value for z that we know to be 5, we can make that substitution and we'll see that negative y plus 8 times 5 equals 46. Well 8 times 5 is 40, like so, so we'll subtract 40 from both sides, we get negative y equals 6, and therefore y equals negative 6. We were able to substitute the value we found for z back into the equation above it, and then we found the unknown we didn't know. Right? And now when we look at the next step, we know what z is, we know what y is, we can plug this in for z, we can plug this in for y. And now the only unknown left is x, and we can solve for it much like we did a moment ago. Doing that we would get 2x minus y, well y is a negative 6. We know z is 5, 3 times 5, this equals 25. Simplifying this thing, we get 2x plus 6 plus 15 equals 25, 25 excuse me. We'll subtract 15 from both sides, so we get 2x plus 6 equals 10. Subtract 6 from both sides, you get 2x equals 4, and then divide by 2, you'll see that x equals 2. And so then we were able to solve for the other unknown using the other two that we do know. And so in conclusion, we can see that the solution to the system of equations will be 2 comma negative 6 comma 5. And so this technique that we see right here is commonly referred to as back substitution. What you do is once you find the first unknown, you substitute back into the equation with only two unknowns, then you solve for the second unknown. When you have those two unknowns, you substitute those back into the equation that has only three unknowns. You solve for the third. If there's a fourth unknown, you'll take the three you know, plug it into the equation and solve for the fourth. And you do this for the fifth, the sixth, the seventh, the eighth. We have a technique of solving the system of equations as long as the associated matrix is in echelon form. I mentioned that it's even better when you are in robust echelon form. Notice this matrix, the pivots would be the 1, 1, 2, 2, and 3, 3 position. It's an echelon form because we see a downward staircase of pivots again, zeros below the pivots. It's also in row reduced echelon form because the pivots are each 1 and there's only zeros above the pivots. It's really nice. If you translate this row reduced echelon form into a system of equations, you see that x equals 3, y equals negative 5, and z equals 3. And voila, the system of equations is already solved. I mean, there's nothing else to do. We know x equals 3, we know y equals negative 5, and we know z also equals 3. So the solution is 3 negative 5, 3. Putting a matrix in row reduced echelon form is essentially solving the system of equations. So when we're in echelon form or even better yet, REF, we can solve the equations. It's really nice. Echelon form is going to be our goal here. Let's take a look at two more examples. Let's say we have an augmented matrix that looks like the following. You'll see that this matrix is likewise in echelon form. In fact, this is going to be a row reduced echelon form. The pivots notice you'll have a 1 and the 1, 1 position and the 2, 2 position. You'll notice there's no pivot in the third row because this row is a row of zeros. And it's at the bottom of the coefficient matrix, as is to be expected. When you look at the third column, there's no pivot in that column. And that's okay. It's a non-pivot column, just like the row of zeros is a non-pivot row. This matrix only has two pivots inside of it. And so in terms of our terminology, we would say this is a ranked two matrix, as opposed to the previous two examples, which were both ranked three. They had three pivots. This one only has two pivots, right? So rank two. The rank, of course, counting the number of pivots in the matrix there. So when you turn it back into a system of equations, you get something like the following. You'll notice that the last equation is zero equals zero. That is just an identity. I mean, that's something that's true for any assignment of the variables. It adds no restriction to the solution set. So if we were just to throw it away, it would make no difference. It has no bearing on the solution set whatsoever. It's like saying, okay, x has to, you know, when you subtract x from three times y, you get two. When you take, you know, this and you add to that, that's great. And then, oh yeah, and then just solve the system equations. You're, you know, this guy has to be blue. You know, it has no bearing on the system here, right? This thing is just always going to be true. So let's ignore it. Now, with this situation, you'll notice that we can't exactly solve for x3, because unlike the previous examples, there's no equation that looks like x3 equals whatever. But the other two equations, you'll still notice that, well, x1 depends only on x3, and x2 only depends on x3. We can't solve for them. So when you solve the first equation, x1, it'll look like x1 equals 2 plus 3x3. And then if you solve the second equation, x2, solve for x2, that is, then you'll get x2 equals 7 minus 3x3. And so x1 and x2, we can determine what they are dependent upon what x3 turns out to be. So these are our dependent variables. On the other hand, there's no restriction placed on x3 whatsoever. No one told us that x3 has to be 7 or 5 or 36 and a half. There's nothing that obstructs our choice of x3. So in fact, x3 would then be any real number. This is, yeah, it'd be any real number here. And so this is an example of a free variable. We can choose x3 to be whatever we want it to be. And so let's say specifically, like, okay, like x3, if we give it some arbitrary real number, we'll call it t. Then the other solutions, the other parts of the solution determined by this, if x3 is assigned the number t, then x1 will just be 2 plus 3t. And x2 will be 7 minus 3t. And then, like I said, x3 is just t itself. And so the solution, there's actually multiple solutions here, right? We have multiple solutions, but each of them can be described based upon the choice we placed on x3. So if you have a specific choice of x3, then we'll have a specific solution. But if we allow x3 to vary, then we'll get multiple solutions to the system of equations. We see this from the echelon form of the matrix. You'll see that you have multiple solutions when you don't have a pivot in every single column, like we saw in this type of situation here, assuming the system's consistent, right? If it's inconsistent, then you have no solutions because it doesn't have any. But if you have a consistent system and you end up with, you end up with pivots missing, then it turns out that you'll have multiple solutions. Speaking of inconsistent, let's take a look at one more example here. Here's yet another matrix. This matrix is also an echelon form. It's not a row reduced echelon form. You'll notice that although we have our downward staircase of pivots, zeros below, and we do have in fact a row of zeros, which is at the bottom, so it's an echelon form, it's not a row reduced echelon form because this pivot here is not a one, it ought to be. There is a zero above it, so that's great. Now it wouldn't be too hard to put it into row reduced echelon form, really, because if we just did the row operation, we just could just scale row two by one-half. Notice if you did that, you end up with one zero negative one slash one. We get zero, one, two, and two, and we end up with zero, zero, zero, eight. This right here would be the row reduced echelon form of the matrix. It would, and you see your pivots right here. But the reason I didn't list this one in REF is because you actually don't need it. In order to detect whether the system will have multiple solutions, whether it's a unique solution or whether it's inconsistent, you can get all of this information from any echelon form. Notice this very last equation right here, this last row, zero, zero, zero, eight. If we translate this augmented matrix back into a system of equations, we get x1 minus x3 equals 1, 2x2 plus 4x3 equals 4, and of course, the critical thing here to mention is this last equation, zero equals eight. This here would be a contradiction, that contradiction here. They're, as real numbers, zero and eight are different, and so there's no choice of x1, x2, x3 that can force zero to become eight. We get contradictions, so that tells us that we're going to have no solution. And in fact, the solution sets would be empty, right? So this is our inconsistent case. We get the inconsistent case when we investigate something like this. And I kind of want to summarize what we see right here. A linear system is going to be inconsistent. It'll have no solution. If and only if it contains a row of the following form, zero, zero, zero, zero, zero, zero, zero, zero. You have a row of zeros in the coefficient matrix, and then you have something non-zero in that augmented column. If the linear system's inconsistent, then every echelon form will have a row that looks something like this, all right? You have to, if you don't have a contradiction in your echelon matrix, then the system of equations is consistent. It'll have a solution, but does it have a unique solution, or does it have multiple solutions? Well, your solution will be unique if you have no free variables. Like we saw in the previous examples here, right? We had this free variable, which gave us multiple solutions. Now how do you detect a free variable? Free variables come from non-pivot columns. So you have this non-pivot column. That's what's going to give you a free variable. That translates to give you these free variables. And so those are the things you're going to be looking for. As you're solving system of equations, and you get them into echelon form, look for a row of zeros, and then check, is there a contradiction? If you get a contradiction inconsistent, you're done with the calculation there. If it is consistent, then move on. Do we have a pivot in every column, or are there some columns without pivots? If you have a non-pivot column, then you'll get a free variable, and you'll get a free variable for every non-pivot column there is. So when a matrix is in echelon form, row reduced echelon form is even better, but when a matrix is in echelon form, with a little bit more arithmetic, we've essentially solved the system of equations. And we can determine whether it's inconsistent, consistent with a unique solution, or consistent with multiple solutions. The three cases that can happen when you solve a system of linear equations.