Skip to main content

Section 5.1 Solving Systems of Linear Equations by Graphing

We have learned how to graph a line given its equation. In this section, we will learn what a system of two linear equations is, and how to use graphing to solve such a system.

Figure 5.1.1 Alternative Video Lesson

Subsection 5.1.1 Solving Systems of Equations by Graphing

Example 5.1.2

Fabiana and David are running at constant speeds in parallel lanes on a track. David starts out ahead of Fabiana, but Fabiana is running faster. We want to determine when Fabiana will catch up with David. Let's start by looking at the graph of each runner's distance over time, in Figure 5.1.3.

Each of the two lines has an equation, as discussed in Chapter 4. The line representing David appears to have \(y\)-intercept \((0,4)\) and slope \(\frac{4}{3}\text{,}\) so its equation is \(y=\frac{4}{3}t+4\text{.}\) The line representing Fabiana appears to have \(y\)-intercept \((0,0)\) and slope \(2\text{,}\) so its equation is \(y=2t\text{.}\)

Figure 5.1.3 David and Fabiana's distances.

When these two equations are together as a package, we have what is called a system of linear equations:

\begin{equation*} \left\{ \begin{alignedat}{4} y \amp {}={} \tfrac{4}{3}t \amp {}+{} \amp 4 \\ y \amp {}={} 2t \end{alignedat} \right. \end{equation*}

The large left brace indicates that this is a collection of two distinct equations, not one equation that was somehow algebraically manipulated into an equivalent equation.

As we can see in Figure 5.1.3, the graphs of the two equations cross at the point \((6,12)\text{.}\) We refer to the point \((6,12)\) as the solution to this system of linear equations. To denote the solution set, we write \(\{(6,12)\}\text{.}\) But it's much more valuable to interpret these numbers in context whenever possible: it took \(6\) seconds for the two runners to meet up, and when they met they were \(12\) meters up the track.

Remark 5.1.4

In Example 5.1.2, we stated that the solution was the point \((6,12)\text{.}\) It makes sense to write this as an ordered pair when we're given a graph. In some cases when we have no graph, particularly when our variables are not \(x\) and \(y\text{,}\) it might not be clear which variable “comes first” and we won't be able to write an ordered pair. Nevertheless, given the context we can write meaningful summary statements.

Example 5.1.5

Determine the solution to the system of equations graphed in Figure 5.1.6.

Figure 5.1.6 Graph of a System of Equations
Explanation

The two lines intersect where \(x=-3\) and \(y=-1\text{,}\) so the solution is the point \((-3,-1)\text{.}\) We write the solution set as \(\{(-3,-1)\}\text{.}\)

Checkpoint 5.1.7

Now let's look at an example where we need to make a graph to find the solution.

Example 5.1.8

Solve the following system of equations by graphing:

\begin{equation*} \left\{ \begin{alignedat}{4} y \amp {}={} \amp \tfrac{1}{2}x \amp {}+{} \amp 4 \\ y \amp {}={} \amp {-x} \amp {}-{} \amp 5 \end{alignedat} \right. \end{equation*}

Notice that each of these equations is written in slope-intercept form. The first equation, \(y=\frac{1}{2}x+4\text{,}\) is a linear equation with a slope of \(\frac{1}{2}\) and a \(y\)-intercept of \((0,4)\text{.}\) The second equation, \(y=-x-5\text{,}\) is a linear equation with a slope of \(-1\) and a \(y\)-intercept of \((0,-5)\text{.}\) We'll use this information to graph both lines.

The two lines intersect where \(x=-6\) and \(y=1\text{,}\) so the solution of the system of equations is the point \((-6,1)\text{.}\) We write the solution set as \(\{(-6,1)\}\text{.}\)

Figure 5.1.9 \(y=\frac{1}{2}x+4\) and \(y=-x-5\text{.}\)
Example 5.1.10

Solve the following system of equations by graphing:

\begin{equation*} \left\{ \begin{alignedat}{3} x \amp {}-{} \amp 3y \amp {}={} \amp {-12} \\ 2x \amp {}+{} \amp 3y \amp {}={} \amp 3 \end{alignedat} \right. \end{equation*}
Explanation

Since both line equations are given in standard form, we'll graph each one by finding the intercepts. Recall that to find the \(x\)-intercept of each equation, replace \(y\) with \(0\) and solve for \(x\text{.}\) Similarly, to find the \(y\)-intercept of each equation, replace \(x\) with \(0\) and solve for \(y\text{.}\)

For our first linear equation, we have:

\begin{align*} x-3(\substitute{0}) \amp= -12 \amp \substitute{0}-3y \amp=-12\\ x \amp= -12 \amp -3y \amp= -12 \\ \amp\amp y\amp= 4\text{.} \end{align*}

So the intercepts are \((-12,0)\) and \((0,4)\text{.}\)

For our second linear equation, we have:

\begin{align*} 2x+3(\substitute{0}) \amp= 3\amp 2(\substitute{0})+3y \amp= 3\\ 2x \amp= 3\amp 3y \amp= 3\\ x \amp= \frac{3}{2}\amp y\amp= 1\text{.} \end{align*}

So the intercepts are \(\left(\frac{3}{2},0\right)\) and \((0,1)\text{.}\)

Now we can graph each line by plotting the intercepts and connecting these points:

Figure 5.1.11 Graphs of \(x-3y=-12\) and \(2x+3y=3\)

It appears that the solution of the system of equations is the point of intersection of those two lines, which is \((-3,3)\text{.}\) It's important to check this is correct, because when making a hand-drawn graph, it would be easy to be off by a little bit. To check, we can substitute the values of \(x\) and \(y\) from the point \((-3,3)\) into each equation:

\begin{align*} x-3y \amp=-12\amp 2x+3y \amp= 3\\ \substitute{-3}-3(\substitute{3}) \amp\stackrel{?}{=}-12 \amp 2(\substitute{-3})+3(\substitute{3}) \amp\stackrel{?}{=} 3\\ -3-9 \amp\stackrel{\checkmark}{=}-12 \amp -6+9 \amp\stackrel{\checkmark}{=} 3 \end{align*}

So we have checked that \((-3,3)\) is indeed the solution for the system. We write the solution set as \(\{(-3,3)\}\text{.}\)

Example 5.1.12

A college has a north campus and a south campus. The north campus has \(18{,}000\) students, and the south campus has \(4{,}000\) students. In the past five years, the north campus lost \(4{,}000\) students, and the south campus gained \(3{,}000\) students. If these trends continue, in how many years would the two campuses have the same number of students? Write and solve a system of equations modeling this problem.

Explanation

Since all the given student counts are in the thousands, we make the decision to measure student population in thousands. So for instance, the north campus starts with a student population of \(18\) (thousand students).

The north campus lost \(4\) thousand students in \(5\) years. So it is losing students at a rate of \(\frac{4\text{ thousand}}{5\text{ year}}\text{,}\) or \(\frac{4}{5}\,\frac{\text{thousand}}{\text{year}}\text{.}\) This rate of change should be interpreted as a negative number, because the north campus is losing students over time. So we have a linear model with starting value \(18\) thousand students, and a slope of \(-\frac{4}{5}\) thousand students per year. In other words,

\begin{equation*} y=-\frac{4}{5}t+18\text{,} \end{equation*}

where \(y\) stands for the number of students in thousands, and \(t\) stands for the number of years into the future.

Similarly, the number of students at the south campus can be modeled by \(y=\frac{3}{5}t+4\text{.}\) Now we have a system of equations:

\begin{align*} \left\{ \begin{alignedat}{4} y \amp {}={} \amp {-\frac{4}{5}}t \amp {}+{} \amp 18 \\ y \amp {}={} \amp \frac{3}{5}t \amp {}+{} \amp 4 \end{alignedat} \right. \end{align*}

We will graph both lines using their slopes and \(y\)-intercepts.

Figure 5.1.13 Number of Students at the South Campus and North Campus

According to the graph, the lines intersect at \((10,10)\text{.}\) So if the trends continue, both campuses will have \(10{,}000\) students \(10\) years from now.

Example 5.1.14

Solve the following system of equations by graphing:

\begin{equation*} \left\{ \begin{alignedat}{3} y \amp {}={} \amp 3(x-2) \amp {}+{} \amp 1 \\ y \amp {}={} \amp -\tfrac{1}{2}(x+1) \amp {}-{} \amp 1 \end{alignedat} \right. \end{equation*}
Explanation

Since both line equations are given in point-slope form, we can start by graphing the point indicated in each equation and use the slope to determine the rest of the line.

For our first equation, \(y=3(x-2)+1\text{,}\) the point indicated in the equation is \((2,1)\) and the slope is \(3\text{.}\)

For our second equation, \(y=-\frac{1}{2}(x+1)-1\text{,}\) the point indicated in the equation is \((-1,-1)\) and the slope is \(-\frac{1}{2}\text{.}\)

Now we can graph each line by plotting the points and using their slopes.

Figure 5.1.15 Graphs of \(y=3(x-2)+1\) and \(y=-\frac{1}{2}(x+1)-1\)

It appears that the solution of the system of equations is the point of intersection of those two lines, which is \((1,-2)\text{.}\) It's important to check this is correct, because when making a hand-drawn graph, it would be easy to be off by a little bit. To check, we can substitute the values of \(x\) and \(y\) from the point \((1,-2)\) into each equation:

\begin{align*} y\amp=3(x-2)+1\\ \substitute{-2}\amp\stackrel{?}{=}3(\substitute{1}-2)+1\\ -2\amp\stackrel{?}{=}3(-1)+1\\ -2\amp\stackrel{\checkmark}{=}-3+1 \end{align*}
\begin{align*} y\amp=-\frac{1}{2}(x+1)-1\\ \substitute{-2}\amp\stackrel{?}{=}-\frac{1}{2}(\substitute{1}+1)-1\\ -2\amp\stackrel{?}{=}-\frac{1}{2}(2)-1\\ -2\amp\stackrel{\checkmark}{=}-1-1 \end{align*}

So we have checked that \((2,-1)\) is indeed the solution for the system. We write the solution set as \(\{(2,-1)\}\text{.}\)

Subsection 5.1.2 Special Systems of Equations

Recall that when we solved linear equations in one variable, we had two special cases. In one special case there was no solution and in the other case, there were infinitely many solutions. When solving systems of equations in two variables, we have two similar special cases.

Example 5.1.16 Parallel Lines

Let's look at the graphs of two lines with the same slope, \(y=2x-4\) and \(y=2x+1\text{:}\)

Figure 5.1.17 Graphs of \(y=2x-4\) and \(y=2x+1\)

For this system of equations, what is the solution? Since the two lines have the same slope they are parallel lines and will never intersect. This means that there is no solution to this system of equations. We write the solution set as \(\emptyset\text{.}\)

The symbol \(\emptyset\) is a special symbol that represents the empty set, a set that has no numbers in it. This symbol is not the same thing as the number zero. The number of eggs in an empty egg carton is zero whereas the empty carton itself could represent the empty set. The symbols for the empty set and the number zero may look similar depending on how you write the number zero. Try to keep the concepts separate.

Example 5.1.18 Coinciding Lines

Next we'll look at the other special case. Let's start with this system of equations:

\begin{equation*} \left\{ \begin{alignedat}{4} y \amp {}={} \amp 2x-4 \\ 6x-3y \amp {}={} \amp 12 \end{alignedat} \right. \end{equation*}

To solve this system of equations, we want to graph each line. The first equation is in slope-intercept form and can be graphed easily using its slope of \(2\) and its \(y\)-intercept of \((0,-4)\text{.}\)

The second equation, \(6x-3y=12\text{,}\) can either be graphed by solving for \(y\) and using the slope-intercept form or by finding the intercepts. If we use the intercept method, we'll find that this line has an \(x\)-intercept of \((2,0)\) and a \(y\)-intercept of \((0,-4)\text{.}\) When we graph both lines we get Figure 5.1.19.

Now we can see these are actually the same line, or coinciding lines. To determine the solution to this system, we'll note that they overlap everywhere. This means that we have an infinite number of solutions: all points that fall on the line. It may be enough to report that there are infinitely many solutions. In order to be more specific, all we can do is say that any ordered pair \((x,y)\) satisfying the line equation is a solution. In set-builder notation, we would write \(\{(x,y)\mid y=2x-4\}\text{.}\)

Figure 5.1.19 Graphs of \(y=2x-4\) and \(6x-3y=12\)
Remark 5.1.20

In Example 5.1.18, what would have happened if we had decided to convert the second line equation into slope-intercept form?

\begin{align*} 6x-3y\amp=12\\ 6x-3y\subtractright{6x}\amp=12\subtractright{6x}\\ -3y\amp=-6x+12\\ \multiplyleft{-\frac{1}{3}}(-3y)\amp=\multiplyleft{-\frac{1}{3}}(-6x+12)\\ y\amp=2x-4 \end{align*}

This is the literally the same as the first equation in our system. This is a different way to show that these two equations are equivalent and represent the same line. Any time we try to solve a system where the equations are equivalent, we'll have an infinite number of solutions.

Warning 5.1.21

Notice that for a system of equations with infinite solutions like Example 5.1.18, we didn't say that every point was a solution. Rather, every point that falls on that line is a solution. It would be incorrect to state this solution set as “all real numbers” or as “all ordered pairs.”

Intersecting Lines:

If two linear equations have different slopes, the system has one solution.

Parallel Lines:

If the linear equations have the same slope with different \(y\)-intercepts, the system has no solution.

Coinciding Lines:

If two linear equations have the same slope and the same \(y\)-intercept (in other words, they are equivalent equations), the system has infinitely many solutions. This solution set consists of all ordered pairs on that line.

List 5.1.22 A summary of the three types of systems of equations and their solution sets:

Subsection 5.1.3 Exercises

Warmup and Review
1

Find the line’s slope and \(y\)-intercept.

A line has equation \(y={9}x+3\text{.}\)

This line’s slope is .

This line’s \(y\)-intercept is .

2

Find the line’s slope and \(y\)-intercept.

A line has equation \(y={10}x+9\text{.}\)

This line’s slope is .

This line’s \(y\)-intercept is .

3

Find the line’s slope and \(y\)-intercept.

A line has equation \(y=-x - 9\text{.}\)

This line’s slope is .

This line’s \(y\)-intercept is .

4

Find the line’s slope and \(y\)-intercept.

A line has equation \(y=-x - 6\text{.}\)

This line’s slope is .

This line’s \(y\)-intercept is .

5

Find the line’s slope and \(y\)-intercept.

A line has equation \(\displaystyle{ y= -\frac{4x}{9} +3 }\text{.}\)

This line’s slope is .

This line’s \(y\)-intercept is .

6

Find the line’s slope and \(y\)-intercept.

A line has equation \(\displaystyle{ y= -\frac{4x}{5} - 9 }\text{.}\)

This line’s slope is .

This line’s \(y\)-intercept is .

7

Find the line’s slope and \(y\)-intercept.

A line has equation \(\displaystyle{ y= \frac{x}{6} - 7 }\text{.}\)

This line’s slope is .

This line’s \(y\)-intercept is .

8

Find the line’s slope and \(y\)-intercept.

A line has equation \(\displaystyle{ y= \frac{x}{8} +6 }\text{.}\)

This line’s slope is .

This line’s \(y\)-intercept is .

9

Graph the equation \(y=-3x\text{.}\)

10

Graph the equation \(y=\frac{1}{4}x\text{.}\)

11

Graph the equation \(y=\frac{2}{3}x+4\text{.}\)

12

Graph the equation \(y=-2x+5\text{.}\)

13

Solve the linear equation for \(y\text{.}\)

\begin{equation*} {12x-4y}={44} \end{equation*}
14

Solve the linear equation for \(y\text{.}\)

\begin{equation*} {-25x-5y}={-85} \end{equation*}
15

Solve the linear equation for \(y\text{.}\)

\begin{equation*} {3x+9y}={27} \end{equation*}
16

Solve the linear equation for \(y\text{.}\)

\begin{equation*} {-6x-2y}={-6} \end{equation*}
Checking Solutions for System of Equations
17

Decide whether \((-3,-5)\) is a solution to the system of equations:

\begin{equation*} \left\{\begin{aligned} {5x-4y} \amp = {5} \\ {x+4y} \amp = {-25} \\ \end{aligned}\right. \end{equation*}

The point \((-3,-5)\)

  • is

  • is not

a solution.

18

Decide whether \((-2,2)\) is a solution to the system of equations:

\begin{equation*} \left\{\begin{aligned} {-x+4y} \amp = {10} \\ {x+5y} \amp = {8} \\ \end{aligned}\right. \end{equation*}

The point \((-2,2)\)

  • is

  • is not

a solution.

19

Decide whether \((-1,-1)\) is a solution to the system of equations:

\begin{equation*} \left\{\begin{aligned} {4x+y} \amp = {-8} \\ y \amp = {x} \\ \end{aligned}\right. \end{equation*}

The point \((-1,-1)\)

  • is

  • is not

a solution.

20

Decide whether \((0,-5)\) is a solution to the system of equations:

\begin{equation*} \left\{\begin{aligned} {-3x-3y} \amp = {15} \\ y \amp = {-5x-6} \\ \end{aligned}\right. \end{equation*}

The point \((0,-5)\)

  • is

  • is not

a solution.

21

Decide whether \(\left({{\frac{7}{4}}},{{\frac{9}{4}}}\right)\) is a solution to the system of equations:

\begin{equation*} \left\{\begin{aligned} {-8x-12y} \amp = {-41} \\ {8x-12y} \amp = {-13} \\ \end{aligned}\right. \end{equation*}

The point \(\left({{\frac{7}{4}}},{{\frac{9}{4}}}\right)\)

  • is

  • is not

a solution.

22

Decide whether \(\left({{\frac{7}{4}}},{{\frac{5}{4}}}\right)\) is a solution to the system of equations:

\begin{equation*} \left\{\begin{aligned} {12x-4y} \amp = {16} \\ {-4x-12y} \amp = {-19} \\ \end{aligned}\right. \end{equation*}

The point \(\left({{\frac{7}{4}}},{{\frac{5}{4}}}\right)\)

  • is

  • is not

a solution.

Using a Graph to Solve a System

Use a graph to solve the system of equations.

23
\begin{equation*} \left\{\begin{aligned} y\amp=-\frac{7}{2}x-8\\ y\amp=5x+9 \end{aligned}\right. \end{equation*}
24
\begin{equation*} \left\{\begin{aligned} y\amp=\frac{2}{3}x+5\\ y\amp=-2x-11 \end{aligned}\right. \end{equation*}
25
\begin{equation*} \left\{\begin{aligned} y\amp=12x+7\\ 3x+y\amp=-8 \end{aligned}\right. \end{equation*}
26
\begin{equation*} \left\{\begin{aligned} y\amp=-3x+5\\ 4x+y\amp=8 \end{aligned}\right. \end{equation*}
27
\begin{equation*} \left\{\begin{aligned} x+y\amp=0\\ 3x-y\amp=8 \end{aligned}\right. \end{equation*}
28
\begin{equation*} \left\{\begin{aligned} 4x-2y\amp=4\\ x+2y\amp=6 \end{aligned}\right. \end{equation*}
29
\begin{equation*} \left\{\begin{aligned} y\amp=4x-5\\ y\amp=-1 \end{aligned}\right. \end{equation*}
30
\begin{equation*} \left\{\begin{aligned} 3x-4y\amp=12\\ y\amp=3 \end{aligned}\right. \end{equation*}
31
\begin{equation*} \left\{\begin{aligned} x+y\amp=-1\\ x\amp=2 \end{aligned}\right. \end{equation*}
32
\begin{equation*} \left\{\begin{aligned} x-2y\amp=-4\\ x\amp=-4 \end{aligned}\right. \end{equation*}
33
\begin{equation*} \left\{\begin{aligned} y\amp=2(x+3)-5\\ y\amp=-\frac{4}{3}(x-4)-1 \end{aligned}\right. \end{equation*}
34
\begin{equation*} \left\{\begin{aligned} y\amp=-\frac{2}{3}(x-6)-2\\ y\amp=-\frac{1}{2}(x-1)+2 \end{aligned}\right. \end{equation*}
35
\begin{equation*} \left\{\begin{aligned} y\amp=-\frac{1}{2}(x-6)+4\\ y\amp=4(x+1)-6 \end{aligned}\right. \end{equation*}
36
\begin{equation*} \left\{\begin{aligned} y\amp=\frac{5}{6}(x-6)+4\\ y\amp=2(x+1)+4 \end{aligned}\right. \end{equation*}
37
\begin{equation*} \left\{\begin{aligned} y\amp=-\frac{4}{5}x+8\\ 4x+5y\amp=-35 \end{aligned}\right. \end{equation*}
38
\begin{equation*} \left\{\begin{aligned} 2x-7y\amp=28\\ y\amp=\frac{2}{7}x-3 \end{aligned}\right. \end{equation*}
39
\begin{equation*} \left\{\begin{aligned} -10x+15y\amp=60\\ 6x-9y\amp=36 \end{aligned}\right. \end{equation*}
40
\begin{equation*} \left\{\begin{aligned} 6x-8y\amp=32\\ 9x-12y\amp=12 \end{aligned}\right. \end{equation*}
41
\begin{equation*} \left\{\begin{aligned} y\amp=-\frac{3}{5}x+7\\ 9x+15y\amp=105 \end{aligned}\right. \end{equation*}
42
\begin{equation*} \left\{\begin{aligned} 9y-12x\amp=18\\ y\amp=\frac{4}{3}x+2 \end{aligned}\right. \end{equation*}
Determining the Number of Solutions in a System of Equations
43

Simply by looking at this system of equations, decide the number of solutions it has.

\begin{equation*} \left\{\begin{aligned} y \amp = {-6x} \\ y \amp = {-6x} \\ \end{aligned}\right. \end{equation*}

The system has

  • no solution

  • one solution

  • infinitely many solutions

.

44

Simply by looking at this system of equations, decide the number of solutions it has.

\begin{equation*} \left\{\begin{aligned} y \amp = {{\frac{2}{5}}x-4} \\ y \amp = {{\frac{2}{5}}x-4} \\ \end{aligned}\right. \end{equation*}

The system has

  • no solution

  • one solution

  • infinitely many solutions

.

45

Without graphing this system of equations, decide the number of solutions it has.

\begin{equation*} \left\{\begin{aligned} y \amp = {{\frac{3}{2}}x+4} \\ {9x-6y} \amp = 0 \\ \end{aligned}\right. \end{equation*}

The system has

  • no solution

  • one solution

  • infinitely many solutions

.

46

Without graphing this system of equations, decide the number of solutions it has.

\begin{equation*} \left\{\begin{aligned} y \amp = {2x+1} \\ {8x-4y} \amp = 4 \\ \end{aligned}\right. \end{equation*}

The system has

  • no solution

  • one solution

  • infinitely many solutions

.

47

Without graphing this system of equations, decide the number of solutions it has.

\begin{equation*} \left\{\begin{aligned} {3x+12y} \amp = -24 \\ {4x+16y} \amp = -16 \\ \end{aligned}\right. \end{equation*}

The system has

  • no solution

  • one solution

  • infinitely many solutions

.

48

Without graphing this system of equations, decide the number of solutions it has.

\begin{equation*} \left\{\begin{aligned} {12x+4y} \amp = -20 \\ {8x+2y} \amp = 10 \\ \end{aligned}\right. \end{equation*}

The system has

  • no solution

  • one solution

  • infinitely many solutions

.

49

Simply by looking at this system of equations, decide the number of solutions it has.

\begin{equation*} \left\{\begin{aligned} \amp x=4 \\ \amp y=-5 \\ \end{aligned}\right. \end{equation*}

The system has

  • no solution

  • one solution

  • infinitely many solutions

.

50

Simply by looking at this system of equations, decide the number of solutions it has.

\begin{equation*} \left\{\begin{aligned} \amp x=1 \\ \amp y=-1 \\ \end{aligned}\right. \end{equation*}

The system has

  • no solution

  • one solution

  • infinitely many solutions

.