5.1: Solve Systems of Equations by Graphing

Learning Objectives
Note

Before you get started, take this readiness quiz.

  1. For the equation \(y=\fracx−4\)
    ⓐ is (6,0) a solution? ⓑ is (−3,−2) a solution?
    If you missed this problem, review Example 2.1.1.
  2. Find the slope and y-intercept of the line 3x−y=12.
    If you missed this problem, review Example 4.5.7.
  3. Find the x- and y-intercepts of the line 2x−3y=12.
    If you missed this problem, review Example 4.3.7.

Determine Whether an Ordered Pair is a Solution of a System of Equations

In the section on Solving Linear Equations and Inequalities we learned how to solve linear equations with one variable. Remember that the solution of an equation is a value of the variable that makes a true statement when substituted into the equation. Now we will work with systems of linear equations, two or more linear equations grouped together.

Definition: SYSTEM OF LINEAR EQUATIONS

When two or more linear equations are grouped together, they form a system of linear equations.

We will focus our work here on systems of two linear equations in two unknowns. Later, you may solve larger systems of 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.

A linear equation in two variables, like 2x + 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 to a system of equations.

Definition: SolutionS OF A SYSTEM OF EQUATIONS

Solutions of a system of equations are the values of the variables that make all the equations true. A solution of a system of two linear equations is represented by an ordered pair (x, y).

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.

Let’s consider the system below:

Is the ordered pair (2,−1) a solution?

This figure begins with a sentence, “We substitute x =2 and y = -1 into both equations.” The first equation shows that 3x minus y equals 7. Then 3 times 2 minus negative, in parentheses, equals 7. Then 7 equals 7 is true. The second equation reads x minus 2y equals 4. Then 2 minus 2 times negative one in parentheses equals 4. Then 4 = 4 is true.

The ordered pair (2, −1) made both equations true. Therefore (2, −1) is a solution to this system.

Let’s try another ordered pair. Is the ordered pair (3, 2) a solution?

This figure begins with the sentence, “We substitute x equals 3 and y equals 2 into both equations.” The first equation reads 3 times x minus 7equals 7. Then, 3 times 3 minus 2 equals 7. Then 7 = 7 is true. The second equation reads x minus 2y equals 4. The n times 2 minus 2 times 2 = 4. Then negative 2 = 4 is false.

The ordered pair (3, 2) made one equation true, but it made the other equation false. Since it is not a solution to both equations, it is not a solution to this system.

Example \(\PageIndex\)

Determine whether the ordered pair is a solution to the system: \(\begin \\ \end\)

Solution

This figure begins with the sentence, “We substitute x = -4 and y = -3 into both equations.” The first equation listed shows x – y = -1. Then -4 - (-3) = -1. Then -1 = -1. The second equation listed shows 2x – y = -5. Then 2 times (-4) – (-3) = -5. Then -5 = -5. Under the first equation is the sentence, “(-4, -3) does make both equations true.” Under the second equation is the sentence, “(-4, -3) is a solution.”

2.

(−4, −3) makes both equations true. (−4, −3) is a solution.

Try It \(\PageIndex\)

Determine whether the ordered pair is a solution to the system: \(\begin \\ \end\)

Try It \(\PageIndex\)

Determine whether the ordered pair is a solution to the system: \(\begin \\ \end\)

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 \(\PageIndex\):

This figure shows three x y-coordinate planes. The first plane shows two lines which intersect at one point. Under the graph it says, “The lines intersect. Intersecting lines have one point in common. There is one solution to this system.” The second x y-coordinate plane shows two parallel lines. Under the graph it says, “The lines are parallel. Parallel lines have no points in common. There is no solution to this system.” The third x y-coordinate plane shows one line. Under the graph it says, “Both equations give the same line. Because we have just one line, there are infinitely many solutions.”

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 \(\PageIndex\): How to Solve a System of Linear Equations by Graphing

Solve the system by graphing: \(\begin \\ \end\)

Solution

This table has four rows and three columns. The first column acts as the header column. The first row reads, “Step 1. Graph the first equation.” Then it reads, “To graph the first line, write the equation in slope-intercept form.” The equation reads 2x + y = 7 and becomes y = -2x + 7 where m = -2 and b = 7. Then it shows a graph of the equations 2x + y = 7. The equation x – 2y = 6 is also listed.The second row reads, “Step 2. Graph the second equation on the same rectangular coordinate system.” Then it says, “To graph the second line, use intercepts.” This is followed by the equation x – 2y = 6 and the ordered pairs (0, -3) and (6, 0). The last column of this row shows a graph of the two equations.The third row reads, “Step 3. Determine whether the lines intersect, are parallel, or are the same line.” Then “Look at the graph of the lines.” Finally it reads, “The lines intersect.”The fourth row reads, “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.” Then it reads, “Since the lines intersect, find the point of intersection. Check the point in both equations.” Finally it reads, “The lines intersect at (4, -1). It then uses substitution to show that, “The solution is (4, -1).”

Try It \(\PageIndex\)

Solve each system by graphing: \(\begin \\ \end\)

Answer

Try It \(\PageIndex\)

Answer

The steps to use to solve a system of linear equations by graphing are shown below.

TO SOLVE A SYSTEM OF LINEAR EQUATIONS BY GRAPHING.
  1. Graph the first equation.
  2. Graph the second equation on the same rectangular coordinate system.
  3. Determine whether the lines intersect, are parallel, or are the same line.
  4. Identify the solution to the system.
Example \(\PageIndex\)

Solve the system by graphing: \(\begin \\ \end\)

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. \(\begin \\ \end\)

Find the slope and y-intercept of the
first equation.
.
Find the slope and y-intercept of the
first equation.
.
Graph the two lines.
Determine the point of intersection. The lines intersect at (1, 3).
.
Check the solution in both equations. \(\begin & \\2 \cdot 1+1> &4 \cdot 1-1> \\ & \end\)
The solution is (1, 3).
Try It \(\PageIndex\)

Solve the system by graphing: \(\begin \\ \end\)

Answer

Try It \(\PageIndex\)

Solve the system by graphing: \(\begin \\ \end\)

Answer

Both equations in Example \(\PageIndex\) 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 \(\PageIndex\)

Solution

We’ll solve both of these equations for \(y\) so that we can easily graph them using their slopes and y-intercepts. \(\begin \\ \end\)


Find the slope and y-intercept.


Solve the second equation for y.

Try It \(\PageIndex\)

Solve each system by graphing: \(\begin \\ \end\)

Answer

Try It \(\PageIndex\)

Solve each system by graphing: \(\begin < 2x+y=6>\\ \end\)

Answer

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 \(\PageIndex\).

Example \(\PageIndex\)

Solve the system by graphing: \(\begin \\ \end\)

Solution

We will find the x- and y-intercepts of both equations and use them to graph the lines.

The solution is (3, −1).

Try It \(\PageIndex\)

Solve each system by graphing: \(\begin \\ \end\)

Answer

Try It \(\PageIndex\)

Solve each system by graphing: \(\begin \\ \end\)

Answer

Do you remember how to graph a linear equation with just one variable? It will be either a vertical or a horizontal line.

Example \(\PageIndex\)

Solve the system by graphing: \(\begin \\ \end\)

Solution

.
We know the first equation represents a horizontal
line whose y-intercept is 6.
.
The second equation is most conveniently graphed
using intercepts.
.
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&& & &&\\&>& &&>& \\ && &&>& \\ <>&<>&<>&&& \end\)
The solution is (−3, 6).
Try It \(\PageIndex\)

Solve each system by graphing: \(\begin \\ \end\)

Answer

Try It \(\PageIndex\)

Solve each system by graphing: \(\begin \\ \end\)

Answer

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 \(\PageIndex\)

Solution

.
To graph the first equation, we will
use its slope and y-intercept.
.
.
.
To graph the second equation,
we will use the intercepts.
.
.
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 \(\PageIndex\)

Answer

Try It \(\PageIndex\)

Solve each system by graphing: \(\begin \\ \end\)

Answer

Example \(\PageIndex\)

Solution

.
Find the slope and y-intercept of the
first equation.
.
Find the intercepts of the second equation. .
.
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 \(\PageIndex\)

Answer

infinitely many solutions

Try It \(\PageIndex\)

Answer

infinitely many solutions

If you write the second equation in Example \(\PageIndex\) 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.

Determine the Number of Solutions of a Linear System

There will be times when we will want to know how many solutions there will be to a system of linear equations, but we might not actually have to find the solution. It will be helpful to determine this without graphing.

We have seen that two lines in the same plane must either intersect or are parallel. The systems of equations in Example \(\PageIndex\) through Example \(\PageIndex\) all had two intersecting lines. Each system had one solution.

A system with parallel lines, like Example \(\PageIndex\), has no solution. What happened in Example \(\PageIndex\)? The equations have coincident lines, and so the system had infinitely many solutions.

We’ll organize these results in Figure \(\PageIndex\) below:

This table has two columns and four rows. The first row labels each column “Graph” and “Number of solutions.” Under “Graph” are “2 intersecting lines,” “Parallel lines,” and “Same line.” Under “Number of solutions” are “1,” “None,” and “Infinitely many.”

Parallel lines have the same slope but different y-intercepts. So, if we write both equations in a system of linear equations in slope–intercept form, we can see how many solutions there will be without graphing! Look at the system we solved in Example \(\PageIndex\).

The two lines have the same slope but different y-intercepts. They are parallel lines.

Figure \(\PageIndex\) shows how to determine the number of solutions of a linear system by looking at the slopes and intercepts.

This table is entitled “Number of Solutions of a Linear System of Equations.” There are four columns. The columns are labeled, “Slopes,” “Intercepts,” “Type of Lines,” “Number of Solutions.” Under “Slopes” are “Different,” “Same,” and “Same.” Under “Intercepts,” the first cell is blank, then the words “Different” and “Same” appear. Under “Types of Lines” are the words, “Intersecting,” “Parallel,” and “Coincident.” Under “Number of Solutions” are “1 point,” “No Solution,” and “Infinitely many solutions.”

Let’s take one more look at our equations in Example \(\PageIndex\) that gave us parallel lines.

When both lines were in slope-intercept form we had:

Do you recognize that it is impossible to have a single ordered pair (x,y) that is a solution to both of those equations?

We call a system of equations like this an inconsistent system. It has no solution.

A system of equations that has at least one solution is called a consistent system.

CONSISTENT AND INCONSISTENT SYSTEMS

A consistent system of equations is a system of equations with at least one solution.

An inconsistent system of equations is a system of equations with no solution.

We also categorize the equations in a system of equations by calling the equations independent or dependent. If two equations are independent equations, 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.

INDEPENDENT AND DEPENDENT EQUATIONS

Two equations are independent if they have different solutions.

Two equations are dependent if all the solutions of one equation are also solutions of the other equation.

Let’s sum this up by looking at the graphs of the three types of systems. See Figure \(\PageIndex\) and Figure \(\PageIndex\).

This figure shows three x y coordinate planes in a horizontal row. The first shows two lines intersecting. The second shows two parallel lines. The third shows two coincident lines. This table has four columns and four rows. The columns are labeled, “Lines,” “Intersecting,” “Parallel,” and “Coincident.” In the first row under the labeled column “lines” it reads “Number of solutions.” Reading across, it tell us that an intersecting line contains 1 point, a parallel line provides no solution, and a coincident line has infinitely many solutions. A consistent/inconsistent line has consistent lines if they are intersecting, inconsistent lines if they are parallel and consistent if the lines are coincident. Finally, dependent and independent lines are considered independent if the lines intersect, they are also independent if the lines are parallel, and they are dependent if the lines are coincident.

Example \(\PageIndex\)

Without graphing, determine the number of solutions and then classify the system of equations: \(\begin \\ \end\)

Solution

A system of equations whose graphs are parallel lines has no solution and is inconsistent and independent.

Try It \(\PageIndex\)

Without graphing, determine the number of solutions and then classify the system of equations.

Answer

no solution, inconsistent, independent

Try It \(\PageIndex\)

Without graphing, determine the number of solutions and then classify the system of equations.

Answer

no solution, inconsistent, independent

Example \(\PageIndex\)

Without graphing, determine the number of solutions and then classify the system of equations: \(\begin \\ \end\)

Solution

A system of equations whose graphs are intersect has 1 solution and is consistent and independent.

Try It \(\PageIndex\)

Without graphing, determine the number of solutions and then classify the system of equations.

Answer

one solution, consistent, independent

Try It \(\PageIndex\)

Without graphing, determine the number of solutions and then classify the system of equations.

Answer

one solution, consistent, independent

Example \(\PageIndex\)

Without graphing, determine the number of solutions and then classify the system of equations. \(\begin \\ x−2>\end\)

Solution

A system of equations whose graphs are coincident lines has infinitely many solutions and is consistent and dependent.

Try It \(\PageIndex\)

Without graphing, determine the number of solutions and then classify the system of equations.

Answer

infinitely many solutions, consistent, dependent

Try It \(\PageIndex\)

Without graphing, determine the number of solutions and then classify the system of equations.

Answer

infinitely many solutions, consistent, dependent

Solve Applications of Systems of Equations by Graphing

We will use the same problem solving strategy we used in Math Models to set up and solve applications of systems of linear equations. We’ll modify the strategy slightly here to make it appropriate for systems of equations.

USE A PROBLEM SOLVING STRATEGY FOR SYSTEMS OF LINEAR EQUATIONS.
  1. Read the problem. Make sure all the words and ideas are understood.
  2. Identify what we are looking for.
  3. Name what we are looking for. Choose variables to represent those quantities.
  4. Translate into a system of equations.
  5. Solve the system of equations using good algebra techniques.
  6. Check the answer in the problem and make sure it makes sense.
  7. Answer the question with a complete sentence.

Step 5 is where we will use the method introduced in this section. We will graph the equations and find the solution.

Example \(\PageIndex\)

Sondra is making 10 quarts of punch from fruit juice and club soda. The number of quarts of fruit juice is 4 times the number of quarts of club soda. How many quarts of fruit juice and how many quarts of club soda does Sondra need?

Solution

Step 1. Read the problem.

Step 2. Identify what we are looking for.

We are looking for the number of quarts of fruit juice and the number of quarts of club soda that Sondra will need.

Step 3. Name what we are looking for. Choose variables to represent those quantities.

Let f= number of quarts of fruit juice.
c= number of quarts of club soda

Step 4. Translate into a system of equations.

This figure shows sentences converted into equations. The first sentence reads, “The number of quarts of fruit juice and the number of quarts of club soda is 10. “<a href=Number of quarts of fruit juice” contains a curly bracket beneath the phrase with an “f” centered under the bracket. The “And” also contains a curly bracket beneath it and has a plus sign centered beneath it. “Number of quarts of club soda” contains a curly bracket with the variable “c” beneath it. And finally, the phrase “is 10” contains a curly bracket. Under this it reads equals 10. The second sentence reads, “The number of quarts of fruit juice is four times the number of quarts of club soda”. This sentence is set up similarly in that each phrase contains a curly bracket underneath. The variable “f” represents “The number of quarts of fruit juice”. An equal sign represents “is” and “4c” represents four times the number of quarts of club soda.”" />

Step 5. Solve the system of equations using good algebra techniques.

This figure shows two equations and their graph. The first equation is f = 4c where b = 4 and b = 0. The second equation is f + c = 10. f = negative c +10 where b = negative 1 and b = 10. The x y coordinate plane shows a graph of these two lines which intersect at (2, 8).

The point of intersection (2, 8) is the solution. This means Sondra needs 2 quarts of club soda and 8 quarts of fruit juice.

Step 6. Check the answer in the problem and make sure it makes sense.

Does this make sense in the problem?

Yes, the number of quarts of fruit juice, 8 is 4 times the number of quarts of club soda, 2.

Yes, 10 quarts of punch is 8 quarts of fruit juice plus 2 quarts of club soda.

Step 7. Answer the question with a complete sentence.

Sondra needs 8 quarts of fruit juice and 2 quarts of soda.

Try It \(\PageIndex\)

Manny is making 12 quarts of orange juice from concentrate and water. The number of quarts of water is 3 times the number of quarts of concentrate. How many quarts of concentrate and how many quarts of water does Manny need?

Answer

Manny needs 3 quarts juice concentrate and 9 quarts water.

Try It \(\PageIndex\)

Alisha is making an 18 ounce coffee beverage that is made from brewed coffee and milk. The number of ounces of brewed coffee is 5 times greater than the number of ounces of milk. How many ounces of coffee and how many ounces of milk does Alisha need?

Answer

Alisha needs 15 ounces of coffee and 3 ounces of milk.

Note

Access these online resources for additional instruction and practice with solving systems of equations by graphing.

Key Concepts

Glossary

coincident lines Coincident lines are lines that have the same slope and same y-intercept. consistent system A consistent system of equations is a system of equations with at least one solution. dependent equations Two equations are dependent if all the solutions of one equation are also solutions of the other equation. inconsistent system An inconsistent system of equations is a system of equations with no solution. independent equations Two equations are independent if they have different solutions. solutions of a system of equations Solutions of a system of equations are the values of the variables that make all the equations true. A solution of a system of two linear equations is represented by an ordered pair (x, y). system of linear equations When two or more linear equations are grouped together, they form a system of linear equations.

This page titled 5.1: Solve Systems of Equations by Graphing is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform.

  1. Back to top