Slope and Intercepts

Learning goals

  • Read mm and bb straight off y=mx+by = mx + b
  • Derive the form from point-slope using (0,b)(0, b)
  • Graph by plotting the intercept, then stepping by the slope
  • Convert a linear equation by solving for yy
  • Find the xx-intercept by setting y=0y = 0
  • Handle the horizontal, vertical and through-the-origin special cases

From point-slope to slope-intercept form

Point-slope form works with any point on a nonvertical line. Choosing the yy-intercept makes the algebra especially short: it lies on the yy-axis, so its xx-coordinate is 00. Write it as (0,b)(0,b), where bb is the crossing height.

Deriving slope-intercept form from point-slope form#

Take slope 44 and the point (0,3)(0,3). Point-slope form gives

y−3=4(x−0)y−3=4xy=4x+3.\begin{aligned} y-3&=4(x-0)\\ y-3&=4x\\ y&=4x+3. \end{aligned}

The slope 44 and crossing height 33 appear directly in the result. For any slope mm and yy-intercept (0,b)(0,b), use the same steps:

y−b=m(x−0)y−b=mxy=mx+b.\begin{aligned} y-b&=m(x-0)\\ y-b&=mx\\ y&=mx+b. \end{aligned}

We can check both meanings from this equation. Set x=0x=0: it gives y=by=b, so (0,b)(0,b) is on the line. For any other point (x,mx+b)(x,mx+b), we have x≠0x\ne0, and its slope from (0,b)(0,b) is

(mx+b)−bx−0=mxx=m.\frac{(mx+b)-b}{x-0}=\frac{mx}{x}=m.

Thus y=mx+by=mx+b describes a line with slope mm and yy-intercept (0,b)(0,b).

Reading the slope and the intercept

Once an equation is written as y=mx+by = mx + b, you can read the slope and the intercept straight off. In that form the slope mm is the number multiplying xx, and bb is the constant, which fixes the yy-intercept at (0,b)(0, b). The only care needed is to read each number with its own sign, and to make sure the equation is actually in this form before you read it.

Worked example 1 Read the slope and yy-intercept from an equation

Each line below is written as y=mx+by = mx + b (or can be with one small step), so match the pieces to mm and bb.

EquationSlope mmyy-intercept (0,b)(0, b)
y=3x−4y = 3x - 433(0,−4)(0, -4)
y=−2x+5y = -2x + 5−2-2(0,5)(0, 5)
y=5−2xy = 5 - 2x−2-2(0,5)(0, 5)
y=23xy = \tfrac{2}{3}x23\tfrac{2}{3}(0,0)(0, 0)
y=7y = 700(0,7)(0, 7)

Several of these rows need care. In y=3x−4y = 3x - 4 the constant is −4-4, so the intercept is (0,−4)(0, -4), not (0,4)(0, 4): carry the minus sign. The line y=5−2xy = 5 - 2x lists its terms out of order, and the slope is the coefficient of xx, which is −2-2, not the leading 55. Rewriting it as y=−2x+5y = -2x + 5 puts the slope back where you expect it. In y=23xy = \tfrac{2}{3}x there is no visible constant, so b=0b = 0 and the line passes through the origin. And y=7y = 7 can be read as y=0x+7y = 0x + 7, a slope of 00 with intercept (0,7)(0, 7).

You can also work backward: given the slope and yy-intercept, put their values into y=mx+by=mx+b. Try this with the figure’s controls. Start with rise 33, run 44 and crossing −2-2 to get y=(3/4)x−2y=(3/4)x-2.

Change the crossing to 00: the constant term disappears, leaving y=(3/4)xy=(3/4)x. Next set the rise to 00: the xx-term disappears too, giving the horizontal line y=0y=0. Finally make the rise negative. The negative sign now belongs to the coefficient of xx, and the line falls to the right. Watch which term each control changes.

Build the equation from its slope and intercept

y = (3/4)x - 2. Rise 3 over run 4 is a slope of 3/4, so from any point on the line, 4 to the right and 3 up lands back on it. And it crosses the vertical axis at -2. A coordinate plane with a straight line drawn across it. Use the controls below the figure to change the rise, the run, where the line crosses the vertical axis. -6 -4 -2 2 4 6 -6 -4 -2 2 4 6
Rise Run Crosses at

y = (3/4)x - 2. Rise 3 over run 4 is a slope of 3/4, so from any point on the line, 4 to the right and 3 up lands back on it. And it crosses the vertical axis at -2.

A line on a coordinate plane whose slope and crossing point are set separately, the slope through the rise and run that form it. The readout writes the line's equation in slope-intercept form for whatever the controls are set to.

Worked example 2 Write y=mx+by = mx + b from a slope and a yy-intercept

Suppose a line has slope −4-4 and crosses the yy-axis at (0,3)(0, 3). Here m=−4m = -4 and b=3b = 3, so substitute directly:

y=−4x+3.y = -4x + 3.

Now suppose a graph shows a line crossing the yy-axis at (0,−2)(0, -2) and climbing with slope 12\tfrac{1}{2}. Read the two numbers off the picture, b=−2b = -2 and m=12m = \tfrac{1}{2}, and write

y=12x−2.y = \tfrac{1}{2}x - 2.

No point-slope step is needed, because the yy-intercept is the one point the form is built to use.

Check your understanding

Written as y=mx+by = mx + b, what are the slope and yy-intercept of the line y=5−2xy = 5 - 2x?

Answer choices

Graphing from slope-intercept form

The yy-intercept gives a point without calculation, and two different points fix a line. Plot the yy-intercept (0,b)(0,b), then read the slope as rise over run. Step across by the run and up or down by the rise to reach a second point. Draw the line through those two points and extend it in both directions.

Graphing y = (1/2)x + 1 from its y-intercept and slopeThe line y = (1/2)x + 1 through the y-intercept (0, 1) and the point (2, 2), with a slope triangle marking a run of 2 across and a rise of 1 up.xy1202(0, 1)(2, 2)run = 2rise = 1y = (1/2)x + 1
Graphing y = (1/2)x + 1 from slope-intercept form. Plot the y-intercept (0, 1) first, then read the slope 1/2 as a run of 2 and a rise of 1 to step to the second point (2, 2). The line through those two points is the graph.

Worked example 3 Graph y=12x+1y = \tfrac{1}{2}x + 1 from slope-intercept form

Match the equation to y=mx+by = mx + b: the slope is m=12m = \tfrac{1}{2} and the intercept is b=1b = 1. Plot the yy-intercept (0,1)(0, 1) on the yy-axis. Then read the slope 12\tfrac{1}{2} as a run of 22 and a rise of 11, and step from (0,1)(0, 1) two units right and one unit up:

(0,1)  ⟶  (0+2, 1+1)=(2,2).(0, 1) \;\longrightarrow\; (0 + 2,\ 1 + 1) = (2, 2).

Plot (2,2)(2, 2), then draw the straight line through the two points and extend it both ways. That line is the graph of y=12x+1y = \tfrac{1}{2}x + 1, exactly the figure above. If you want a check, step once more, right 22 and up 11 from (2,2)(2, 2) to reach (4,3)(4, 3), and confirm it too lands on the line.

Check your understanding

Starting from the yy-intercept (0,2)(0, 2), which point do you reach by stepping the slope −34-\tfrac{3}{4} of the line y=−34x+2y = -\tfrac{3}{4}x + 2?

Answer choices

Converting to slope-intercept form

To convert a nonvertical line’s equation to y=mx+by=mx+b, solve for yy. Isolate the yy-term, then divide by its coefficient so yy stands alone. Standard form hides the slope and intercept; point-slope form already shows the slope but may hide the yy-intercept.

Worked example 4 Convert 2x+3y=122x + 3y = 12 to slope-intercept form

Slope-intercept form has yy by itself, so solve the equation for yy. First subtract 2x2x from both sides to isolate the yy-term:

3y=−2x+12.3y = -2x + 12.

The coefficient of yy is 33, so divide every term by 33:

y=−23x+4.y = -\tfrac{2}{3}x + 4.

Now the slope and intercept are in plain sight: the slope is m=−23m = -\tfrac{2}{3} and the yy-intercept is (0,4)(0, 4). As a check, the original equation at x=0x = 0 gives 3y=123y = 12, so y=4y = 4, matching bb.

A point-slope equation converts the same way, by distributing the slope and then moving the constant across. Take y−3=2(x−1)y - 3 = 2(x - 1). Distribute the 22 on the right, then add 33 to both sides:

y−3=2x−2,y=2x+1.y - 3 = 2x - 2, \qquad y = 2x + 1.

The line has slope 22 and yy-intercept (0,1)(0, 1). Both forms describe one line; slope-intercept form also displays the yy-intercept directly.

Check your understanding

Rewrite 4x+2y=104x + 2y = 10 in slope-intercept form.

Answer choices

Finding the intercepts

The yy-intercept is (0,b)(0,b) in slope-intercept form. In any form, setting x=0x=0 finds the intersection with the yy-axis, if there is a single one. The xx-intercept is where the line meets the xx-axis, so its yy-coordinate is 00. Set y=0y=0 and solve for xx to find that crossing.

Worked example 5 Find both intercepts of a line

Start with y=2x−6y = 2x - 6, already in slope-intercept form. The yy-intercept is the constant, so it is (0,−6)(0, -6). For the xx-intercept, set y=0y = 0 and solve for xx:

0=2x−6,2x=6,x=3,0 = 2x - 6, \qquad 2x = 6, \qquad x = 3,

so the xx-intercept is (3,0)(3, 0).

Now take 4x−5y=204x - 5y = 20, which is in standard form. The intercepts are just as quick without first solving for yy. Set y=0y = 0 for the xx-intercept:

4x−5(0)=20,4x=20,x=5,4x - 5(0) = 20, \qquad 4x = 20, \qquad x = 5,

so the xx-intercept is (5,0)(5, 0). Set x=0x = 0 for the yy-intercept:

4(0)−5y=20,−5y=20,y=−4,4(0) - 5y = 20, \qquad -5y = 20, \qquad y = -4,

so the yy-intercept is (0,−4)(0, -4). With both crossings in hand, you can plot the line from its intercepts, the quick two-point method from the graphing lesson.

The two intercepts of y = x - 2The line y = x - 2 drawn through the marked y-intercept (0, -2) on the y-axis and x-intercept (2, 0) on the x-axis.xy2-20(2, 0)(0, -2)y = x - 2
The two intercepts of y = x - 2. Reading b = -2 gives the y-intercept (0, -2) at once, and setting y = 0 gives the x-intercept: 0 = x - 2, so x = 2 and the point is (2, 0). Plotting both and drawing through them graphs the line.

Check your understanding

What is the xx-intercept of the line y=3x−12y = 3x - 12?

Answer choices

In a real situation, the intercepts often have a meaning. Suppose a tank starts with 2020 liters and drains steadily at 22 liters per minute. Until it empties, its volume VV after tt minutes is

V=20−2t.V=20-2t.

With time on the horizontal axis, the vertical intercept (0,20)(0,20) means 2020 liters at the start. For the horizontal intercept, solve 0=20−2t0=20-2t to get t=10t=10: the tank empties after 1010 minutes. The line describes this situation only from the start until the tank empties; negative volumes after that have no meaning here.

Special cases

Three kinds of line need extra care with slope-intercept form.

A horizontal line has slope 00. In slope-intercept form that reads y=0x+by = 0x + b, which collapses to y=by = b. So a horizontal line meets the yy-axis at (0,b)(0, b) and stays at height bb. When bb is not 00, the line has no xx-intercept, because it never reaches the xx-axis. When b=0b = 0, the line is the xx-axis itself and lies flat along it.

A vertical line is the one case slope-intercept form cannot describe. Its slope is undefined, so there is no mm to write, and its equation is x=cx = c instead. A vertical line has an xx-intercept at (c,0)(c, 0) but no yy-intercept, unless c=0c = 0, when the line is the yy-axis.

A nonvertical line through the origin has yy-intercept (0,0)(0, 0), so its bb is 00 and its equation is simply y=mxy = mx. When the slope mm is not 00, the xx-intercept and the yy-intercept are the same point, the origin, because setting x=0x = 0 and setting y=0y = 0 both land there. So the intercepts give you only one point; step out to a second point using the slope. A slope of 00 instead gives y=0y = 0, the flat line from the horizontal case above, which has no single xx-intercept at all.

Check your understanding

Which of these lines cannot be written in slope-intercept form y=mx+by=mx+b?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)
A bit of history (optional)

Imagine opening an algebra book in Stockholm and finding y=kx+my=kx+m. You learned that mm means slope, but here it means the height of the yy-intercept. That is the convention used by the Swedish teaching site Matteboken: kk gives the slope and mm gives the crossing height.

The choice of letters has varied over time as well as place. Matthew O’Brien’s 1842 textbook used y=mx+cy=mx+c, while George Salmon’s A Treatise on Conic Sections, first published in 1848, used y=mx+by=mx+b. These two authors agreed on mm but chose different letters for the constant. MacTutor records both examples.

A student moving between these books would need to learn the local notation before reading an equation. The coefficient of xx still gives the slope in each version, even when its letter has changed.

Your progress

See all your progress →