Math Core

Lesson 4.3 · Functions

Slope-intercept form

If you know where a line crosses the yy-axis and how steep it is, you know the whole line. Slope-intercept form packs both facts into one short equation, so you can read a line's graph straight from its equation, and the other way around.

The y-intercept

The y-intercept is where a line crosses the yy-axis. Every point on the yy-axis has x=0x = 0, so the yy-intercept is the output when the input is 0.

Look at the line y=2x+3y = 2x + 3. When x=0x = 0, y=2(0)+3=3y = 2(0) + 3 = 3. So the line crosses the yy-axis at (0,3)(0, 3). And each time xx goes up by 1, yy goes up by 2, so the slope is 2.

y = 2x + 3 crosses the y-axis at 3 and rises 2 for every 1 step right.Open in grapher →

Both numbers are sitting right there in the equation.

Slope-intercept form

y=mx+by = mx + b
  • mm is the slope.
  • bb is the y-intercept: the line crosses the yy-axis at (0,b)(0, b).

Worked example: Reading m and b

Find the slope and yy-intercept of each line.

  1. y=−3x+5y = -3x + 5
  2. y=12x−4y = \dfrac{1}{2}x - 4
  3. y=7−2xy = 7 - 2x

Solutions.

  1. m=−3m = -3, b=5b = 5.
  2. m=12m = \dfrac{1}{2}, b=−4b = -4. (Subtracting 4 is adding −4-4.)
  3. Rearrange first: y=−2x+7y = -2x + 7. So m=−2m = -2 and b=7b = 7.

Common mistake

The slope is the number multiplying xx, not the first number you see. In y=7−2xy = 7 - 2x the slope is −2-2, not 7. Rewrite the equation in the order mx+bmx + b if that helps.

Graphing from the equation

To graph y=mx+by = mx + b:

  1. Plot the yy-intercept (0,b)(0, b).
  2. Use the slope as rise over run to step to a second point.
  3. Repeat once more to check, then draw the line.

Worked example: Graph y = (2/3)x − 1

The yy-intercept is −1-1, so start at (0,−1)(0, -1). The slope is 23\dfrac{2}{3}: go right 3 and up 2 to reach (3,1)(3, 1). Do it again to reach (6,3)(6, 3).

y = 2x/3 - 1(0, -1)(3, 1)(6, 3)Open in grapher →

Writing the equation of a line

To write y=mx+by = mx + b, you need two things: mm and bb.

Worked example: From a graph

Write the equation of this line.

y = -2x + 4(0, 4)(2, 0)Open in grapher →

The line crosses the yy-axis at 4, so b=4b = 4. From (0,4)(0, 4) to (2,0)(2, 0) the rise is −4-4 and the run is 2, so m=−42=−2m = \dfrac{-4}{2} = -2.

The equation is y=−2x+4y = -2x + 4.

Worked example: From two points

Write the equation of the line through (2,7)(2, 7) and (5,13)(5, 13).

Step 1: slope. m=13−75−2=63=2m = \dfrac{13 - 7}{5 - 2} = \dfrac{6}{3} = 2.

Step 2: intercept. So far, y=2x+by = 2x + b. The point (2,7)(2, 7) is on the line, so put in x=2x = 2 and y=7y = 7:

7=2(2)+b⇒7=4+b⇒b=37 = 2(2) + b \quad\Rightarrow\quad 7 = 4 + b \quad\Rightarrow\quad b = 3

The equation is y=2x+3y = 2x + 3.

Check with the other point: 2(5)+3=132(5) + 3 = 13. ✓

Tip

After you write an equation, test it on a point you were given. If a given point doesn't fit, something went wrong.

Practice

Practice 1

What is the slope of the line y=−4x+9y = -4x + 9?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

What is the yy-intercept of the line y=5x−8y = 5x - 8?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Write the equation of the line with slope 3 and yy-intercept −2-2.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 4

Write the equation of this line.

y = -x/2 + 3(0, 3)(4, 1)Open in grapher →

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 5

Write the equation of the line through (0,−5)(0, -5) and (3,1)(3, 1).

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 6

Which line passes through the point (4,3)(4, 3)?

Practice 7

Write the equation of the line through (2,1)(2, 1) and (6,9)(6, 9).

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 8

A line has slope −3-3 and passes through (2,4)(2, 4). Write its equation.

Enter an expression, e.g. 3x^2 - 2x + 1