Slope-Intercept Form

Slope-intercept form is a way to write the equation of a line: y = mx + b. The m is the slope, which tells how steep the line is. The b is the y-intercept, where the line crosses the y-axis. With this form, you can graph a line in two quick steps.

Before this lesson: You should know how to find slope and what the y-intercept of a line is.

Extra practice: The Algebra 1 Unit 4 Practice Pack (Part 1) has printable problems, answer keys and a cheat sheet for this unit.

What Is Slope-Intercept Form?

Slope-intercept form names the two things you need to draw a line: where it starts and how it moves.

y = mx + b \qquad m = \text{slope}, \quad b = \text{y-intercept}
  • The slope m tells you the rise over the run.
  • The y-intercept b is the y-value where the line crosses the y-axis. That point is (0, b).

Here are some equations in slope-intercept form.

EquationSlope my-intercept b
y = 2x + 323
y = -x + 4−14
y = \frac{1}{2}x - 5\frac{1}{2}−5
y = 3x30
y = -60−6

Tip: b keeps its sign. In y = 4x - 7, the y-intercept is −7, not 7.

How to Graph a Line in Slope-Intercept Form

  1. Plot the y-intercept (0, b) on the y-axis.
  2. Write the slope as a fraction, rise over run.
  3. From the y-intercept, move up or down by the rise, then right by the run. Plot a second point.
  4. Draw a straight line through the two points.
Graph of y = (2/3)x − 1. It starts at the y-intercept (0, −1). A dashed path goes right 3 and up 2 to the point (3, 1).
Start at (0, −1) on the y-axis. Go up 2 and right 3 to reach (3, 1).

If the slope is a whole number, write it over 1. A slope of 3 is \frac{3}{1}: up 3, right 1. A slope of −2 is \frac{-2}{1}: down 2, right 1.

Worked Examples

Example 1: Find the slope and y-intercept

What are the slope and y-intercept of y = -3x + 5?

m = -3

Step 1. Match the equation to y = mx + b. The number in front of x is −3.

b = 5

Step 2. The number added at the end is 5.

Answer: The slope is −3, and the line crosses the y-axis at (0, 5).

Example 2: Graph a line with a fraction slope

Graph y = \frac{2}{3}x - 1.

Step 1. Read the y-intercept. It is −1, so plot (0, −1).

Step 2. Read the slope, \frac{2}{3}. As rise over run (see slope), the rise is 2 and the run is 3.

Step 3. From (0, −1), go up 2. The y-value becomes −1 + 2 = 1.

Step 4. Then go right 3. The x-value becomes 0 + 3 = 3. Plot (3, 1).

Step 5. Draw the line through (0, −1) and (3, 1). The graph above shows this line.

Answer: The line through (0, −1) and (3, 1). Check: \frac{2}{3}(3) - 1 = 2 - 1 = 1.

Example 3: Graph a line with a negative slope

Graph y = -2x + 4.

Step 1. Plot the y-intercept (0, 4).

-2 = \frac{-2}{1}

Step 2. Write the slope as a fraction.

Step 3. From (0, 4), go down 2 and right 1 to reach (1, 2).

Step 4. From (1, 2), go down 2 and right 1 again to reach (2, 0).

Step 5. Draw the line through the points.

Answer: The line through (0, 4), (1, 2) and (2, 0).

Check: The line goes down from left to right, which matches a negative slope.

Example 4: Rewrite an equation in slope-intercept form

Find the slope and y-intercept of 4x - 2y = 8.

-2y = -4x + 8

Step 1. Get y by itself, as in literal equations. First subtract 4x from both sides (see two-step equations).

y = 2x - 4

Step 2. Divide every term by −2. A negative divided by a negative is positive. (See multiplying and dividing integers.)

m = 2, \quad b = -4

Step 3. Read m and b.

Answer: y = 2x - 4. The slope is 2, and the y-intercept is −4.

Example 5: Word problem

A gym charges a $25 sign-up fee plus $10 per month. Write an equation for the total cost C after t months. What do the slope and y-intercept mean? How much do 6 months cost?

Step 1. The cost goes up $10 each month, so the slope is 10.

Step 2. You pay $25 before any months pass, so the y-intercept is 25.

C = 10t + 25

Step 3. Write the equation.

C = 10(6) + 25

Step 4. For 6 months, substitute t = 6.

C = 60 + 25

Step 5. Multiply.

C = 85

Step 6. Add.

Answer: C = 10t + 25. The slope is $10 per month, and the y-intercept is the $25 sign-up fee. Six months cost $85.

Common Mistakes

MistakeWhat it looks likeHow to fix it
Dropping the sign of by = 3x - 2, so b = 2b keeps its sign: b = -2.
Plotting b on the wrong axisStarting at (−2, 0) for b = -2The y-intercept is on the y-axis: (0, −2).
Swapping rise and runSlope \frac{2}{3} drawn as up 3, right 2The top number is the rise: up 2, right 3.
Going the wrong waySlope −2 drawn as up 2, right 1A negative slope goes down: down 2, right 1.
Reading m before solving for y2x + y = 5, so m = 2Solve for y first: y = -2x + 5, so m = -2.

Special Cases

  • Lines through the origin: If b = 0, the equation is y = mx. The line passes through (0, 0).
  • Horizontal lines: If m = 0, the equation is y = b. The line is flat.
  • Vertical lines: A vertical line like x = 3 has no slope, so it can’t be written in slope-intercept form. See Horizontal and Vertical Lines.

Practice Problems

For problems 1–7, give the slope and y-intercept. Rewrite the equation in slope-intercept form first if you need to.

  1. y = 4x - 9
  2. y = -x + 6
  3. y = \frac{2}{5}x
  4. y = 8
  5. 3x + y = 2
  6. 6x - 3y = 12
  7. x + 2y = 10
  8. Graph y = 3x - 2. Name the y-intercept and two more points on the line.
  9. Graph y = -\frac{3}{4}x + 3. Name the y-intercept and one more point on the line.
  10. A candle is 12 inches tall. It burns down 2 inches every hour. Write an equation for its height h after t hours. When does it burn out?
Show answers

1.

m = 4

Read the number in front of x.

b = -9

Read the number at the end.

2.

m = -1

The term −x means −1x.

b = 6

Read the number at the end.

3.

m = \frac{2}{5}

Read the number in front of x.

b = 0

Nothing is added at the end.

The line goes through the origin.

4.

m = 0

There is no x-term, so think of it as y = 0x + 8.

b = 8

Read the number at the end.

This is a horizontal line.

5.

y = -3x + 2

Subtract 3x from both sides.

m = -3, \quad b = 2

Read m and b.

6.

-3y = -6x + 12

Subtract 6x from both sides.

y = 2x - 4

Divide every term by −3.

m = 2, \quad b = -4

Read m and b.

7.

2y = -x + 10

Subtract x from both sides.

y = -\frac{1}{2}x + 5

Divide every term by 2.

m = -\frac{1}{2}, \quad b = 5

Read m and b.

8.

(0, -2)

Plot the y-intercept.

(1, 1)

The slope is 3, so go up 3 and right 1.

(2, 4)

Go up 3 and right 1 again.

9.

(0, 3)

Plot the y-intercept.

(4, 0)

The slope is -\frac{3}{4}, so go down 3 and right 4.

10.

h = -2t + 12

The candle starts at 12 inches, so b = 12. It loses 2 inches an hour, so m = −2.

0 = -2t + 12

It burns out when the height is 0.

2t = 12

Add 2t to both sides.

t = 6

Divide both sides by 2.

It burns out after 6 hours.

Want more practice? The Algebra 1 Unit 4 Practice Pack (Part 1) has 39 pages of problems on this and the other lessons in the unit, with step-by-step answers and a cheat sheet.

Slope-Intercept Form FAQ

What does b stand for in y = mx + b?

In y = mx + b, b is the y-intercept. It is the y-value where the line crosses the y-axis, at the point (0, b).

Why is it called slope-intercept form?

It is called slope-intercept form because the equation shows the slope m and the y-intercept b right away. You don’t have to do any work to read them.

Can every line be written in slope-intercept form?

No. Vertical lines like x = 3 have an undefined slope, so they can’t be written as y = mx + b. Every other line can.

How do you write slope-intercept form from two points?

Find the slope from the two points, then use one point to solve for b. The next lesson, Writing Equations in Slope-Intercept Form, shows every step.

Summary

  • Slope-intercept form is y = mx + b.
  • m is the slope, and b is the y-intercept at (0, b).
  • To graph, plot (0, b), then use rise over run to find a second point.
  • Solve for y before you read m and b.
  • Vertical lines can’t be written in this form.

Previous lesson: Horizontal and Vertical Lines

Next lesson: Writing Equations in Slope-Intercept Form

Back to the Algebra 1 Index