5.9: Systems of Linear Equations in Two Variables
After completing this section, you should be able to:
- Determine and show whether an ordered pair is a solution to a system of equations.
- Solve systems of linear equations using graphical methods.
- Solve systems of linear equations using substitution.
- Solve systems of linear equations using elimination.
- Identify systems with no solution or infinitely many solutions.
- Solve applications of systems of linear equations.
In this section, we will learn how to solve systems of linear equations in two variables. There are several real-world scenarios that can be represented by systems of linear equalities. Suppose two friends, Andrea and Bart, go shopping at a farmers market to buy some vegetables. Andrea buys 2 tomatoes and 4 cucumbers and spends $2.00. Bart buys 4 tomatoes and 5 cucumbers and spends $2.95. What is the price of each vegetable?
Determining If an Ordered Pair Is a Solution to a System of Equations
When we solved linear equations in Linear Equations in One Variable with Applications and Linear Inequalities in One Variable with Applications, we learned how to solve linear equations with one variable. Now we will work with two or more linear equations grouped together, which is known as a system of linear equations.
In this section, we will focus our work on systems of two linear equations in two unknowns (variables) and applications of systems of linear equations. An example of a system of two linear equations is shown below. We use a brace to show the two equations are grouped together to form a system of equations.
\[\left\{\begin{array}{l}
2 x+y=7 \\
x-2 y=6
\end{array}\right. \nonumber \]
A linear equation in two variables, such as \(2 x+y=7\), has an infinite number of solutions. Its graph is a line. Remember, every point on the line is a solution to the equation and every solution to the equation is a point on the line. To solve a system of two linear equations, we want to find the values of the variables that are solutions to both equations. In other words, we are looking for the ordered pairs \((x, y)\) that make both equations true. These are called the solutions of a system of equations.
To determine if an ordered pair is a solution to a system of two equations, we substitute the values of the variables into each equation. If the ordered pair makes both equations true, it is a solution to the system.
Determine whether the ordered pair is a solution to the system.
\[\left\{\begin{aligned}
x-y & =-1 \\
2 x-y & =-5
\end{aligned}\right. \nonumber \]
1. \((-2,-1)\)
2. \((-4,-3)\)
- Answer
-
1.
\[\left\{\begin{aligned}
x-y & =-1 \\
2 x-y & =-5
\end{aligned}\right. \nonumber \]\(\begin{aligned} x-y & =-1 \\ -2-(-1) & \stackrel{?}{=}-1 \\ -1 & =-1 \checkmark\end{aligned}\) \(\begin{aligned} 2 x-y & =-5 \\ 2(-2)-(-1) & \stackrel{?}{=}-5 \\ -3 & \neq-5\end{aligned}\) \((-2,-1)\) does not make both equations true. \((-2,-1)\) is not a solution.
2. We substitute \(x=-4\) and \(y=-3\) into both equations.
\(\begin{aligned} x-y & =-1 \\ -4-(-3) & \stackrel{?}{=}-1 \\ -1 & =-1 \checkmark\end{aligned}\) \(\begin{aligned} 2 x-y & =-5 \\ 2 \bullet(-4)-(-3) & \stackrel{?}{=}-5 \\ -5 & =-5 \checkmark\end{aligned}\) \((-4,-3)\) makes both equations true. \((-4,-3)\) is a solution.
Determine whether the ordered pair is a solution to the system.
\(\left\{ \begin{array}{l} x - 3y = - 8 \\ - 3x - y = 4 \\ \end{array} \right.\)
\((2, -2)\)
\((-2, 2)\)
Determine whether the ordered pair is a solution to the system
\[\left\{\begin{aligned}
y & =\frac{3}{2} x+1 \\
2 x-3 y & =7
\end{aligned}\right. \nonumber \]
1. \((-4,-5)\)
2. \((-4,5)\)
- Answer
1.
\[\left\{\begin{aligned}
y & =\frac{3}{2} x+1 \\
2 x-3 y & =7
\end{aligned}\right. \nonumber \]
Substitute -4 for \(x\) and -5 for \(y\) into both equations.
| \(\begin{array}{l}-5 \stackrel{?}{=} \frac{3}{2}(-4)+1 \\ -5 \stackrel{?}{=} 3(-2)+1 \\ -5 \stackrel{?}{=}-6+1 \\ -5=-5 \checkmark\end{array}\) | \(\begin{array}{r}2(-4)-3(-5) \stackrel{?}{=} 7 \\ (-8)-(-15) \stackrel{?}{=} 7 \\ -8+15 \stackrel{?}{=} 7 \\ 7=7 \checkmark\end{array}\) |
\((-4,-5)\) is a solution.
2.
\[\left\{\begin{aligned}
y & =\frac{3}{2} x+1 \\
2 x-3 y & =7
\end{aligned}\right. \nonumber \]
Substitute -4 for \(x\) and 5 for \(y\) into both equations.
| \(\begin{array}{l}5 \stackrel{?}{\stackrel{3}{2}}(-4)+1 \\ 5 \stackrel{?}{=} 3(-2)+1 \\ 5 \stackrel{?}{=}-6+1 \\ 5 \neq-5\end{array}\) | \(\begin{array}{r}2(-4)-3(5) \stackrel{?}{=} 7 \\ (-8)-(15) \stackrel{?}{=} 7 \\ -8-15 \stackrel{?}{=} 7 \\ -23 \neq 7\end{array}\) |
\((-4,5)\) is not a solution.
Determine whether the ordered pair is a solution to the system.
\[\left\{\begin{aligned}
y & =\frac{2}{3} x+1 \\
-2 x+3 y & =5
\end{aligned}\right. \nonumber \]
1. \((3,3)\)
2. \((-3,3)\)
Solving Systems of Linear Equations Using Graphical Methods
We will use three methods to solve a system of linear equations. The first method we will use is graphing. The graph of a linear equation is a line. Each point on the line is a solution to the equation. For a system of two equations, we will graph two lines. Then we can see all the points that are solutions to each equation. And, by finding what points the lines have in common, we will find the solution to the system.
Most linear equations in one variable have one solution; but for some equations called contradictions , there are no solutions, and for other equations called identities , all numbers are solutions. Similarly, when we solve a system of two linear equations represented by a graph of two lines in the same plane, there are three possible cases, as shown in Figure
.Each time we demonstrate a new method, we will use it on the same system of linear equations. At the end you will decide which method was the most convenient way to solve this system.
The steps to use to solve a system of linear equations by graphing are shown here.
Step 1: Graph the first equation.
Step 2: Graph the second equation on the same rectangular coordinate system.
Step 3: Determine whether the lines intersect, are parallel, or are the same line.
Step 4: Identify the solution to the system.
If the lines intersect, identify the point of intersection. This is the solution to the system.
If the lines are parallel, the system has no solution.
If the lines are the same, the system has an infinite number of solutions.
Step 5: Check the solution in both equations.
Solve this system of linear equations by graphing.
\[\left\{\begin{array}{l}
2 x+y=7 \\
x-2 y=6
\end{array}\right. \nonumber \]
- Answer
-
Step 1: Graph the first equation. To graph the first line, write the equation in slope-intercept form.
\(\begin{array}{rl}2 \boldsymbol{x}+\boldsymbol{y}=7 \\ y=-2 x+7 \\ m=-2 & b=7\end{array}\)
{ 2 x + y = 7 x - 2 y = 6 Step 2: Graph the second equation on the same rectangular coordinate system. To graph the second line, use intercepts.
\[\begin{array}{c}
\boldsymbol{x}-\mathbf{2 y}=\mathbf{6} \\
(0,-3) \quad(6,0)
\end{array} \nonumber \]Step 3: Determine whether the lines intersect, are parallel, or are the same line. Look at the graph of the lines. The lines intersect. Step 4 and Step 5: Identify the solution to the system. Look at the graph of the lines. The lines intersect. Step 4 and Step 5: Identify the solution to the system. If the lines intersect, identify the point of intersection. Check to make sure it is a solution to both equations. This is the solution to the system.
If the lines are parallel, the system has no solution.
If the lines are the same, the system has an infinite number of solutions.
Since the lines intersect, find the point of intersection.
Check the point in both equations.
The lines intersect at \((4,-1)\).
\[\begin{aligned}
2 x+y & =7 \\
2(4)+(-1) & \stackrel{?}{=} 7 \\
8-1 & \stackrel{?}{=} 7 \\
7 & =7 \checkmark \\
x-2 y & =6 \\
4-2(-1) & \stackrel{?}{=} 6 \\
6 & =6 \checkmark
\end{aligned} \nonumber \]The solution is \((4,-1)\).
1. Solve this system of linear equations by graphing.
\[\left\{\begin{aligned}
x-3 y & =-3 \\
x+y & =5
\end{aligned}\right. \nonumber \]
Solving Systems of Linear Equations Using Substitution
We will now solve systems of linear equations by the substitution method. We will use the same system we used for graphing.
\[\left\{\begin{array}{l}
2 x+y=7 \\
x-2 y=6
\end{array}\right. \nonumber \]
We will first solve one of the equations for either \(x\) or . We can choose either equation and solve for either variable—but we’ll try to make a choice that will keep the work easy. Then, we substitute that expression into the other equation. The result is an equation with just one variable—and we know how to solve those!
After we find the value of one variable, we will substitute that value into one of the original equations and solve for the other variable. Finally, we check our solution and make sure it makes both equations true. This process is summarized here:
Step 1: Solve one of the equations for either variable.
Step 2: Substitute the expression from Step 1 into the other equation.
Step 3: Solve the resulting equation.
Step 4: Substitute the solution in Step 3 into either of the original equations to find the other variable.
Step 5: Write the solution as an ordered pair.
Step 6: Check that the ordered pair is a solution to both original equations.
Solve this system of linear equations by substitution:
- Answer
-
Step 1: Solve one of the equations for either variable. We’ll solve the first equation for y. \(\begin{array}{l}\left\{\begin{array}{l}2 x+y=7 \\ x-2 y=6\end{array}\right. \\ 2 x+y=7 \\ y=7-2 x\end{array}\)> Step 2: Substitute the expression from Step 1 into the other equation. We replace y in the second equation with the expression\(7-2x\) \(\begin{aligned} x-2 y & =6 \\ x-2(7-2 x) & =6\end{aligned}\) Step 3: Solve the resulting equation. Now we have an equation with just 1 variable. We know how to solve this! \(\begin{aligned} x-2(7-2 x) & =6 \\ x-14+4 x & =6 \\ 5 x & =20 \\ x & =4\end{aligned}\) Step 4: Substitute the solution from Step 3 into one of the original equations to find the other variable. We’ll use the first equation and replace \(x\) with 4. \(\begin{aligned} 2 x+y & =7 \\ 2(4)+y & =7 \\ 8+y & =7 \\ y & =-1\end{aligned}\) Step 5: Write the solution as an ordered pair. The ordered pair is (\(x, y\) \((4,-1)\) Step 6: Check that the ordered pair is a solution to both original equations. Substitute \[\begin{array}{rlrl}
2 x+y & =7 & x-2 y & =6 \\
2(4)+(-1) & \stackrel{?}{=} 7 & 4-2(-1) & \stackrel{?}{=} 6 \\
7 & =7 \checkmark & & 6
\end{array} \nonumber \]Both equations are true.
\((4,-1)\) is the solution to the system.
Solve this system of linear equations by substitution:
\[\left\{\begin{aligned}
x-3 y & =-3 \\
x+y & =5 \end{aligned}\right. \nonumber \]
Solving Systems of Linear Equations Using Elimination
We have solved systems of linear equations by graphing and by substitution. Graphing works well when the variable coefficients are small, and the solution has integer values. Substitution works well when we can easily solve one equation for one of the variables and not have too many fractions in the resulting expression.
The third method of solving systems of linear equations is called the elimination method. When we solved a system by substitution, we started with two equations and two variables and reduced it to one equation with one variable. This is what we’ll do with the elimination method, too, but we’ll have a different way to get there.
The elimination method is based on the Addition Property of Equality. The Addition Property of Equality says that when you add the same quantity to both sides of an equation, you still have equality. We will extend the Addition Property of Equality to say that when you add equal quantities to both sides of an equation, the results are equal. For any expressions , , , and :
if
and
then .
To solve a system of equations by elimination, we start with both equations in standard form. Then we decide which variable will be easiest to eliminate. How do we decide? We want to have the coefficients of one variable be opposites, so that we can add the equations together and eliminate that variable. Notice how that works when we add these two equations together:
\[\begin{array}{r}
\left\{\begin{array}{l}
3 x+y=5 \\
2 x-y=0
\end{array}\right. \\
\hline 5 x=5
\end{array} \nonumber \]
The \(y\) 's add to zero and we have one equation with one variable. Let us try another one:
\[\left\{\begin{aligned}
x+4 y & =-2 \\
2 x+5 y & =-2
\end{aligned}\right. \nonumber \]
This time we do not see a variable that can be immediately eliminated if we add the equations. But if we multiply the first equation by -2 , we will make the coefficients of \(x\) opposites. We must multiply every term on both sides of the equation by -2 .
\[\left\{\begin{aligned}
-2(x+4 y) & =-2(-2) \\
2 x+5 y & =-2
\end{aligned}\right. \nonumber \]
Then rewrite the system of equations.
\[\left\{\begin{aligned}
-2 x-8 y & =4 \\
2 x+5 y & =-2
\end{aligned}\right. \nonumber \]
Now we see that the coefficients of the \(x\) terms are opposites, so \(x\) will be eliminated when we add these two equations.
\[\left\{\begin{array}{r}
-2 x-8 y=4 \\
\dfrac{2 x+5 y=-2}{-3 y=2}
\end{array}\right. \nonumber \]
Once we get an equation with just one variable, we solve it. Then we substitute that value into one of the original equations to solve for the remaining variable. And, as always, we check our answer to make sure it is a solution to both of the original equations. Here’s a summary of using the elimination method:
Step 1: Write both equations in standard form. If any coefficients are fractions, clear them.
Step 2: Make the coefficients of one variable opposites.
Decide which variable you will eliminate.
Multiply one or both equations so that the coefficients of that variable are opposites.
Step 3: Add the equations resulting from Step 2 to eliminate one variable.
Step 4: Solve for the remaining variable.
Step 5: Substitute the solution from Step 4 into one of the original equations. Then solve for the other variable.
Step 6: Write the solution as an ordered pair.
Step 7: Check that the ordered pair is a solution to both original equations.
Solve this system of linear equations by elimination:
\[\left\{\begin{array}{l}
2 x+y=7 \\
x-2 y=6
\end{array}\right. \nonumber \]
- Answer
-
Step 1: Write both equations in standard form. If any coefficients are fractions, clear them.
Both equations are in standard form, \(A x+B y=C\). There are no fractions. \(\left\{\begin{array}{l}2 x+y=7 \\ x-2 y=6\end{array}\right.\) Step 2: Make the coefficients of one variable opposites. Decide which variable you will eliminate.
Multiply one or both equations so that the coefficients of that variable are opposites.
We can eliminate the \(y\) 's by multiplying the first equation by 2.
Multiply both sides of \(2 x+y=7\) by 2
\(\begin{array}{l}\left\{\begin{array}{l}2 x+y=7 \\ x-2 y=6\end{array}\right. \\ \left\{\begin{array}{r}2(2 x+y)=\mathbf{2}(7) \\ x-2 y=6\end{array}\right.\end{array}\) Step 3: Add the equations resulting from Step 2 to eliminate one variable. Solve for \(x\). \(\begin{aligned}\left\{\begin{aligned} 4 x+2 y & =14 \\ x-2 y & =6\end{aligned}\right. \\ 5 x \quad=20\end{aligned}\) Step 4: Solve for the remaining variable. Substitute \(x=4\) into the second equation, \(x-2 y=6\). Then solve for \(y\). \(x=4\) Step 5: Substitute the solution from Step 4 into one of the original equations. Then solve for the other variable. Substitute \(x=4\) into the second equation, \(x-2 y=6\). Then solve for \(y\). \(\begin{aligned} x-2 y & =6 \\ 4-2 y & =6 \\ -2 y & =2 \\ y & =-1\end{aligned}\) Step 6: Write the solution as an ordered pair. Write it as \((x,y)\) \((4,-1)\) Step 7: Check that the ordered pair is a solution to both original equations. Substitute \(x=4\), \(y=-1\) into
\(2 x+y=7\) and \(x-2 y=6\). Do they make both equations true? Yes!\(\begin{array}{rlrl}
2 x+y & =7 & x-2 y & =6 \\
2(4)+(-1) & \stackrel{?}{=} 7 & 4-2(-1) & \stackrel{?}{=} 6 \\
7 & =7 \checkmark & 6 & =6 \checkmark
\end{array}\)The solution is \((4,-1)\)
Solve this system of linear equations by elimination:
\[\left\{\begin{aligned}
x-3 y & =-3 \\
x+y & =5
\end{aligned}\right. \nonumber \]
Identifying Systems with No Solution or Infinitely Many Solutions
In all the systems of linear equations so far, the lines intersected, and the solution was one point. In Example 5.86 and Example 5.87, we will look at a system of equations that has no solution and at a system of equations that has an infinite number of solutions.
Solve the system by a method of your choice:
\[\left\{\begin{aligned}
y & =\frac{1}{2} x-3 \\
x-2 y & =4
\end{aligned}\right. \nonumber \]
- Answer
-
Let us solve the system of linear equations by graphing.
\[\left\{\begin{aligned}
y & =\frac{1}{2} x-3 \\
x-2 y & =4
\end{aligned}\right. \nonumber \]To graph the first equation, we will use its slope and \(y\)-intercept.
\[\begin{aligned}
\boldsymbol{y} & =\frac{\mathbf{1}}{\mathbf{2}} \boldsymbol{x}-\mathbf{3} \\
m & =\frac{1}{2} \\
b & =-3
\end{aligned} \nonumber \]To graph the second equation, we will use the intercepts.
\(x-2 y=4\)
\(x\) 0 −2 4 0 Graph the lines (Figure
).
Solve the system by a method of your choice:
\(\left\{ \begin{array}{rcl}{y}&{ = }&{\frac{1}{3}x + 2} \\{x - 3y}&{ = }&{7} \\ \end{array} \right.\)
Solve the system by a method of your choice:
- Answer
-
Let us solve the system of linear equations by graphing.
\[\left\{\begin{aligned}
y & =2 x-3 \\
-6 x+3 y & =-9
\end{aligned}\right. \nonumber \]Find the slope and \(y\)-intercept of the first equation.
\[\begin{aligned}
y & =2 x-3 \\
m & =2 \\
b & =-3
\end{aligned} \nonumber \]Find the intercepts of the second equation.
\[-6 x+3 y=-9 \nonumber \]
\(x\) 0 −3 0 Graph the lines (Figure
).Figure The lines are the same! Since every point on the line makes both equations true, there are infinitely many ordered pairs that make both equations true.
There are infinitely many solutions to this system.
Solve the system by a method of your choice:
\(\left\{ \begin{array}{rcl}{y}&{ = }&{3x - 5} \\{ - 18x + 6y}&{ = }&{ - 30} \\ \end{array} \right.\)
In the previous example, if you write the second equation in slope-intercept form, you may recognize that the equations have the same slope and same -intercept. Since every point on the line makes both equations true, there are infinitely many ordered pairs that make both equations true. There are infinitely many solutions to the system. We say the two lines are coincident. Coincident lines have the same slope and same -intercept. A system of equations that has at least one solution is called a consistent system . A system with parallel lines has no solution. We call a system of equations like this an inconsistent system . It has no solution.
We also categorize the equations in a system of equations by calling the equations independent or dependent. If two equations are independent, they each have their own set of solutions. Intersecting lines and parallel lines are independent. If two equations are dependent, all the solutions of one equation are also solutions of the other equation. When we graph two dependent equations, we get coincident lines. Let us sum this up by looking at the graphs of the three types of systems. See Figure
and the table that follows| Lines | Intersecting | Parallel | Coincident |
| Number of Solutions | 1 point | No solution | Infinitely many |
| Consistent/Inconsistent | Consistent | Inconsistent | Consistent |
| Dependent/Independent | Independent | Independent | Dependent |
An by matrix is an array with rows and columns, where each item in the matrix is a number. Matrices are used for many things, but one thing they can be used for is to represent systems of linear equations. For example, the system of linear equations
can be represented by the following matrix:
To use Cramer’s Rule, you need to be able to take the determinant of a matrix. The determinant of a 2 by 2 matrix , denoted , is
For example, the determinant of the matrix
Cramer’s Rule involves taking three determinants:
- The determinant of the first two columns, denoted ;
- The determinant of the first column and the third column, denoted ;
- The determinant of the third column and the first column, denoted .
Going back to the original matrix
Now Cramer’s Rule for the solution of the system will be:
Putting in the values for these determinants, we have The solution to the system is the ordered pair .
Solving Applications of Systems of Linear Equations
Systems of linear equations are very useful for solving applications. Some people find setting up word problems with two variables easier than setting them up with just one variable. To solve an application, we will first translate the words into a system of linear equations. Then we will decide the most convenient method to use, and then solve the system.
Step 1 : Read the problem. Make sure all the words and ideas are understood.
Step 2: Identify what we are looking for.
Step 3: Name what we are looking for. Choose variables to represent those quantities.
Step 4: Translate into a system of equations.
Step 5: Solve the system of equations using good algebra techniques.
Step 6: Check the answer in the problem and make sure it makes sense.
Step 7: Answer the question with a complete sentence.
Heather has been offered two options for her salary as a trainer at the gym. Option A would pay her $25,000 a year plus $15 for each training session. Option B would pay her $10,000 a year plus $40 for each training session. How many training sessions would make the salary options equal?
- Answer
-
Step 1: Read the problem.
Step 2: Identify what we are looking for.
We are looking for the number of training sessions that would make the pay equal.
Step 3: Name what we are looking for.
Let
salary s , and= Heather’s salary sessions n = the number of training sessions Step 4: Translate into a system of equations.
Option A would pay her $25,000 plus $15 for each training session.
Option B would pay her $10,000 + $40 for each training session.
The system is shown.
Step 5: Solve the system of equations.
We will use substitution.
Substitute
15 n 25 for in the second equation,000 + 15 n Solve for .
Step 6: Check the answer.
Are 600 training sessions a year reasonable?
Are the two options equal when
600 n ?= 600 Substitute into each equation.
Step 7: Answer the question.
The salary options would be equal for 600 training sessions.
Translate to a system of equations and then solve.
When Jenna spent 10 minutes on the elliptical trainer and then did circuit training for 20 minutes, her fitness app says she burned 278 calories. When she spent 20 minutes on the elliptical trainer and 30 minutes circuit training, she burned 473 calories. How many calories does she burn for each minute on the elliptical trainer? How many calories for each minute of circuit training?
Practice with Solving Applications of Systems of Equations
Applications of Systems of Linear Equations
Check Your Understanding
Decide whether it would be more convenient to solve the system of equations by substitution or elimination.
- \(\left\{ \begin{array}{*{20}{rcl}} {8x - 15y}&{ = }&{ - 32} \\ {6x + 3y}&{ = }&{ - 5} \end{array}\right.\)
- \(\left\{ \begin{array}{*{20}{rcl}} {x}&{ = }&{4y - 3} \\ {4x - 2y}&{ = }&{ - 6} \end{array}\right.\)
- \(\left\{ \begin{array}{*{20}{rcl}} {y}&{ = }&{7x - 5} \\ {3x - 2y}&{ = }&{16} \end{array}\right.\)
- \(\left\{ \begin{array}{*{20}{rcl}} {12x - 5y}&{ = }&{ - 42} \\ {3x + 7y}&{ = }&{ - 15} \end{array}\right.\)
- \(\left\{ \begin{array}{*{20}{rcl}} {y}&{ = }&{4x + 9} \\ {5x - 2y}&{ = }&{ - 21} \end{array}\right.\)
- \(\left\{ \begin{array}{*{20}{rcl}} {9x - 4y}&{ = }&{24} \\ {3x + 5y}&{ = }&{14} \end{array}\right.\)
- \(\left\{ \begin{array}{*{20}{rcl}} {14x - 15y}&{ = }&{ - 30} \\ {7x + 2y}&{ = }&{10} \end{array}\right.\)
- \(\left\{ \begin{array}{*{20}{rcl}} {x}&{ = }&{9y - 11} \\ {2x - 7y}&{ = }&{ - 27} \end{array}\right.\)