Graphing Lines Worksheets

Find the slope between two points, graph lines in the form y = mx + b, and write the equation of a line from its graph. Grades 7–9.

Ctrl+P to print worksheet Ctrl+R to randomize

What these worksheets practise

A straight line on a grid can be described by two numbers: how steep it is (the slope, mm) and where it crosses the yy-axis (the y-intercept, bb). Together they give the equation y=mx+by = mx + b. Every problem is printed on its own coordinate grid from −6-6 to 66, and every point you need sits exactly on a grid corner.

  • Easy — find the slope of the line through two marked points.
  • Medium — graph a line given as y=mx+by = mx + b. The answer sheet shows each correct graph.
  • Hard — write the equation of a line drawn on the grid.

The steps below start with plotting a single point. Steps 1–3 are enough for Easy worksheets, step 4 is for Medium and step 5 for Hard.

Watch: slope, y = mx + b and graphing a line (3:43)

Read the transcript

Let's learn how to graph a straight line, and how to write its equation.

A point (x, y) is reached from the origin, the center of the grid. Move x squares right, or left if negative, then y squares up, or down if negative. (3, 2) is 3 right and 2 up. (−4, 1) is 4 left and 1 up. (0, −5) is not left or right at all, just 5 down.

Slope tells how steep a line is. Going from one point to another, count the rise, up or down, and the run, to the right. Slope is rise over run. From (1, 2) to (4, 8), the rise is 8 − 2 = 6 and the run is 4 − 1 = 3. So m = 6/3 = 2. A line that goes down as you move right has a negative slope. From (0, 4) to (2, 0), the rise is −4 and the run is 2, so m = −2. A flat line has slope 0.

Rise and run don't have to divide evenly. From (−4, 1) to (2, 4), the rise is 3 and the run is 6, so m = 3/6 = 1/2: up 1 for every 2 to the right. You can start from either point, as long as you subtract in the same order on top and bottom: 1 − 4 = −3 and −4 − 2 = −6, and −3/−6 is still 1/2.

In y = mx + b, the number b is where the line crosses the y-axis, at the point (0, b), and m is the slope. To graph y = 2/3 x − 1, start at (0, −1). The slope 2/3 means up 2 for every 3 to the right. That lands on (3, 1), then (6, 3). Going the other way, down 2 for every 3 to the left, gives (−3, −3). Join the points with a ruler. To check, put a point into the equation. For x = 3, two thirds of 3 is 2, and 2 − 1 = 1. That matches (3, 1).

Now work backwards, from a graph to its equation. Read b where the line crosses the y-axis: here at (0, −3), so b = −3. The line also passes through (3, −5). The rise is −5 − (−3) = −2 and the run is 3, so m = −2/3. So the equation is y = −2/3 x − 3. Check with the point (3, −5): negative two thirds of 3 is −2, and −2 − 3 = −5. It fits.

Watch out for these common mistakes. Run over rise. From (0, 0) to (4, 2), the slope is 2/4 = 1/2, not 2. The rise goes on top. Subtracting in different orders: (8 − 2) over (1 − 4) gives −2 instead of 2. Take both differences from the same point. Starting at (b, 0). For y = 2x + 3, the line starts at (0, 3) on the y-axis, not at (3, 0). A negative slope drawn uphill. For y = −2x + 1, each step right goes 2 down. Negative slopes fall from left to right.

Practise with free graphing lines worksheets and answer keys at mathgem.ca.

Worked examples, one step at a time

Step 1: plotting a point

A point (x,y)(x, y) is reached from the center of the grid, the origin: move xx squares right (left if negative), then yy squares up (down if negative). (3,2)(3, 2) is 3 right and 2 up; (−4,1)(-4, 1) is 4 left and 1 up; (0,−5)(0, -5) is not left or right at all, just 5 down.

Step 2: slope is rise over run

To go from one point of a line to another, count how far you move up or down (the rise) and how far you move right (the run). The slope is rise divided by run. From (1,2)(1, 2) to (4,8)(4, 8) the rise is 8−2=68 - 2 = 6 and the run is 4−1=34 - 1 = 3:

m=riserun=8−24−1=63=2m = \frac{\text{rise}}{\text{run}} = \frac{8 - 2}{4 - 1} = \frac{6}{3} = 2

A line that goes down as you move right has a negative slope. From (0,4)(0, 4) to (2,0)(2, 0): m=0−42−0=−42=−2m = \frac{0 - 4}{2 - 0} = \frac{-4}{2} = -2. A flat line has slope 0.

Step 3: slopes that are fractions

Rise and run do not have to divide evenly. From (−4,1)(-4, 1) to (2,4)(2, 4) the rise is 3 and the run is 6, so m=36=12m = \frac{3}{6} = \frac{1}{2}: the line goes up 1 for every 2 to the right. It does not matter which point you start from, as long as you subtract in the same order on top and bottom:

4−12−(−4)=36=121−4−4−2=−3−6=12\frac{4 - 1}{2 - (-4)} = \frac{3}{6} = \frac{1}{2} \qquad\qquad \frac{1 - 4}{-4 - 2} = \frac{-3}{-6} = \frac{1}{2}

Step 4: graphing y=mx+by = mx + b

In y=mx+by = mx + b, the number bb is where the line crosses the yy-axis, at the point (0,b)(0, b), and mm is the slope. To graph y=23x−1y = \tfrac{2}{3}x - 1: start at (0,−1)(0, -1). The slope 23\tfrac{2}{3} means up 2 for every 3 to the right, which lands on (3,1)(3, 1), then (6,3)(6, 3). Going the other way, down 2 for every 3 to the left, gives (−3,−3)(-3, -3). Join the points with a ruler.

5−55−5

To check, put a plotted point into the equation: for x=3x = 3, 23⋅3−1=2−1=1\tfrac{2}{3} \cdot 3 - 1 = 2 - 1 = 1, which matches the point (3,1)(3, 1).

Step 5: writing the equation from a graph

Work backwards. Read bb where the line crosses the yy-axis, then find the slope from two marked points. If a line crosses the yy-axis at (0,−3)(0, -3) and also passes through (3,−5)(3, -5), the rise is −5−(−3)=−2-5 - (-3) = -2 and the run is 3:

m=−23=−23y=−23x−3m = \frac{-2}{3} = -\frac{2}{3} \qquad\qquad y = -\frac{2}{3}x - 3

Check your answers

Every marked point must satisfy the equation. For (3,−5)(3, -5): −23⋅3−3=−2−3=−5-\tfrac{2}{3} \cdot 3 - 3 = -2 - 3 = -5. If one point does not fit, the slope or the intercept is wrong.

Common mistakes

  • Run over rise. Slope is the vertical change on top: from (0,0)(0, 0) to (4,2)(4, 2) the slope is 24=12\tfrac{2}{4} = \tfrac{1}{2}, not 2.
  • Subtracting in different orders. 8−21−4\frac{8 - 2}{1 - 4} gives −2-2 instead of 2. Take both differences from the same point.
  • Starting at (b,0)(b, 0). The intercept bb is on the yy-axis, the vertical one: for y=2x+3y = 2x + 3 the line starts at (0,3)(0, 3), not (3,0)(3, 0).
  • A negative slope drawn uphill. For y=−2x+1y = -2x + 1, each step right goes 2 down. A quick look at the finished line catches this: negative slopes fall from left to right.

Sample problems

These problems come from the same generator as the worksheet above, two at each difficulty level. Press Generate for a fresh set.

Easy

  1. Find the slope of the line through (3,−2)(3, -2) and (−3,−1)(-3, -1).
    5−55−5
  2. Find the slope of the line through (−3,1)(-3, 1) and (3,−3)(3, -3).
    5−55−5

Medium

  1. Graph the line y=3x−3y = 3x - 3.
    5−55−5
  2. Graph the line y=−23x+3y = -\frac{2}{3}x + 3.
    5−55−5

Hard

  1. Write the equation of the line, in the form y=mx+by = mx + b.
    5−55−5
  2. Write the equation of the line, in the form y=mx+by = mx + b.
    5−55−5
Show answers
  1. m=−16m = -\frac{1}{6}
  2. m=−23m = -\frac{2}{3}
  3. y=3x−3y = 3x - 35−55−5
  4. y=−23x+3y = -\frac{2}{3}x + 35−55−5
  5. y=−32x+3y = -\frac{3}{2}x + 3
  6. y=13x+3y = \frac{1}{3}x + 3

Tips for teachers and parents

  • Have students mark at least three points before drawing a line. If they do not line up, one of them is wrong.
  • Drawing the rise and run as two arrows, one up or down and one across, makes the slope visible on Easy worksheets.
  • The same idea of a constant rate appears in ratios and proportions: a slope of 23\tfrac{2}{3} is a ratio of 2 to 3.

Related topics