Math Core

Lesson 8.4 · Graphing and Linear Functions

Slope-intercept form

You've seen that a line has a slope and a yy-intercept. When a linear equation is written as y=mx+by = mx + b, both numbers are sitting right there in the equation. This form is the one you'll use most in Algebra 1, because it lets you read a line's graph straight from its equation.

Reading m and b

Look at y=2x+3y = 2x + 3. Make a quick table:

xx0123
yy3579

When x=0x = 0, y=3y = 3, so the line crosses the yy-axis at (0,3)(0, 3). Each time xx goes up by 1, yy goes up by 2, so the slope is 2. The two numbers in the equation are exactly the slope and the yy-intercept.

Slope-intercept form

A linear equation in slope-intercept form looks like

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

Worked example: Finding m and b

Give the slope and yy-intercept of each line.

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

Solutions.

  1. m=−3m = -3, b=4b = 4.
  2. m=12m = \dfrac{1}{2}, b=−6b = -6. Subtracting 6 is adding −6-6.
  3. m=5m = 5, b=0b = 0. The line goes through the origin.
  4. Rewrite as y=−x+8y = -x + 8. Then m=−1m = -1 and b=8b = 8.

Common mistake

The slope is the number multiplied by xx, not simply the first number you see. In y=8−xy = 8 - x, the slope is −1-1 and the yy-intercept is 8. Also keep the sign: in y=4x−7y = 4x - 7, bb is −7-7, not 7.

Graphing from the equation

You don't need a table 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 another point.
  3. Step once more to check, then draw the line.

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

Graph y=23x−1y = \dfrac{2}{3}x - 1.

Start at the yy-intercept, (0,−1)(0, -1). The slope is 23\dfrac{2}{3}, so go right 3 and up 2 to reach (3,1)(3, 1). Do it again to reach (6,3)(6, 3). Draw the line through the three points.

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

For a negative slope such as −34-\dfrac{3}{4}, go right 4 and down 3.

Writing the equation of a line

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

Worked example: From two points

Write the equation of the line through (2,5)(2, 5) and (4,9)(4, 9).

Find the slope: m=9−54−2=42=2m = \dfrac{9 - 5}{4 - 2} = \dfrac{4}{2} = 2.

Find bb: the equation so far is y=2x+by = 2x + b. Substitute one of the points, say (2,5)(2, 5):

5=2(2)+b5=4+b1=b\begin{aligned} 5 &= 2(2) + b \\ 5 &= 4 + b \\ 1 &= b \end{aligned}

The equation is y=2x+1y = 2x + 1. Check with the other point: 2(4)+1=92(4) + 1 = 9. ✓

Rewriting into slope-intercept form

Some equations, like 3x+y=53x + y = 5, have xx and yy on the same side. Solve for yy to put them in slope-intercept form, the same way you solved equations earlier in this course.

Worked example: Solving for y

Write 6x+2y=86x + 2y = 8 in slope-intercept form.

6x+2y=82y=−6x+8subtract 6xy=−3x+4divide every term by 2\begin{aligned} 6x + 2y &= 8 \\ 2y &= -6x + 8 && \text{subtract } 6x \\ y &= -3x + 4 && \text{divide every term by 2} \end{aligned}

The slope is −3-3 and the yy-intercept is 4.

Starting value and rate

In a real situation, bb is often a starting amount and mm is a rate.

A gym charges a $25 sign-up fee plus $15 per month. The cost after xx months is

y=15x+25.y = 15x + 25.

The slope 15 is the cost per month, and the yy-intercept 25 is what you pay at month 0, before any monthly fees.

Tip

After you write an equation, test it with a point you know. If the line should pass through (4,9)(4, 9), plug in x=4x = 4 and make sure you get 9.

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=7−2xy = 7 - 2x?

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

Practice 3

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

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

Practice 4

Write the equation of this line.

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

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

Practice 5

Write the equation of the line through (1,4)(1, 4) and (3,10)(3, 10).

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

Practice 6

Which equation is 4x+2y=104x + 2y = 10 written in slope-intercept form?

Practice 7

A plumber charges $40 to come to your house plus $65 for each hour of work. Write an equation for the total cost yy, in dollars, for xx hours of work.

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

Practice 8

A line has slope −2-2 and passes through (3,1)(3, 1). What is its yy-intercept?

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