We saw that substitution is one way of solving systems of linear equations, but the method of substituion is not very practical when there are more than 2 or 3 varibables. In this section, we start learning a more generalizable and easy-to-automate way of solving systems of linear equations.
SubsectionPrepare
Remark1.2.1.
Mathematicians often see solutions to given problems and ask “What if \(\ldots\text{?}\)” What are the right kinds of “what if” questions to ask? It’s impossible to know at first, and so mathematicians very often ask wrong questions. That is, they often ask questions and find that the answer isn’t particularly interesting. However, asking enough questions often will result in some good right questions. The answers to “right” questions help us see a bigger picture more clearly and usually lead to something applicable beyond the initial problem. The moral of the story is: don’t be afraid of doing something wrong because mathematicians do it all the time!
Recall that in the previous section, we worked through a few examples of solving linear equations using substitution; that is, we solved for one variable in one equation and substituted the resulting expression into another equation. What is a good question to ask after seeing Example 1.1.8? Here are two possibilities (though not the only two):
Did we really have to call the red balls “\(r\)”? Could we call them “\(q\)”?
What if we had \(60\) balls at the start instead of \(30\text{?}\)
Let’s look at the first question. Would the solution to our problem change if we called the red balls \(q\text{?}\) No, we picked the letter “r” because it made us think of “red”, but we could have picked \(x\text{,}\)\(y\text{,}\) or any other letter instead. The process of solving would have been exactly the same if we used “q” for the number of red balls, and at the end we’d find that \(q = 10\text{,}\) and we would know that this meant that we had \(10\) red balls.
Now let’s look at the second question. Suppose we had \(60\) balls, but the other relationships stayed the same. How would the situation and solution change? Let’s compare the original equations to the new equations.
Original
New
\(r+b+g=30\)
\(r+b+g=60\)
\(r=2g\)
\(r=2g\)
\(b=r+g\)
\(b=r+g\)
The process of solving would stay exactly the same, substituting \(2g\) for \(r\) in the third equation to get that \(b=2g+g=3g\text{,}\) and then substituting for both \(r\) and \(b\) in the first equation to get that \(2g+3g+g=60\text{.}\) The only difference is that total is \(6g=60\) instead of \(30\text{,}\) so the value of \(g\) is twice as much, and thus also the values of \(r\) and \(b\) are twice what they had been.
Two conclusions from answering these two questions are:
it doesn’t matter what we call our variables, and
while changing the constants in the equations changes the solution, they don’t really change the method of how we solve these equations.
In fact, it is a great discovery to realize that all that matters about a linear system are the constants and the coefficients of the equations. By systematically handling these, we can solve any set of linear equations in a way that saves on processing power, whether the processing is being done by a human or by a computer.
Activity1.2.2.Clickable Areas, Coefficients.
Identify (by clicking, or by circling) all of the coefficients in this linear equation.
The coefficients are the numbers that are multiplied by the variables.
Let’s return to Example 1.1.8. As we mentioned before, there isn’t just one right way of finding the solution to this system of equations. Here is another way to do it.
First, we rewrite the equations so that all variables are on the left of the equal sign and all constants are on the right. Also, for a bit more consistency, let’s list the variables in alphabetical order in each equation. Therefore we can write the equations as
A nice feature of this is that the only equation with a \(b\) in it is the first equation. One could say that we eliminated the \(b\) from the third equation.
Next let’s multiply the second equation by \(-\frac{1}{2}\text{.}\) This gives
We want to use the top equation to eliminate the variable \(g\) from the bottom equation. What step should we take?
Multiply the top equation by \(-1\) and add to the bottom equation.
This would make the bottom equation \(g+\frac{5}{2}r=30\text{,}\) which didn’t eliminate the \(g\text{.}\)
Multiply the top equation by \(2\) and subtract from the bottom equation.
This would eliminate the \(g\text{,}\) but to use this method systematically, we’re always going to want to multiply and add, not subtract. Subtracting \(2g\) is the same as adding \(-2g\) though!
Multiply the top equation by \(-2\) and add to the bottom equation.
This makes the bottom equation \(3r=30\text{,}\) which eliminates the \(g\) from the bottom equation.
Let’s now do both of those steps in a row to eliminate the \(g\) from the first and third equations; multiply the second equation by \(-1\) and add that to the first equation, replacing the first equation with that sum, and multiply the second equation by \(-2\) and add that to the third equation, replacing the third equation. Our new system of equations now becomes
Now let’s eliminate the \(r\)’s in the first and second equation. To remove the \(r\) in the first equation, let’s multiply the third equation by \(-\frac{3}{2}\) and add the result to the first equation, replacing the first equation with that sum. To remove the \(r\) in the second equation, we can multiply the third equation by \(\frac{1}{2}\) and add that to the second equation, replacing the second equation with that sum. This gives us:
We have arrived at the same result as when we solved this problem in Example 1.1.8, even though our steps were different.
Why did we need to learn another method (elimination) when our old method (substitution) worked and got the same answer?
Everyone thinks of a different way to solve a system using substitution — Mary might choose a different variable to solve for than John chose, and Alicia might start with a different equation, and Steven might substitute into a different equation. When there are more than 2 or 3 variables, substituting gets really laborious, and it’s not always clear what steps should come next in order to make progress in solving. Elimination can be made into an algorithm, a set of steps to follow in a particular order that will always result in an answer. 1
Even if sometimes the answer is that there is no solution, or that there are infinitely many solutions.
This is both comforting and practical; if you have to work a problem by hand, it’s nice to know you’ll be able to complete it as long as you remember the steps, and if you don’t have to work the problem by hand, an algorithm means it’s possible to program a computer to do the steps for you.
Activity1.2.5.Parsons Problem, Elimination vs Substitution.
Substitute the expression for \(y\) from the first equation into the second equation, yielding \(6x + 3\left(\frac{3+3x}{2}\right) = 8\text{,}\) which simplifies to
Multiply the second equation by \(-2\) and add the result to the first equation, resulting in \(-3x+0y=-1\text{,}\) and multiplying both sides by \(\frac{-1}{3}\) yields
Substitute the value of \(y\) from the second equation into the first equation, resulting in \(-3x+2\cdot 2 = 3\text{,}\) so \(-3x+4=3\text{,}\) which means that
We noticed earlier that there is nothing special about the letters \(b\text{,}\)\(g\) and \(r\text{;}\) we could have used \(x\text{,}\)\(y\) and \(z\text{,}\) or \(x_1\text{,}\)\(x_2\) and \(x_3\text{.}\) Our work demonstrating the method of elimination suggests that we don’t actually need to write the variable names at all, as long as we carefully line them up in the system of equations so that we can keep track of what’s being eliminated.
Let’s look again at our system of equations in (1.2.1) and write the coefficients and the constants in a rectangular array. If any variables are missing from any equations, we write that the coefficient is \(0\text{.}\)
Notice how even the equal signs are gone; we don’t need them, for we know that the last entry in each row is the constant of the corresponding equation.
We call this array we have just created a matrix.
Definition1.2.6.Matrix.
A matrix is a rectangular array of numbers.
The horizontal lines of numbers form rows and the vertical lines of numbers form columns. A matrix with \(m\) rows and \(n\) columns is said to be an \(m\times n\) matrix (said out loud as “an \(m\) by \(n\) matrix”).
If a matrix corresponds to a linear system of equations such that the last column corresponds to the constants of the system, we call the matrix an augmented matrix.
We tend to use capital letters for matrices (the plural of matrix), such as \(A\text{,}\)\(B\text{,}\) and \(C\text{,}\) and we use lowercase letters with subscripts for the entries within a matrix. That is, \(a_{32}\) means “the number in the third row and second column” of matrix \(A\text{.}\)
All the entries of an \(m\times n\) matrix \(A\) would appear like this:
Since matrices contain all the important information from a linear system, we are working our way up to solving systems using only augmented matrices. Using matrices saves us from having to write out the variables over and over again, and matrices are also easy for a computer to understand and manipulate. Matrices are important objects in their own right, and in future sections, we will be able to compute with matrices even when we don’t think of them as corresponding to a system of linear equations.
Consider the method of substitution used in Section 1.1 and the method of elimination described in this section.
State at least one thing the two methods have in common.
State at least one thing that’s different between the two methods.
3.Reflection.
Enter a response to both of the following tasks:
Ask a question about the material, either about something you’re not sure you fully understand, or a “what if” question.
Give a percentage from 0 to 100 that reflects how confident you are with the material you just read about, and give one sentence as to why you feel that way. 0 means you didn’t actually do the reading and 100 means that everything makes sense so far and you think you are completely ready to engage with the material more deeply.
For the matrix \(B=\left[\begin{array}{cccc} 1\amp 1\amp -1\amp 2\\ 2\amp 1\amp 5\amp 7\\ 0\amp -5\amp -3\amp \frac{1}{2}\\ \end{array} \right]\text{,}\) identify the
3.
entry \(b_{32}\text{.}\)
4.
third column.
5.
second row.
6.
If \(A\) is a \(3\times 5\) matrix, how many columns does \(A\) have?
7.
Using variables \(x_1, x_2, \ldots \text{,}\) write the linear system corresponding to the above matrix \(B\text{.}\)
8.
Give the augmented matrix corresponding to the linear system in 2.
9.
Create your own augmented matrix, of any size you choose.
10.
Create your own linear system, with however many variables and equations you choose.
Summary.
The method of elimination is a way of solving systems of linear equations that can be made systematic and algorithmic.
Matrices are arrays of numbers. Right now, we are most interested in augmented matrices, whose entries correspond to the coefficients and constants of a system of linear equations.
Elimination works better than substitution when there are more than 2 or 3 variables, and it is the foundation of future sections of material.
SubsectionPractice
Exercise1.2.1.Two variable elimination.
Use the method of elimination to solve the linear system:
In the following exercises, convert the given augmented matrix into a system of linear equations. Use the variables \(x_1\text{,}\)\(x_2\text{,}\) etc.