Skip to content
Family Table Math
Auto

Solving Linear Systems by Graphing

A linear system is two (or more) linear equations that are true at the same time. Solving it means finding the point that works for both, which is where their lines cross. You met this in Grade 9; here you’ll review the graphing method, learn to predict how many solutions a system has without drawing anything, and see why you’ll soon want algebraic methods as well.

A solution of a system of two equations in xx and yy is an ordered pair (x,y)(x, y) that makes both equations true. On a graph, every point on a line satisfies that line’s equation, so a point on both lines is where they intersect.

For example, (2,1)(2, 1) is a solution of the system

y=2x−3y=−x+3\begin{aligned} y &= 2x - 3 \\ y &= -x + 3 \end{aligned}

because 2(2)−3=12(2) - 3 = 1 ✓ and −2+3=1-2 + 3 = 1 ✓. A point that works in only one equation is not a solution.

  1. Graph both lines on the same grid. Use y=mx+by = mx + b (start at bb, then use the slope), or plot the two intercepts.
  2. Read the coordinates of the point where the lines cross.
  3. Check the point in both original equations.
  4. State the solution as an ordered pair.

Two lines in a plane can meet in only three ways:

Three pairs of lines: crossing at one point, parallel and never meeting, and lying on top of each other −4 −2 2 4 −4 −2 2 4 One solution different slopes −4 −2 2 4 −4 −2 2 4 No solution same slope, different b −4 −2 2 4 −4 −2 2 4 Infinitely many same slope, same b
Different slopes give one solution; parallel lines give none; the same line gives infinitely many.
The lines are…Slopes and interceptsNumber of solutions
intersectingdifferent slopesexactly one
parallel and distinctsame slope, different yy-interceptsnone
the same line (coincident)same slope, same yy-interceptinfinitely many

So you can predict the number of solutions by writing both equations in the form y=mx+by = mx + b and comparing mm and bb, without graphing at all. When there are infinitely many solutions, every point on the line is a solution.

Graphing shows the whole picture, but it is only as accurate as your drawing. If the lines cross at a point like (53,83)\left(\tfrac{5}{3}, \tfrac{8}{3}\right), you can only estimate it from a grid. To get exact answers every time, use the algebraic methods: substitution and elimination. Graphing technology such as Desmos can find intersections accurately, and it’s a great way to check your algebra.

Example 1: Two lines in slope–intercept form

Section titled “Example 1: Two lines in slope–intercept form”

Solve the system by graphing.

y=2x−3y=−x+3\begin{aligned} y &= 2x - 3 \\ y &= -x + 3 \end{aligned}

Solution. Graph each line from its yy-intercept:

  • y=2x−3y = 2x - 3: start at (0,−3)(0, -3), then go up 22 and right 11, to (1,−1)(1, -1), (2,1)(2, 1), (3,3)(3, 3).
  • y=−x+3y = -x + 3: start at (0,3)(0, 3), then go down 11 and right 11, to (1,2)(1, 2), (2,1)(2, 1), (3,0)(3, 0).

Both lists contain (2,1)(2, 1), so the lines cross there.

Check in the first equation: 2(2)−3=12(2) - 3 = 1 ✓. Check in the second: −2+3=1-2 + 3 = 1 ✓.

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

Solve the system by graphing.

x+y=52x−y=4\begin{aligned} x + y &= 5 \\ 2x - y &= 4 \end{aligned}

Solution. Both equations are in the form Ax+By=DAx + By = D, so intercepts are the quickest way to graph them.

  • x+y=5x + y = 5: when x=0x = 0, y=5y = 5; when y=0y = 0, x=5x = 5. Plot (0,5)(0, 5) and (5,0)(5, 0).
  • 2x−y=42x - y = 4: when x=0x = 0, −y=4-y = 4, so y=−4y = -4; when y=0y = 0, 2x=42x = 4, so x=2x = 2. Plot (0,−4)(0, -4) and (2,0)(2, 0).
The lines x + y = 5 and 2x - y = 4 drawn through their intercepts, crossing at (3, 2) −1 1 3 4 6 −3 −2 −1 1 2 3 4 (3, 2) x + y = 5 2x − y = 4
Each line is drawn through its two intercepts. They cross at (3,2)(3, 2).

The lines appear to cross at (3,2)(3, 2).

Check: 3+2=53 + 2 = 5 ✓ and 2(3)−2=42(3) - 2 = 4 ✓. The solution is (3,2)(3, 2).

Without graphing, find the number of solutions of each system.

  • (a) y=3x+1y = 3x + 1 and 6x−2y=−26x - 2y = -2
  • (b) 2x+y=42x + y = 4 and y=−2x−1y = -2x - 1
  • (c) y=12x+4y = \dfrac{1}{2}x + 4 and x+y=1x + y = 1

Solution. Write each equation in the form y=mx+by = mx + b, then compare.

(a) 6x−2y=−26x - 2y = -2 gives −2y=−6x−2-2y = -6x - 2, so y=3x+1y = 3x + 1. That’s the same slope and the same intercept as the first equation: the same line, so infinitely many solutions.

(b) 2x+y=42x + y = 4 gives y=−2x+4y = -2x + 4. Both slopes are −2-2, but the intercepts are 44 and −1-1. The lines are parallel: no solution.

(c) x+y=1x + y = 1 gives y=−x+1y = -x + 1. The slopes are 12\dfrac{1}{2} and −1-1, which are different, so the lines cross once: exactly one solution.

Example 4: When graphing can only estimate

Section titled “Example 4: When graphing can only estimate”

Solve the system y=x+1y = x + 1 and y=−2x+6y = -2x + 6 by graphing, and check your answer.

Solution. Graph both lines. They cross between grid lines, at roughly (1.7,2.7)(1.7, 2.7).

Check the estimate. In the first equation: 1.7+1=2.71.7 + 1 = 2.7 ✓. In the second: −2(1.7)+6=2.6-2(1.7) + 6 = 2.6, not 2.72.7. The estimate is close but not exact.

Since both equations are solved for yy, set the right sides equal (the comparison method from Grade 9):

x+1=−2x+63x=5x=53\begin{aligned} x + 1 &= -2x + 6 \\ 3x &= 5 \\ x &= \frac{5}{3} \end{aligned}

Then y=53+1=83y = \dfrac{5}{3} + 1 = \dfrac{8}{3}. The exact solution is (53,83)\left(\dfrac{5}{3}, \dfrac{8}{3}\right), about (1.67,2.67)(1.67, 2.67). The graph got you close; the algebra got you the exact answer.

Checking the point in only one equation. A solution must satisfy both equations. A point that’s on one line only isn’t a solution, so always check both.

Trusting an estimate as exact. When the lines cross between grid lines, your reading is approximate. If the check doesn’t work exactly, solve algebraically, or say clearly that the answer is an estimate.

Saying “no solution” when the lines are the same. If both equations simplify to the same y=mx+by = mx + b, every point on the line works: there are infinitely many solutions, not none.

Comparing coefficients instead of slopes. In 2x+y=42x + y = 4 the slope is −2-2, not 22. Rewrite both equations as y=mx+by = mx + b before you compare.

Sloppy graphs. A small error in a slope or an intercept moves the intersection a lot. Use a ruler, plot at least two points per line (three is safer), and label each line.

1. (Warm-up) Decide whether each point is a solution of the system.

  • (a) (3,−1)(3, -1) for x+2y=1x + 2y = 1 and 2x−y=72x - y = 7
  • (b) (1,2)(1, 2) for y=3x−1y = 3x - 1 and x+y=4x + y = 4
Solution

(a) 3+2(−1)=13 + 2(-1) = 1 ✓ and 2(3)−(−1)=72(3) - (-1) = 7 ✓. Yes, (3,−1)(3, -1) is a solution.

(b) 3(1)−1=23(1) - 1 = 2 ✓, but 1+2=3≠41 + 2 = 3 \ne 4 ✗. No: the point is on the first line only.

2. (Warm-up) Solve by graphing: y=x+2y = x + 2 and y=−x+4y = -x + 4.

Solution

Points on y=x+2y = x + 2: (0,2)(0, 2), (1,3)(1, 3), (2,4)(2, 4). Points on y=−x+4y = -x + 4: (0,4)(0, 4), (1,3)(1, 3), (2,2)(2, 2). The lines cross at (1,3)(1, 3).

Check: 1+2=31 + 2 = 3 ✓ and −1+4=3-1 + 4 = 3 ✓. The solution is (1,3)(1, 3).

3. (Core) Solve by graphing, using intercepts: 2x+3y=122x + 3y = 12 and x−y=1x - y = 1.

Solution

2x+3y=122x + 3y = 12 has intercepts (6,0)(6, 0) and (0,4)(0, 4). x−y=1x - y = 1 has intercepts (1,0)(1, 0) and (0,−1)(0, -1). The lines cross at (3,2)(3, 2).

Check: 2(3)+3(2)=122(3) + 3(2) = 12 ✓ and 3−2=13 - 2 = 1 ✓. The solution is (3,2)(3, 2).

4. (Core) Without graphing, state the number of solutions of each system. Explain.

  • (a) y=−4x+2y = -4x + 2 and 8x+2y=48x + 2y = 4
  • (b) 3x−y=53x - y = 5 and y=3x+2y = 3x + 2
  • (c) x=2x = 2 and y=−3y = -3
Solution

(a) 8x+2y=48x + 2y = 4 gives 2y=−8x+42y = -8x + 4, so y=−4x+2y = -4x + 2. Same line: infinitely many solutions.

(b) 3x−y=53x - y = 5 gives y=3x−5y = 3x - 5. Both slopes are 33, with intercepts −5-5 and 22. Parallel lines: no solution.

(c) A vertical line and a horizontal line always cross once: exactly one solution, (2,−3)(2, -3).

5. (Core) Solve the system x=−1x = -1 and y=2x+5y = 2x + 5.

Solution

Every point on x=−1x = -1 has xx-coordinate −1-1. On the second line, when x=−1x = -1, y=2(−1)+5=3y = 2(-1) + 5 = 3. The lines cross at (−1,3)(-1, 3).

6. (Core) Gym A charges a $40 sign-up fee plus $15 a month. Gym B has no sign-up fee and charges $25 a month.

  • (a) Write an equation for the total cost CC (in dollars) of each gym after nn months.
  • (b) Graph both equations and find where they cross. What does that point mean?
  • (c) Which gym is cheaper for a full year?
Solution

(a) Gym A: C=15n+40C = 15n + 40. Gym B: C=25nC = 25n.

(b) Gym A’s line starts at (0,40)(0, 40) and rises 1515 per month; Gym B’s starts at (0,0)(0, 0) and rises 2525 per month. They cross at (4,100)(4, 100).

Check: 15(4)+40=10015(4) + 40 = 100 ✓ and 25(4)=10025(4) = 100 ✓. After 44 months, both gyms have cost $100 in total.

(c) After 44 months, Gym B’s line is above Gym A’s, because it rises faster. For 1212 months, Gym A costs 15(12)+40=22015(12) + 40 = 220 dollars and Gym B costs 25(12)=30025(12) = 300 dollars, so Gym A is cheaper.

7. (Core) The lines y=2xy = 2x and x+y=4x + y = 4 cross between grid lines.

  • (a) Estimate the solution from a graph.
  • (b) Find the exact solution by substituting y=2xy = 2x into the second equation.
Solution

(a) The lines cross at roughly (1.3,2.7)(1.3, 2.7).

(b) Replace yy with 2x2x: x+2x=4x + 2x = 4, so 3x=43x = 4 and x=43x = \dfrac{4}{3}. Then y=2⋅43=83y = 2 \cdot \dfrac{4}{3} = \dfrac{8}{3}.

The exact solution is (43,83)\left(\dfrac{4}{3}, \dfrac{8}{3}\right). Check: 43+83=123=4\dfrac{4}{3} + \dfrac{8}{3} = \dfrac{12}{3} = 4 ✓.

8. (Challenge) For what value of kk does the system y=kx+3y = kx + 3 and 4x−2y=64x - 2y = 6 have no solution? Is there any value of kk that gives infinitely many solutions?

Solution

4x−2y=64x - 2y = 6 gives −2y=−4x+6-2y = -4x + 6, so y=2x−3y = 2x - 3.

No solution means parallel lines: equal slopes and different intercepts. The intercepts are 33 and −3-3, which are always different, so k=2k = 2 gives no solution.

Infinitely many solutions would need the same intercept too, but 3≠−33 \ne -3. So no value of kk gives infinitely many solutions.

9. (Challenge) Find the values of aa and bb that make the system ax+2y=8ax + 2y = 8 and 3x+y=b3x + y = b have infinitely many solutions.

Solution

Solve both equations for yy:

y=−a2x+4y=−3x+by = -\frac{a}{2}x + 4 \qquad\qquad y = -3x + b

For the same line, the slopes must match and the yy-intercepts must match:

−a2=−3  ⇒  a=6b=4-\frac{a}{2} = -3 \;\Rightarrow\; a = 6 \qquad\qquad b = 4

Check: with a=6a = 6 the first equation is 6x+2y=86x + 2y = 8; dividing by 22 gives 3x+y=43x + y = 4, exactly the second equation. ✓