Notes, Lesson 6.1
Solving Systems of Linear Equations with Matrices Legal Matrix Operations Figure 1

In Figure 1 above, you can see a normal solution of a system of equations in black writing on the left. This system was solved by adding the two equations. This addition caused the variable y to drop, and a single variable equation resulted. This allowed us to solve for x. Once we knew x, we could easily find y.

At the right in Figure 1 above, in blue writing, you can see similar work being done on matrix rows. The matrix row 1,1,8 simply represents the equation: 1x + 1y = 8. So the matrix row is simply the coefficients from the equation. The matrix row 1,-1,4 represents the equation:
1x - 1y = 4.

Just as it is legal for us to add two equations on the left, it is legal for us to add to rows on the right. You can see this in the line labled a + b --> a, where you see the new row 2,0,12. This is just the sum of rows a and b. The next row labled a - b --> b shows the result of subtracting row b from row a, namely, 0,2,4.

The final section at the right shows that just as it is legal to multiply an equation by a number or divide an equation by a number, it is also legal to multiply or divide a matrix row by a number (scalar).

At the bottom left is a summary of the legal operations within matrices. You can legally do any of those three procedures. You can also do any combination of these three operations. Really, these legal operations are the same legal operations that you have previously learned to use in algebra.

Solving a System of Equations using Algebra Figure 2

In Figure 2 above, we take on the solution of a system first using the algebra techniques you should know from your algebra background. The system of three equations is shown at the top left. First, I remind you of the fact that if you are solving a system with 3 variables, you need 3 equations. If you are solving a system with 9 variables, you need 9 equations. In the general situation, If you are solving a system with n variables, you need n equations. So you see that for this system with 3 variables, we do have 3 equations.

In the process of solving such a system, we need to eliminate variables until we are down to an equation with 1 variable. So we need to find some ways to legally get rid of some variables.

You may notice that if you add equations a and b, you can get the variable y to drop. You can also get the y to drop if you add equations b and c.

Now we are down to 2 equations with 2 variables. Above, these are equations are labeled equations d and e. We still need to get rid of one more variable. We see that if we multiply equation d by 2, and add it to equation e, we can actually solve for one of our variables. We find that x = 1. It doesn't take too much longer to see from equation b that y must be equal to -2. And finally, substituting x = 1 and y = -2 into equation a, we can find that z must equal -1. We are not done until we check all three results in each of the three equations we began with.

The red arrow in Figure 2 points to a matrix form of the same three equations we began with. This 3 x 4 matrix has a square matrix at the left, and an extra column at the right. Because this matrix has been added onto, it is sometimes called an augmented matrix. Now we will work on solving this same system by just using the matrix. Figure 3

Figure 3 above shows us two important items for our matrix solution procedure. At the top of Figure 3 you see the "desired goal." This is the form that we want our matrix to be modeled after. Notice that we want the left part of the matrix to become an identity matrix. There will also be an additional column with three quantities in them. These quantities a, b, and c, with be the solutions to the system. The top row reads: "1x + 0y + 0z = a", which in effect says: "x = a." The second line in effect says: "y = b." The third line in effect says: "z = c." And so, a matrix in this form is completely solved.

The second part of Figure 3 above is the recommended strategic order for getting the left-hand part of the matrix transformed in an identity matrix. The reason for giving you this recommended strategic order, is to minimize or eliminate at wasted effort. As we work through a problem below, you will eventually see that this order will help eliminate any wasted work. Figure 4

In Figure 4 above, we see that the 1 in the second row is circled. This is because our strategic order plan has us first transforming this first cell in the second row. What is it that we want this first cell in the second row to become? A quick look at Figure 3 should tell us that we want this to be a zero. How can we get this to become a zero? Well, we must of course follow only the legal operations that were in Figure 1. One plan that will achieve this is to multiply row b by -2 and add the result to row a. Then we will put the result into row b. This is sybolized above with the -2b + a --> b notation. Of course, we must carry out this operation for each and every number in row b. (all 4 of them) In the second matrix you can see the result after carrying out this operation. Figure 5

The next number that we need to change is the bottom left element, which circled in Figure 5 above. We again need this number to be transformed into a zero. We can see that the row b does no good. Zero plus anything doesn't change anything. So now we know that we have to use row a. We could take 3 times row a, and -2 times row c. Adding these two together will give a zero in the first position. Figure 5 shows what happens if you carry out this plan on the entire row. Figure 6

The next number that we need to change is the second element in row c. We need this element to be a zero. It is very important at this stage of the problem to remember that while we want to change the second element in row c, we need to protect the zero that we previously changed to zero. In order to protect the zero in the first position, we need to operate with a row that also has a zero in the first position. This tells us that we need to do an operation that involves row b. Our plan is to multiply -3 by row c, add to b, and put in c. Do this operation and see if you get the same bottom row as shown in Figure 6 above. Figure 7

The next number that we need to change is the second element in row b. This is the first element that we want to transform into a 1. You will like these transformations. To transform an element to 1, requires only a single row operation. All you need to do is divide each element of row b by -3. The results will go right back in row b. See the results in Figure 7 above. Figure 8

The next element that needs to be transformed is the third element in row c. It needs to be transformed into a 1. Transformations of an element into a one are the easiest of all. Again, all we need do is to multiply each element in row c by -1/20. Figure 9

Our next transformation is the third element in row b. This element needs to be a zero. A concern here is to "protect" the first two elements of this row, which we have worked hard to get in their present form. The two beginning zeros in row c are the perfect protection for these two elements. Therefore, we want to do a b,c operation. Our plan is to multiply row c by 1/3, and add the result to b.  Figure 10

Two rows done! Notice that now rows b and c are completely done. We now are working on transforming the third element in row a to a zero. There is nothing in row a which needs protection. We will simply subtract row a minus row c, and put the result back in row a. Figure 11

Now we need to transform the second element in row a into a zero. We do have one element to protect in row a, so we notice that row b is perfect protection because it has a zero in the third position. Here we can just add row a to row b, and put back in row a. Figure 12

One final element to transform. Because this element needs to be a one, we can just divide row a by 2. We're done! Now, because the matrix has the identity matrix at the left, our answers are sitting in the third column. System solved.

Special Situations

Some systems of equations have no solution. If you picture the system of equations above as a system of three lines in three-dimensional space. then you can well imagine that 3 such lines do not have to cross in 1 common point. In fact, it would be quite rare that they do cross in one common point.

When solving matrices, we struggle to make the left part of the matrix into an identity matrix. If a matrix does not have a solution, then you will see matrices which end up looking like this: Notice that the bottom row in effect tells us that 0*X + 0*Y + 0*Z = 1, which is impossible. This is our cue that this is an impossible matrix to find a single solution from.

Another type of matrix can result from our efforts to achieve an identity matrix on the left side of the matrix. Below is this type: Here we have the unique bottom row of all zeros. The algebraic equation that this represents, namely, 0*X + 0*Y + 0*Z = 0 is true. It is true, but it certainly doesn’t tell us anything about the system of equations. This system has infinitely many solutions.

You need to be able to recognize these two special types of matrix results, and what they mean.