Skip to content
Study Hall
Lesson 3 of 6Linear and Non-Linear Relations
Unit 5 · Lesson 3 of 6

Slope, y-Intercept and y = mx + b

Measure the steepness of a line as rise over run, find the slope from two points, a table or a graph, read the y-intercept, and write the equation of a line in the form y = mx + b.

7 min read8 quick checks11 practice questionsAsk AI about this →

Key things to remember

  1. 1Slope: for any two points with .
  2. 2Positive slope: the line rises left to right. Negative: it falls. Zero: horizontal. Vertical lines: slope undefined.
  3. 3The -intercept is the -coordinate of the point where the line crosses the -axis, .
  4. 4Slope-intercept form: , where is the slope (rate of change) and is the -intercept (initial value).
  5. 5To find from a point and the slope, substitute both into and solve for .

A wheelchair ramp cannot be too steep, or it becomes dangerous to use. Accessibility rules limit ramps to a gentle steepness; a common rule, used in Ontario's building code for barrier-free ramps, allows at most 1 unit of height for every 12 units of horizontal length, and some standards ask for an even gentler slope. Roofers talk about a roof's pitch, and road signs warn of a "10% grade" before a steep hill. All of these describe the same idea, the slope of a line: how far it goes up or down for each step across. In the last lesson you met the rate of change of a linear relation. Slope is the same number, read straight off a graph. In this lesson you will calculate slope several ways and combine it with one more number, the -intercept, to write the equation of any non-vertical line.

A concrete ramp with metal railings that zigzags upward in several sections toward a footbridge, beside a railway track.
PhotoInstead of climbing straight up, this ramp to a footbridge in Auckland zigzags back and forth. Each section rises only a little over a long run, which keeps the slope gentle.Ingolfson, Public domain, via Wikimedia Commons

Slope is rise over run

Pick two points on a line. The rise is the vertical change from the first point to the second: positive if you go up, negative if you go down. The run is the horizontal change: positive if you go right. The slope, written , is the rise divided by the run. Because a line is straight, it does not matter which two points you pick: a bigger triangle has a bigger rise and a bigger run in the same proportion, so the quotient is always the same. If the points are and , the rise is and the run is .

−5−4−3−2−1123456−3−2−11234560xyrun = 3 − (−3) = 6rise = 3 − (−1) = 4A(−3, −1)B(3, 3)(0, 1): b = 1Slope from A and Bm = rise ÷ run = 4 ÷ 6 = 2/3y-intercept: b = 1Equation:y = (2/3)x + 1Check B: (2/3)(3) + 1 = 2 + 1 = 3 ✓
Fig 1The line y = (2/3)x + 1 through A(−3, −1) and B(3, 3), with a slope triangle of run 6 and rise 4 and the y-intercept (0, 1) marked
SlopeWhat the line does (left to right)Example
PositiveRises
NegativeFalls
ZeroHorizontal: the rise is 0
UndefinedVertical: the run is 0, and you cannot divide by 0
What the sign of the slope tells you
Quick checkTry it before you read on
1
A line rises 6 units for every 2 units it runs to the right. What is its slope?
Quick checkTry it before you read on
2
Which line has an undefined slope?
VideoKhan Academy builds the idea of slope as the change in y divided by the change in x, with lines that rise and lines that fall.Watch on YouTube

Slope from two points

For and : the rise is and the run is , so . Reduce the fraction, the way you would any fraction. You can also subtract the other way round, , and get the same slope, as long as you subtract in the same order on top and bottom. Mixing orders flips the sign. Be extra careful with negative coordinates: subtracting a negative means adding.

From A to BFrom B to A−4−224−4−2240xyrun = +6rise = +4A(−3, −1)B(3, 3)−4−224−4−2240xyrun = −6rise = −4A(−3, −1)B(3, 3)m = (3 − (−1)) ÷ (3 − (−3))= 4 ÷ 6 = 2/3m = (−1 − 3) ÷ (−3 − 3)= (−4) ÷ (−6) = 2/3Mixing the orders, (3 − (−1)) ÷ (−3 − 3) = 4 ÷ (−6), gives −2/3: the wrong sign.
Fig 2The slope of the line through A(−3, −1) and B(3, 3) found both ways: from A to B the run is +6 and the rise is +4; from B to A the run is −6 and the rise is −4. Both give 2/3.
Quick checkTry it before you read on
1
Find the slope of the line through and .
Quick checkTry it before you read on
2
Mia finds the slope through and as . What happens?

The y-intercept and slope-intercept form

The y-intercept is where a line crosses the -axis. Every point on the -axis has , so the -intercept is the point , and we usually just call the number the -intercept. A non-vertical line with slope and -intercept has the equation , called slope-intercept form. This is the "rate of change and initial value" form from the last lesson: is the rate of change and is the initial value. For the line in the figure, and , so . To graph , plot , then use the rise and run of to reach a second point, and draw the line through both.

−1123456789−22460xyright 4down 3right 4down 3b = 6(4, 3)y = −(3/4)x + 61. b = 6: plot (0, 6)2. m = −3/4: rise −3 for run 43. right 4, down 3: (4, 3)4. again: (8, 0)5. draw the line through themCheck (8, 0):−(3/4)(8) + 6 = −6 + 6 = 0 ✓
Fig 3Graphing y = −(3/4)x + 6: plot the y-intercept (0, 6), then step right 4 and down 3 to (4, 3) and again to (8, 0), and draw the line through the points.
Quick checkTry it before you read on
1
What are the slope and the -intercept of ?
Quick checkTry it before you read on
2
To graph , you plot , then move 2 right and 1 up. What is the -coordinate of the point you reach?
VideoAn Ontario teacher reads the slope and y-intercept from y = mx + b and uses them to graph and write equations of lines.Watch on YouTube

Writing the equation from a graph, a table, two points or a description

  1. From a graph: read where the line crosses the -axis, then pick two points exactly on grid corners and find rise over run. Check the scale of each axis first: one grid square is not always 1 unit.
  2. From a table: the slope is the change in divided by the change in between rows. The -value in the row where is ; if there is no such row, work backward with the slope.
  3. From two points: find with the slope formula, then substitute one point and into and solve for .
  4. From a description: the amount added or lost per unit is (negative when it decreases), and the starting amount is .
Lines that break the pattern
A horizontal line has slope , so , which is just . A vertical line, such as , has a run of between any two of its points, so its slope is undefined. A vertical line has no slope-intercept form at all: its equation is , and it cannot be written as .
Graphing with a negative fractional slope
To graph , plot . Read the slope as rise over run : move 4 right and 3 down to . Join the points. Check: ✓.
Quick checkTry it before you read on
1
A line passes through and . Write its equation in the form y = mx + b.
Quick checkTry it before you read on
2
A horizontal line passes through . What is its equation?

Worked examples

Reveal one step at a time and try to beat it to the next line.

Example 1
Find the slope of the line through and , then write its equation.
Example 2
Write the equation of the line through and .
Example 3
Write the equation of the linear relation in this table: : and : .
Example 4
A phone starts at 85% battery and loses 5% each hour of video. Write an equation for the battery level (in %) after hours, and find when it reaches 20%.

Where marks get lost

  • Dividing run by rise. For and the slope is , not .
  • Subtracting in different orders on top and bottom, such as , which gives the right size but the wrong sign. Watch negatives too: is , not .
  • Reading from where the line crosses the -axis instead of the -axis.
  • Saying a vertical line has slope 0. A horizontal line has slope 0; a vertical line's slope is undefined because its run is 0.
  • Counting grid squares without checking the scale. If each square on the y-axis is 5 units, a rise of 2 squares is 10, not 2.

Flashcards 8

Slope
Slope formula
Rise
Run
+ 4 more

Practice

1
Find the slope of the line through and .
2
Find the slope of the line through and .
3
A line passes through and . What is its slope? Give a decimal.
4
Write the equation of the line with slope 4 and -intercept , in the form y = mx + b.
5
A line has slope 2 and passes through . What is its -intercept ?
6
Which equation fits the table : and : ?
7
For the line , what is when ?
8
Match each equation to the description of its graph.
y = 2x + 1
y = −2x + 1
y = 2x − 1
y = 1
x = 1
9
Put these steps in order to graph y = (2/3)x − 1.
  1. 1Plot the point (0, −1)
  2. 2Draw a straight line through the two points
  3. 3From (0, −1), move 3 right and 2 up to plot (3, 1)
  4. 4Identify the slope 2/3 and the y-intercept −1
10
A ramp rises 0.5 m over a horizontal distance of 6 m. What is its slope?
11
Kai says the slope through and is . What went wrong?

Spot a mistake on this page? Let us know