In the previous quiz, we started looking at an algorithm for solving systems of linear equations, called Gaussian elimination. In this quiz, we’ll take a deeper look at this algorithm, why it works, and how we can speed it up.
To save ourselves some effort, let’s introduce some new notation. Instead of having to write (or whatever the variables are) multiple times, we can simplify things using matrix notation:
Here, the first block is the coefficients of the equations, one equation per row. The second block is the variables, one per row and listed in the same order as the coefficients. Finally, the last block is the RHS (short for righthand side) of each equation, one per row. This lets us represent the whole system in just one equation!
Which column of values makes the above matrix equation true?
Note: All options contain the same numbers, but the order in which those numbers are listed is different and important!
As with systems, some matrix equations are equivalent, which is important because some matrix equations are easier to solve than others. As a result, we can often transform a difficult matrix system into one that is much easier to solve. Over the next three problems, we’ll see the three fundamental ways to do this, using elementary matrix operations.
The first type of equivalence is fairly simple: since each row of a matrix system represents an equation, nothing changes if we swap the rows around.
Which of the following represents the same system as this matrix equation:
A.
B.
C.
D.
Just as we can multiply both sides of an equation by the same amount, we can multiply any of the rows of the matrices by constants (as long as we do it to both sides).
Which of the following represents the same system as this matrix equation:
A.
B.
C.
D.
Finally, just as we can add two equations together, we can add one row of a matrix to another. As always, we have to be careful to add the corresponding RHS!
Which of the following represents the same system as this matrix equation:
A.
B.
C.
D.
Now we can finally restate Gaussian elimination in matrix form. First let’s simplify the notation even further, dropping the variables completely: where the last column represents the RHS of each equation. Now we follow this algorithm:
- Determine what's called a “pivot,” i.e. the top leftmost nonzero number that isn’t in a row/column already used. (If necessary, scale this whole row to make the pivot entry 1). Here we have the pivots in blue.
- For each row below the pivot row multiply the pivot row by the leading entry and subtract:
Each row below the pivot row will be left with zeros in that column.
- Repeat until there are no more pivots. At this point, the matrix will have all 0s in the lower left triangle.
Now we need pivot in :
Now let’s look at that last row--the equation it represents is . Then we can find and directly.
The “simple” matrices we saw in the last pane have a special name: row-echelon form. They are defined as matrices with the following two properties:
For example, Is in row-echelon form. As we saw, these are important because they are easy to solve, and Gaussian elimination is useful because it produces precisely these matrices.
Which of the following is a row-echelon form of this matrix:
A.
B.
C.
D.
We’ve now seen how Gaussian elimination provides solutions to matrix equations of the form where is the matrix of coefficients, is the matrix of variables, and is the matrix of the right hand side (RHS).
As we know, not all systems have solutions. Is there a matrix for that guarantees there is a solution for , regardless of what is?
In the previous problem, we saw that always has at least one solution, namely . But in some cases, there might be more solutions as well. For instance, if then is a solution as well (try it!).
We'll use this example to see something very important about general solutions of linear systems. First, let's consider a system similar to the one above:
Which of the following is also a solution?
In this chapter, we saw how Gaussian elimination translates naturally to the language of matrices, which provides a natural starting point into their exploration. Indeed, linear algebra is all about solving the equation !
We also saw the special importance of the case where , which naturally leads into the topic of vector spaces--as we will see in the next chapter!