
Solve a System of Linear Equations by Graphing
In this chapter we will use three methods to solve a system of linear equations. The first method we'll 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 the lines have in common, we'll find the solution to the system.
Most linear equations in one variable have one solution, but we saw that some equations, called contradictions, have 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 5.2:

Figure 5.2
For the first Example of solving a system of linear equations in this section and in the next two sections, we will solve the same system of two linear equations. But we'll use a different method in each section. After seeing the third method, you'll decide which method was the most convenient way to solve this system.
Example 5.2
How to Solve a System of Linear Equations by Graphing
Solve the system by graphing: \(\left\{\begin{array}{l}2 x+y=7 \\ x-2 y=6\end{array}\right.\).
Solution
Step 1. Graph the first equation. |
To graph the first line, write the equation in slope-intercept form. |
\(\left\{\begin{array}{l} 2 x+y=7 \\ x-2 y=6 \end{array}\right.\). |
Step 2. Graph the second equation on the same rectangular coordinate system. |
To graph the second line, use intercepts. \(x-2y=6\) \( (0,-3) \quad(6,0) \) |
![]() |
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. 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. |
The lines intersect at \((4,-1)\). \(\begin{aligned} 2 x+y &=7 \\ 2(4)+(-1) & \stackrel{?}{=} 7 \\ 8-1 & \stackrel{?}{=} 7 \\ 7 &=7 \text{✓} \end{aligned}\) \(\begin{aligned} x-2 y &=6 \\ 4-2(-1) & \stackrel{?}{=} 6 \\ 6 &=6 \text{✓} \end{aligned}\) The solution is \((4,-1)\). |
Try It 5.3
Solve each system by graphing: \(\left\{\begin{array}{l}x-3 y=-3 \\ x+y=5\end{array}\right.\).
Try It 5.4
Solve each system by graphing: \(\left\{\begin{array}{l}-x+y=1 \\ 3 x+2 y=12\end{array}\right.\).
The steps to use to solve a system of linear equations by graphing are shown below.
HOW TO
To solve a system of linear equations by graphing.
- 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. 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.
Example 5.3
Solve the system by graphing:
\(\left\{\begin{array}{l}y=2 x+1 \\ y=4 x-1\end{array}\right.\)
Solution
Both of the equations in this system are in slope-intercept form, so we will use their slopes and \(y\) -intercepts to graph them. \(\left\{\begin{array}{l}y=2 x+1 \\ y=4 x-1\end{array}\right.\)
Find the slope and \(y\)-intercept of the first equation. |
\(\begin{array}{c} y=2 x+1 \\ m=2 \\ b=1 \end{array}\) |
Find the slope and \(y\)-intercept of the first equation. |
\begin{array}{c} y=4x-1 \\ m=4 \\ b=-1 \end{array} |
Graph the two lines. | |
Determine the point of intersection. | The lines intersect at \((1, 3)\). |
![]() |
|
Check the solution in both equations. | \(\begin{array}{ll}y=2 x+1 & \qquad \qquad y=4 x-1 \\ 3 \stackrel{?}{=} 2 \cdot 1+1 & \qquad \qquad 3 \stackrel{?}{=} 4 \cdot 1-1 \\ 3=3 \text{✓} & \qquad \qquad 3=3 \text{✓}\end{array}\) |
The solution is \((1, 3)\). |
Try It 5.5
Solve each system by graphing: \(\left\{\begin{array}{l}y=2 x+2 \\ y=-x-4\end{array}\right.\).
Try It 5.6
Solve each system by graphing: \(\left\{\begin{array}{l}y=3 x+3 \\ y=-x+7\end{array}\right.\).
Both equations in Example 5.3 were given in slope–intercept form. This made it easy for us to quickly graph the lines. In the next example, we'll first re-write the equations into slope–intercept form.
Example 5.4
Solve the system by graphing:
\(\left\{\begin{array}{l}3 x+y=-1 \\ 2 x+y=0\end{array}\right.\)
Solution
We'll solve both of these equations for \(y\) so that we can easily graph them using their slopes and \(y\) -intercepts. \(\left\{\begin{array}{l}3 x+y=-1 \\ 2 x+y=0\end{array}\right.\)
Solve the first equation for \(y\).
|
\(\begin{aligned} 3 x+y &=-1 \\ y &=-3 x-1 \end{aligned}\) \(\begin{aligned} m &=-3 \\ b &=-1 \end{aligned}\) \(\begin{aligned} 2 x+y &=0 \\ y &=-2 x \end{aligned}\) \(\begin{aligned} m &=-2 \\ b &=0 \end{aligned}\) |
Graph the lines. | ![]() |
Determine the point of intersection. | The lines intersect at \((−1, 2)\). |
Check the solution in both equations. | \(\begin{array}{rrr}3 x+y =-1 & 2 x+y= 0 \\ 3(-1)+2 \stackrel{?}{=}-1 & \qquad \qquad 2(-1)+2 \stackrel{?}{=} 0 \\ -1 =-1 \text{✓} & 0=0 \text{✓}\end{array}\) |
The solution is \((−1, 2)\). |
Try It 5.7
Solve each system by graphing: \(\left\{\begin{array}{l}-x+y=1 \\ 2 x+y=10\end{array}\right.\).
Try It 5.8
Solve each system by graphing: \(\left\{\begin{array}{l}2 x+y=6 \\ x+y=1\end{array}\right.\).
Usually when equations are given in standard form, the most convenient way to graph them is by using the intercepts. We'll do this in Example 5.5.
Example 5.5
Solve the system by graphing: \(\left\{\begin{array}{l}x+y=2 \\ x-y=4\end{array}\right.\)
Solution
We will find the \(x\) - and \(y\) -intercepts of both equations and use them to graph the lines.
\(x+y=2\) | ||||||||
To find the intercepts, let \(x=0\) and solve for \(y\), then let \(y=0\) and solve for \(x\). | \(\begin{array}{rlrl}x+y & =2 & \qquad \qquad x+y & =2 \\ 0+y & =2 & \qquad \qquad x+0 & =2 \\ y & =2 & \qquad \qquad x & =2\end{array}\) |
|
||||||
\(x=y=4\) | ||||||||
To find the intercepts, let \(x=0\) then let \(y=0\). | \(\begin{array}{rr} & \qquad \qquad x-y=4 \\ x-y=4 & \qquad \qquad x-0=4 \\ 0-y=4 & \qquad \qquad x=4 \\ -y=4 & \\ y=-4 & \end{array}\) |
|
||||||
Graph the line. | ![]() |
|||||||
Determine the point of intersection. | The lines intersect at \((3, −1)\). | |||||||
Check the solution in both equations. |
\(\begin{array}{rrr}x+y =2 & \qquad \qquad x-y=4 \\ 3+(-1) \stackrel{?}{=} 2 & \qquad \qquad 3-(-1) \stackrel{?}{=} 4 \\ 2=2 \text{✓} & \qquad \qquad 4=4 \text{✓}\end{array}\) The solution is \((3, −1)\). |
Try It 5.9
Solve each system by graphing: \(\left\{\begin{array}{l}x+y=6 \\ x-y=2\end{array}\right.\).
Try It 5.10
Solve each system by graphing: \(\left\{\begin{array}{l}x+y=2 \\ x-y=-8\end{array}\right.\).
Do you remember how to graph a linear equation with just one variable? It will be either a vertical or a horizontal line.
Example 5.6
Solve the system by graphing:
\(\left\{\begin{array}{l}y=6 \\ 2 x+3 y=12\end{array}\right.\)
Solution
\(\left\{\begin{array}{r} y &=6 \\ 2 x+3 y &=12 \end{array}\right.\) | |||||||
We know the first equation represents a horizontal line whose \(y\) -intercept is \(6 .\) |
\(y=6\) | ||||||
The second equation is most conveniently graphed using intercepts. |
\(2x+3y=12\) |
||||||
To find the intercepts, let \(x=0\) and then \(y=0\). |
|
||||||
Graph the lines. | ![]() |
||||||
Determine the point of intersection. | The lines intersect at \((−3, 6)\). | ||||||
Check the solution to both equations. | \(\begin{array}{rrr}y=6 & 2 x+3 y =12 \\ 6 \stackrel{?}{=} 6 \text{✓} & \qquad 2(-3)+3(6) \stackrel{?}{=} 12 \\ 2=2 & -6+18 \stackrel{?}{=} 12 \\ & 12 =12 \text{✓}\end{array}\) | ||||||
The solution is \((−3, 6)\). |
Try It 5.11
Solve each system by graphing: \(\left\{\begin{array}{l}y=-1 \\ x+3 y=6\end{array}\right.\).
Try It 5.12
Solve each system by graphing: \(\left\{\begin{array}{l}x=4 \\ 3 x-2 y=24\end{array}\right.\).
In all the systems of linear equations so far, the lines intersected and the solution was one point. In the next two examples, we'll look at a system of equations that has no solution and at a system of equations that has an infinite number of solutions.
Example 5.7
Solve the system by graphing:
\(\left\{\begin{array}{l}y=\frac{1}{2} x-3 \\ x-2 y=4\end{array}\right.\)
Solution
\(\left\{ \begin{aligned} y &=\frac{1}{2} x-3 \\ x-2 y &=4 \end{aligned} \right.\). | |||||||
To graph the first equation, we will use its slope and y-intercept. |
\(y=\frac{1}{2} x-3\) | ||||||
\(m=\frac{1}{2}\) | |||||||
\(b=-3\) | |||||||
To graph the second equation, we will use the intercepts. |
\(x-2 y=4\) | ||||||
|
|||||||
Graph the lines. | ![]() |
||||||
Determine the point of intersection. | The lines are parallel. | ||||||
Since no point is on both lines, there is no ordered pair that makes both equations true. There is no solution to this system. |
Try It 5.13
Solve each system by graphing: \(\left\{\begin{array}{l}y=-\frac{1}{4} x+2 \\ x+4 y=-8\end{array}\right.\).
Try It 5.14
Solve each system by graphing: \(\left\{\begin{array}{l}y=3 x-1 \\ 6 x-2 y=6\end{array}\right.\).
Example 5.8
Solve the system by graphing: \(\left\{\begin{array}{l}y=2 x-3 \\ -6 x+3 y=-9\end{array}\right.\).
Solution
\(\left\{ \begin{aligned} y &=2 x-3 \\ -6 x+3 y &=-9 \end{aligned} \right.\) | |||||||
Find the slope and \(y\)-intercept of the first equation. |
\(\begin{aligned} y &=2 x-3 \\ m &=2 \\ b &=-3 \end{aligned}\) | ||||||
Find the intercepts of the second equation. | \(-6 x+3 y=-9\) | ||||||
|
|||||||
Graph the lines. | ![]() |
||||||
Determine the point of intersection. | 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. |
Try It 5.15
Solve each system by graphing: \(\left\{\begin{array}{l}y=-3 x-6 \\ 6 x+2 y=-12\end{array}\right.\).
Try It 5.16
Solve each system by graphing: \(\left\{\begin{array}{l}y=\frac{1}{2} x-4 \\ 2 x-4 y=16\end{array}\right.\).
If you write the second equation in Example 5.8 in slope-intercept form, you may recognize that the equations have the same slope and same \(y\)-intercept.
When we graphed the second line in the last example, we drew it right over the first line. We say the two lines are coincident. Coincident lines have the same slope and same \(y\)-intercept.
Coincident Lines
Coincident lines have the same slope and same y-intercept.