Chapter 8 ยท Systems of linear equations

Graphing Systems: Solve, Count Solutions, Fix Errors

Graph two lines to solve a system, decide whether it has one solution, none or infinitely many, and learn how to find and fix mistakes in graphed work.

20 min read

You can already test whether an ordered pair is a solution of a system of equations, a set of two equations that share the same variables, here xx and yy. A solution of the system is an ordered pair (x,y)(x, y) that makes both equations true. In this lesson, xx and yy stand for real numbers, and you will find solutions yourself by drawing graphs.

The graph of an equation is the set of all points whose coordinates make the equation true. Each equation in the systems here is a linear equation, which means its graph is a straight line. So a point that lies on both lines makes both equations true, and a point that misses one of the lines makes that line's equation false. Solving a system is the same job as finding the points its two lines share.

On every graph in this lesson, the horizontal axis shows xx and the vertical axis shows yy. Both are plain numbers rather than measurements, and each grid square is 1 unit wide and 1 unit tall.

Key concept

Shared points are the solutions

For a system of two linear equations in xx and yy, the solutions are exactly the points that lie on both lines. Count the shared points to count the solutions.

  • The lines cross at one point: exactly one solution.
  • The lines are parallel, meaning different lines in the same plane that never meet: no solution.
  • Both equations give the same line: infinitely many solutions, one for every point on that line.

A drawing only suggests which case you have. Exact coordinates and the equations themselves prove it.

To solve a system by graphing, work through four steps.

  1. For each equation, choose two different values of xx and calculate yy exactly. You now have two exact points on each line.
  2. Plot each pair of points and draw the straight line through them. Two different points fix exactly one straight line.
  3. Look for the point where the two lines cross and read its coordinates.
  4. Check: in both original equations, the ones the problem gives you, replace xx and yy with those coordinates. The point is a solution exactly when both equations come out true.

Step 4 is not optional. A crossing can look as if it sits on a grid point when it is slightly off, and you can draw a line through a wrong point without noticing. The check uses the equations themselves, so it does not depend on the drawing. In this lesson, every crossing sits exactly on a grid point, a point where two grid lines meet.

Worked example

Example 1: One crossing point

Solve the system y=x+1y = x + 1 and y=โˆ’x+5y = -x + 5 by graphing.

  1. Find two exact points for y = x + 1. Choose x = 0 and x = 4, and calculate y each time. Each pair makes the equation true, so the graph of this equation, Line A, passes through (0, 1) and (4, 5).

    x=0โ‡’y=0+1=1x=4โ‡’y=4+1=5x = 0 \Rightarrow y = 0 + 1 = 1 \qquad x = 4 \Rightarrow y = 4 + 1 = 5
  2. Do the same for y = -x + 5. Its graph, Line B, passes through (0, 5) and (4, 1).

    x=0โ‡’y=โˆ’(0)+5=5x=4โ‡’y=โˆ’(4)+5=1x = 0 \Rightarrow y = -(0) + 5 = 5 \qquad x = 4 \Rightarrow y = -(4) + 5 = 1
  3. Plot the four points and draw each line through its two points, as in the figure below. Two points are enough, because two different points fix exactly one straight line. The horizontal axis shows x, the vertical axis shows y, and each grid square is 1 unit. The lines cross at the grid point (2, 3).

  4. Check (2, 3) in the first original equation by replacing x with 2 and y with 3. Both sides equal 3, so the equation is true.

    3=2+13 = 2 + 1
  5. Check (2, 3) in the second original equation. Both sides equal 3 again, so (2, 3) is a solution. The lines are different, because at x = 0 one has y = 1 and the other has y = 5. Two different straight lines share at most one point, so (2, 3) is the only solution.

    3=โˆ’(2)+53 = -(2) + 5

Answer

The solution of the system is (2,3)(2, 3), which means x=2x = 2 and y=3y = 3.

Coordinate grid from x -3 to 7 and y -3 to 7, with a grid step of 1, showing 7 plotted elements. Details: line 1 x plus -1 y equals -1, named Line A; line 1 x plus 1 y equals 5, named Line B; point at (0, 1), named (0, 1); point at (4, 5), named (4, 5); point at (0, 5), named (0, 5); point at (4, 1), named (4, 1); point at (2, 3), named (2, 3).
Line A is y=x+1y = x + 1 and Line B is y=โˆ’x+5y = -x + 5. Each line passes through its two plotted points, and the lines cross at (2,3)(2, 3).

Example 1 had exactly one solution, but not every system does. Solutions are shared points, so the number of solutions of a system is the number of points its two lines share. Two straight lines in the same plane share exactly one point, no point, or all of their points.

A drawing can suggest which of these you have, but it shows only part of each line, so let the equations confirm it. Two terms name what the equations can show. A contradiction is an equation that is false for every value of its variable, so it has no solutions. An identity is an equation that is true for every permitted value of its variable. In this lesson, every real number is a permitted value of xx.

Worked example

Example 2: Lines that never meet

How many solutions does the system y=2x+4y = 2x + 4 and y=2xy = 2x have? Decide by graphing.

  1. Find two exact points for y = 2x + 4 using x = 0 and x = 2. Its graph, Line A, passes through (0, 4) and (2, 8).

    x=0โ‡’y=2(0)+4=4x=2โ‡’y=2(2)+4=8x = 0 \Rightarrow y = 2(0) + 4 = 4 \qquad x = 2 \Rightarrow y = 2(2) + 4 = 8
  2. Use the same x-values for y = 2x. Its graph, Line B, passes through (0, 0) and (2, 4).

    x=0โ‡’y=2(0)=0x=2โ‡’y=2(2)=4x = 0 \Rightarrow y = 2(0) = 0 \qquad x = 2 \Rightarrow y = 2(2) = 4
  3. Plot the points and draw both lines, as in the figure below. The horizontal axis shows x, the vertical axis shows y, and each grid square is 1 unit. At x = 0 and again at x = 2, the point on Line A is exactly 4 units above the point on Line B, so the lines look parallel.

    4โˆ’0=48โˆ’4=44 - 0 = 4 \qquad 8 - 4 = 4
  4. Confirm it with the equations. A shared point would have one x-value and one y-value, so the two expressions for y would have to be equal: 2x + 4 = 2x. Subtract 2x from both sides. Subtracting the same quantity from both sides keeps the same solutions.

    2x+4โˆ’2x=2xโˆ’2xโ‡’4=02x + 4 - 2x = 2x - 2x \quad\Rightarrow\quad 4 = 0
  5. The statement 4 = 0 is false whatever x is, so the equation 2x + 4 = 2x is a contradiction and no value of x gives a shared point. Line A and Line B are different lines that never meet, so they are parallel.

Answer

The system has no solution, because the lines y=2x+4y = 2x + 4 and y=2xy = 2x are parallel and share no point.

Coordinate grid from x -6 to 6 and y -4 to 10, with a grid step of 1, showing 6 plotted elements. Details: line 2 x plus -1 y equals -4, named Line A; line 2 x plus -1 y equals 0, named Line B; point at (0, 4), named (0, 4); point at (2, 8), named (2, 8); point at (0, 0), named (0, 0); point at (2, 4), named (2, 4).
Line A is y=2x+4y = 2x + 4 and Line B is y=2xy = 2x. At x=0x = 0 and at x=2x = 2, the point on Line A is 4 units above the point on Line B.

Worked example

Example 3: The same line twice

How many solutions does the system y=โˆ’x+3y = -x + 3 and 2x+2y=62x + 2y = 6 have? Decide by graphing.

  1. Find two exact points for y = -x + 3 using x = 0 and x = 3. Its graph passes through (0, 3) and (3, 0).

    x=0โ‡’y=โˆ’(0)+3=3x=3โ‡’y=โˆ’(3)+3=0x = 0 \Rightarrow y = -(0) + 3 = 3 \qquad x = 3 \Rightarrow y = -(3) + 3 = 0
  2. Use the same x-values in 2x + 2y = 6. When x = 0, the equation becomes 2y = 6, and dividing both sides by 2 gives y = 3. When x = 3, it becomes 6 + 2y = 6. Subtracting 6 from both sides gives 2y = 0, and dividing both sides by 2 gives y = 0. Dividing by 2 is allowed because 2 is not zero. This graph also passes through (0, 3) and (3, 0).

    2y=6โ‡’y=36+2y=6โ‡’2y=0โ‡’y=02y = 6 \Rightarrow y = 3 \qquad 6 + 2y = 6 \Rightarrow 2y = 0 \Rightarrow y = 0
  3. Two different points fix exactly one straight line. Both graphs are straight lines through (0, 3) and (3, 0), so they are the same line. If you drew the second line, it would lie exactly on top of the first.

  4. Confirm it with the equations. Divide both sides of 2x + 2y = 6 by 2, which is not zero, then subtract x from both sides. Doing each operation to both sides keeps the same solutions. Since 3 - x equals -x + 3 for every value of x, the second equation says the same thing as the first.

    2x+2y=6โ€…โ€Šโ‡’โ€…โ€Šx+y=3โ€…โ€Šโ‡’โ€…โ€Šy=3โˆ’x2x + 2y = 6 \;\Rightarrow\; x + y = 3 \;\Rightarrow\; y = 3 - x
  5. So a shared point needs -x + 3 to equal -x + 3. Add x to both sides, which keeps the same solutions. The result, 3 = 3, is true whatever x is. The equation is an identity, so every value of x gives a point on both lines.

    โˆ’x+3+x=โˆ’x+3+xโ‡’3=3-x + 3 + x = -x + 3 + x \quad\Rightarrow\quad 3 = 3
  6. Test one point on the line and one point off it. The point (1, 2) is on the line and makes both original equations true. The point (0, 0) is off the line and makes both false, because -(0) + 3 is 3, not 0, and 2(0) + 2(0) is 0, not 6.

    2=โˆ’(1)+32(1)+2(2)=2+4=62 = -(1) + 3 \qquad 2(1) + 2(2) = 2 + 4 = 6

Answer

The system has infinitely many solutions: every point on the line y=โˆ’x+3y = -x + 3 is a solution, and no point off that line is.

Two linear equations: what the graph shows and what proves it
What the graph showsNumber of solutionsWhat proves it
The lines cross at one point (Example 1)
Exactly one
The crossing point makes both original equations true, and two different lines share at most one point
The lines are parallel (Example 2)
None
Asking for a shared point leads to a contradiction, such as 4=04 = 0
The lines are the same line (Example 3)
Infinitely many
Asking for a shared point leads to an identity, such as 3=33 = 3, so every point on the line works

The same check helps you find an error in graphed work. If an answer fails in either original equation, it is not a solution, so something went wrong. The usual places to look are a point that was calculated or plotted wrong, a crossing point that was read wrong, or a picture that was trusted too far, as in the warning above. Test each plotted point in its own equation to find the wrong one. Then fix the line, read the crossing again, and check it.

Worked example

Example 4: Find and fix the error

Kai solves the system y=x+3y = x + 3 and y=โˆ’2xy = -2x by graphing. For y=x+3y = x + 3, Kai plots (0,3)(0, 3) and (1,4)(1, 4). For y=โˆ’2xy = -2x, Kai plots (0,0)(0, 0) and (1,2)(1, 2). Kai's two lines cross at (3,6)(3, 6), so Kai answers (3,6)(3, 6). Find the error and correct it.

  1. Check Kai's answer in both original equations. In y = x + 3 it works, because 3 + 3 is 6. In y = -2x it fails, because -2 times 3 is -6, not 6. A solution must make both equations true, so (3, 6) is not a solution.

    6=3+3โˆ’2(3)=โˆ’6โ‰ 66 = 3 + 3 \qquad -2(3) = -6 \neq 6
  2. Find the wrong line by testing each plotted point in its own equation. Kai's points for y = x + 3 are correct, because 0 + 3 is 3 and 1 + 3 is 4. For y = -2x, the point (0, 0) is correct, but (1, 2) is not: when x = 1, y must be -2. Kai dropped the negative sign.

    โˆ’2(0)=0โˆ’2(1)=โˆ’2โ‰ 2-2(0) = 0 \qquad -2(1) = -2 \neq 2
  3. Correct the graph. The line for y = -2x passes through (0, 0) and (1, -2), so it goes down as you move right. Kai's line went up. In the figure below, Line A is y = x + 3, Line B is the corrected line for y = -2x, and Line C is Kai's mistaken line.

  4. Read the new crossing point. The horizontal axis shows x, the vertical axis shows y, and each grid square is 1 unit. Line A and Line B cross at Point D, which is at (-1, 2). Point E, at (3, 6), is where Line A meets Kai's mistaken Line C.

  5. Check (-1, 2) in both original equations. Both are true, so (-1, 2) is a solution. Line A and Line B are different straight lines, so they share no other point and it is the only solution.

    2=โˆ’1+32=โˆ’2(โˆ’1)2 = -1 + 3 \qquad 2 = -2(-1)

Answer

Kai's error was plotting (1,2)(1, 2) instead of (1,โˆ’2)(1, -2) for y=โˆ’2xy = -2x. The correct solution of the system is (โˆ’1,2)(-1, 2).

Coordinate grid from x -6 to 6 and y -6 to 8, with a grid step of 1, showing 5 plotted elements. Details: line 1 x plus -1 y equals -3, named Line A; line 2 x plus 1 y equals 0, named Line B; line 2 x plus -1 y equals 0, named Line C; point at (-1, 2), named Point D; point at (3, 6), named Point E.
Line A is y=x+3y = x + 3, Line B is y=โˆ’2xy = -2x, and Line C is Kai's mistaken line. Point D is at (โˆ’1,2)(-1, 2) and Point E is at (3,6)(3, 6).

Takeaway: The solutions of a system of two linear equations are the points its two lines share. Graph each line from exact points, then count the shared points: one crossing point means exactly one solution, parallel lines mean no solution, and the same line twice means infinitely many solutions. A drawing only suggests the answer, so let the equations confirm it. When an answer fails the check in the original equations, test each plotted point to find the error. Every crossing in this lesson sat exactly on a grid point. Next, you will estimate the solution when two lines cross between grid lines.