Today’s post builds on Systems of Linear Equations, Part 1: Algebraically Solving Two Equations in Two Variables.
As it turns out, any of the systems of linear equations that we solved in Part 1 could have been solved using matrices! When you set up a matrix to represent your systems of equations and perform matrix operations to solve that system, you are taking advantage of the simplicity of matrices to perform the method of elimination!
Remember how important it was in Part 1 to set up your equations in an orderly way to perform the method of elimination algebraically? That is even more essential when using matrices, because our variables disappear once we create our matrix!
Let’s take a look at Example 1 from Part 1 again:
My equations are already lined up perfectly in order to use matrices: x‘s above x‘s, y‘s above y‘s, and constants above constants. I will translate my equations into matrix form by placing their coefficients as entries in a matrix:
The first row corresponds to the coefficients in the first equation, and the second row corresponds to the coefficients in the second equation. The first column corresponds to the x-coeffients, the second column corresponds to the y-coefficients, and the third column corresponds to the constants on the right hand side of each equation.
Remember that an equation can only be solved when it contains a single unknown. This means, I need to produce an equation that only contains x, and another equation that only contains y. We’re used to doing this in actual equations by rearranging them algebraically, as we did in Part 1. Now we need to translate this goal to matrices. To do this, we want to reduce my matrix into one that looks like this:
The square matrix (2-by-2) on the left side with the 1s and 0s is called the identity matrix, while the entire 2-by-3 matrix is called an augmented matrix. The first row only contains a meaningful coefficient on x and the remaining constant a, and the second row only contains a meaningful coefficient on y and another remaining constant b. If we converted these rows back to equations, they’d be equivalent to: In other words, they would give us the values of x and y!
Let’s work on reaching that goal with our example! We will use row operations to make this happen. Row operations include adding rows of a matrix and/or multiplying rows by constants. I notice that if I add the bottom row to the top row, I will gain a 0 in the y-column:
If I divide the top row by 2, I’m halfway to my goal!
Now, it’s a simple matter of subtracting the top row from the bottom row, and multiplying by -1 to get the entire matrix in the desired form:
Voila! I now know that x = 35 and y = 25. These are the exact solutions I found algebraically in Part 1!
Notice that in Part 1, we used both substitution and the method of elimination to solve the system of equations, and now we’ve used only the method of elimination via matrix operations. Any which way you solve a system of equations is fine, provided it makes sense to you and you can carry it out!
Let’s revisit Example 2 from Part 1:
Once again, the equations are already lined up perfectly in order to use matrices: x‘s above x‘s, y‘s above y‘s, and constants above constants. I will translate my equations into matrix form by placing their coefficients as entries in a matrix: This will take more work than last time, since the coefficients are not 1’s. Like last time, I will multiply the top row by 2 and add it to the second row: Great, we have a 0 where we want it in the first row! But, this is still a lot more complicated than the identity matrix we want to see. Luckily, the first row is simplified easily enough by multiplying it by 1/12:
Now the top row looks perfect, and we can use it to simplify the second row! I will multiply the first row by -2 and add it to the second row: Almost there! Now let’s multiply the second row by 1/8, and we’ll be done! This looks perfect! I see the identity matrix on the left, and my answers for x and y on the right! So, x=3 and y=1. These are the same answers I found in Part 1!
Now that we’ve seen some examples, I challenge you to use matrices to solve the five practice problems from the end of Part 1! You already know the answers to these problems, so you can check your work easily!