Return to the Purplemath home page


Try a demo lesson Join Login to


Index of lessons | Purplemath's lessons in offline form |
Forums | Print this page (print-friendly version) | Find local tutors


Using Slope and y-Intercept to Graph Lines (page 1 of 2)

Given two points (x1, y1) and (x2, y2), the formula for the slope of the straight line going through these two points is:

    slope formula: m = [y1 - y2] / [x1 - x2]

...where the subscripts merely indicate that you have a "first" point (whose coordinates are subscripted with a "1") and a "second" point (whose coordinates are subscripted with a "2"); that is, the subscripts indicate nothing more than the fact that you have two points to work with. Note that the point you pick as the "first" one is irrelevant; if you pick the other point to be "first", then you get the same value for the slope:

    m = (y2 - y1) / (x2 - x1)




(If you're not sure that the two formulas above give exactly the same values, no matter the pair of points plugged into them, then pick some points and try them out. See what you get.)

The formula for slope is sometimes referred to as "rise over run", because the fraction consists of the "rise" (the change in y, going up or down) divided by the "run" (the change in x, going from left to the right). If you've ever done roofing, built a staircase, graded landscaping, or installed gutters or outflow piping, you've probably encountered this "rise over run" concept. The point is that slope tells you how much y is changing for every so much that x is changing.

Pictures can be helpful, so let's look at the line y = ( 2/3 )x – 4; we'll compute the slope, and draw the line.

To find points from the line equation, we have to pick values for one of the variables, and then compute the corresponding value of the other variable. If, say, x = –3, then y = ( 2/3 )(–3) – 4 = –2 – 4 = –6, so the point (–3, –6) is on the line. If x = 0, then y = ( 2/3 )(0) – 4 = 0 – 4 = –4, so the point (0, –4) is on the line. Now that we have two points on the line, we can find the slope of that line from the slope formula:

    slope m = 2/3


Let's look at these two points on the graph:

Copyright © Elizabeth Stapel 2000-2011 All Rights Reserved


plotted points, with line drawn through


In stair-stepping up from the first point to the second point, our "path" can be viewed as forming a right triangle:


'up two, over three'

The distance between the y-values of the two points (that is, the height of the triangle) is the "y2y1" part of the slope formula. The distance between the x-values (that is, the length of the triangle) is the "x2x1" part of the slope formula. Note that the slope is 2/3, or "two over three". To go from the first point to the second, we went "two up and three over". This relationship between the slope of a line and pairs of points on that line is always true.


To get to the "next" point, we can go up another two (to y = –2), and over to the right another three (to x = 3):


With these three points, we can graph the line y = ( 2/3 )x – 4.


another 'up two, over three'

(If you're not sure of that last point, then put 3 in for x, and verify that you get –2 for y.)

Let's try another line equation: y = –2x + 3. We've learned that the number on x is the slope, so m
= –2
for this line. If, say, x = 0, then y = –2(0) + 3 = 0 + 3 = 3. Then the point (0, 3) is on the line. With this information, we can find more points on the line. First, though, you might want to convert the slope value to fractional form, so you can more easily do the "up and over" thing. Any number is a fraction if you put it over "1", so, in this case, it is more useful to say that the slope is m–2/1. That means that we will be going "down two and over one" for each new point.


We'll start at the point we found above, and then go down two and over one to get to the next point:


'down two, over one'


Go down another two, and over another one, to get to the "next" point on y = –2x + 3:


another 'down two, over one'

Then the point (2, –1) is also on this line; with three points, we can graph the line.

Top  |  1 | 2  |  Return to Index  Next >>

Cite this article as:

Stapel, Elizabeth. "Using Slope and y-Intercept to Graph Lines." Purplemath. Available from Accessed



This lesson may be printed out for your personal use.

Content copyright protected by Copyscape website plagiarism search

  Copyright 2000-2014  Elizabeth Stapel   |   About   |   Terms of Use   |   Linking   |   Site Licensing


 Feedback   |   Error?