Skip to content
Solve Systems of Equations by Graphing

Solve Systems of Equations by Graphing

By the end of this section, you will be able to: determine whether an ordered pair is a solution of a system of equations, solve a system of linear equations by graphing, determine the number of solutions of a linear system, and solve applications of systems of equations by graphing.

Determine whether an ordered pair is a solution of a system of equations

A linear equation in two variables, like 2x+y=72x + y = 7, has infinitely many solutions — its graph is a line, and every point on that line is a solution. Now we will work with systems of linear equations, two or more linear equations grouped together.

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. An example of a system of two linear equations is shown below. A brace shows that the two equations are grouped together to form a system:

{2x+y=7x2y=6\left\{\begin{array}{l} 2x + y = 7 \\ x - 2y = 6 \end{array}\right.

To solve a system of two linear equations, we want to find the values of the variables that are solutions to both equations at once — the ordered pairs (x,y)(x, y) that make both equations true.

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)(x, y).

To determine whether 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.

Example. Determine whether the ordered pair is a solution to the system {xy=12xy=5\left\{\begin{array}{l} x - y = -1 \\ 2x - y = -5 \end{array}\right.: (a) (2,1)(-2, -1), (b) (4,3)(-4, -3).

(a) Substitute x=2x = -2 and y=1y = -1 into both equations.

xy=1:2(1)=?11=1  2xy=5:2(2)(1)=?535 \begin{array}{lrcl} x - y = -1: & -2 - (-1) &\stackrel{?}{=}& -1 \\[4pt] & -1 &=& -1 \; \checkmark \\[4pt] 2x - y = -5: & 2(-2) - (-1) &\stackrel{?}{=}& -5 \\[4pt] & -3 &\neq& -5 \end{array}

The ordered pair makes the first equation true but not the second, so (2,1)(-2, -1) does not make both equations true — it is not a solution to the system.

(b) Substitute x=4x = -4 and y=3y = -3 into both equations.

xy=1:4(3)=?11=1  2xy=5:2(4)(3)=?55=5   \begin{array}{lrcl} x - y = -1: & -4 - (-3) &\stackrel{?}{=}& -1 \\[4pt] & -1 &=& -1 \; \checkmark \\[4pt] 2x - y = -5: & 2(-4) - (-3) &\stackrel{?}{=}& -5 \\[4pt] & -5 &=& -5 \; \checkmark \end{array}

The ordered pair makes both equations true, so (4,3)(-4, -3) is a solution to the system.

For the system {3x+y=0, x+2y=5}\{3x + y = 0,\ x + 2y = -5\}, substitute x=1x = 1 and y=3y = -3 into x+2yx + 2y and simplify.

For the same system, substitute x=0x = 0 and y=0y = 0 into x+2yx + 2y and simplify. (Compare the result to -5 — does it make the equation true?)

Solve a system of linear equations by graphing

The graph of a linear equation is a line, and every point on that line is a solution of the equation. For a system of two equations, we graph two lines on the same coordinate plane. Then we can see all the points that are solutions to each equation — and by finding what the two lines have in common, we find the solution to the system.

Two lines in the same plane must either intersect, be parallel, or be the same line, so there are three possible outcomes when we graph a system. We’ll explore all three later in this section — for now, we’ll focus on systems where the lines intersect in exactly one point.

How 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. If the lines intersect, identify the point of intersection and check that 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 infinitely many solutions.

Example. Solve the system by graphing: {y=2x+1y=4x1\left\{\begin{array}{l} y = 2x + 1 \\ y = 4x - 1 \end{array}\right.

Both equations are already in slope–intercept form:

y=2x+1m=2, b=1y = 2x + 1 \qquad m = 2, \ b = 1

y=4x1m=4, b=1y = 4x - 1 \qquad m = 4, \ b = -1

We graph both lines on the same coordinate plane using their slopes and yy-intercepts.

xy(1, 3)y = 2x + 1y = 4x − 1

The lines intersect at (1,3)(1, 3). Check the solution in both equations:

y=2x+1:3=?2(1)+13=3  y=4x1:3=?4(1)13=3   \begin{array}{lrcl} y = 2x + 1: & 3 &\stackrel{?}{=}& 2(1) + 1 \\[4pt] & 3 &=& 3 \; \checkmark \\[4pt] y = 4x - 1: & 3 &\stackrel{?}{=}& 4(1) - 1 \\[4pt] & 3 &=& 3 \; \checkmark \end{array}

The solution is (1,3)(1, 3).

When equations are given in standard form, it is often more convenient to graph them using their xx- and yy-intercepts.

Example. Solve the system by graphing: {x+y=2xy=4\left\{\begin{array}{l} x + y = 2 \\ x - y = 4 \end{array}\right.

We find the xx- and yy-intercepts of each line.

x+y=2x + y = 2xy=4x - y = 4
xxyyxxyy
0022004-4
22004400
xy(3, −1)x + y = 2x − y = 4

The lines intersect at (3,1)(3, -1). Check the solution in both equations:

x+y=2:3+(1)=?22=2  xy=4:3(1)=?44=4   \begin{array}{lrcl} x + y = 2: & 3 + (-1) &\stackrel{?}{=}& 2 \\[4pt] & 2 &=& 2 \; \checkmark \\[4pt] x - y = 4: & 3 - (-1) &\stackrel{?}{=}& 4 \\[4pt] & 4 &=& 4 \; \checkmark \end{array}

The solution is (3,1)(3, -1).

If one of the equations in a system has only one variable — like x=4x = 4 or y=6y = 6 — its graph is a vertical or horizontal line. You can still graph it on the same plane and find where it crosses the other line exactly the way we’ve been doing.

Solve the system by graphing: {x3y=3, x+y=5}\{x - 3y = -3,\ x + y = 5\}. After graphing both lines, what is the x-coordinate of the point where they intersect?

For the same system, what is the y-coordinate of the intersection point?

Determine the number of solutions of a linear system

We’ve seen that two lines in a plane can intersect, be parallel, or be the same line. This means a system of two linear equations can have exactly one solution, no solution, or infinitely many solutions.

GraphNumber of solutions
2 intersecting lines11
Parallel linesNone
Same lineInfinitely many

We can tell which case we’re in without graphing, just by comparing the slopes and intercepts of the two lines. Write each equation in slope–intercept form (y=mx+by = mx + b) and compare:

SlopesInterceptsType of linesNumber of solutions
DifferentIntersecting11 point
SameDifferentParallelNo solution
SameSameCoincidentInfinitely many solutions
xy

Intersecting

One solution

xy

Parallel

No solution

xy

Coincident

Infinitely many solutions

A system of equations that has at least one solution is called a consistent system; a system with no solution is called an inconsistent 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 as independent or dependent. If two equations are independent equations, they each have their own set of solutions; intersecting lines and parallel lines are both independent. If two equations are dependent, every solution of one equation is also a solution of the other — graphing two dependent equations gives 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.

Example. Without graphing, determine the number of solutions and then classify the system of equations: {2x+y=3x5y=5\left\{\begin{array}{l} 2x + y = -3 \\ x - 5y = 5 \end{array}\right.

We compare the slope and intercept of each line by writing both equations in slope–intercept form. The first equation is already close to that form:

2x+y=3    y=2x3m=2, b=32x + y = -3 \implies y = -2x - 3 \qquad m = -2, \ b = -3

Solve the second equation for yy:

x5y=55y=x+5y=15x1 \begin{array}{rcl} x - 5y &=& 5 \\ -5y &=& -x + 5 \\ y &=& \tfrac{1}{5}x - 1 \end{array}

so m=15m = \tfrac{1}{5}, b=1b = -1. The slopes are different, so the lines intersect. A system of equations whose graphs intersect has one solution and is consistent and independent.

Without graphing, compare the system {y=2x4, 4x+2y=9}\{y = -2x - 4,\ 4x + 2y = 9\}. Solve the second equation for y. What is its slope?

The system {y=2x4, 4x+2y=9}\{y = -2x - 4,\ 4x + 2y = 9\} has two lines with the same slope but different y-intercepts. How many solutions does the system have?

Solve applications of systems of equations by graphing

We use the same problem-solving strategy for applications of systems of equations that we’ve used before, adapted to set up two equations instead of one.

How To: 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 — here, by graphing.
  6. Check the answer in the problem and make sure it makes sense.
  7. Answer the question with a complete sentence.

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

Let f=f = the number of quarts of fruit juice and c=c = the number of quarts of club soda. The total is 1010 quarts, and the fruit juice amount is 44 times the club soda amount:

{f+c=10f=4c\left\{\begin{array}{l} f + c = 10 \\ f = 4c \end{array}\right.

Graphing both equations (with cc on the horizontal axis and ff on the vertical axis) shows where they intersect:

cf(2, 8)f + c = 10f = 4c10100

The point of intersection is (2,8)(2, 8) — that is, c=2c = 2 and f=8f = 8. Check: the fruit juice amount, 88, is indeed 44 times the club soda amount, 22; and 8+2=108 + 2 = 10 quarts total, as required. Sondra needs 88 quarts of fruit juice and 22 quarts of club soda.

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 does Manny need?

For the same orange juice mixture, how many quarts of water does Manny need?

Key terms

system of linear equations — two or more linear equations grouped together. solution of a system of equations — an ordered pair (x,y)(x, y) that makes all the equations in the system true. consistent system — a system of equations with at least one solution. inconsistent system — a system of equations with no solution. independent equations — two equations with different solutions (intersecting or parallel lines). dependent equations — two equations whose solutions are identical (coincident lines).


This section is adapted from Elementary Algebra 2e, Section 5.1: Solve Systems of Equations by Graphing by Lynn Marecek, MaryAnne Anthony-Smith, and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: recreated the two-line coordinate-plane graphs (intersecting, parallel, and coincident cases, and the punch-mixture application) as accessible inline SVGs and the slope/intercept comparisons as markdown tables; omitted the Be Prepared quiz, Media links, and end-of-section exercises; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.