Slope-intercept form: y = mx + b

In y = mx + b, m is the slope and b is the y-intercept, the point where the line crosses the y-axis.

Not sure this is the right level? Take the free grade 8 check-up and get a daily practice plan.

What m and b mean

Every straight line that is not vertical can be written as y = mx + b:

So y = 3x − 4 has slope 3 and y-intercept −4. y = −x + 5 has slope −1 and y-intercept 5. y = 6x has slope 6 and y-intercept 0, so it passes through the origin: a proportional relationship is just y = mx + b with b = 0.

Common Core standard 8.EE.B.6 asks grade 8 students to derive y = mx + b for a line crossing the y-axis at b, and 8.F.B.4 asks them to build a linear function from a description, a table or a graph.

See it: pictures to draw with your child

Copy these onto paper or a whiteboard. A quick sketch makes the idea concrete before any written method.

−6−6−4−4−2−2224466xyb = 1over 1, up 2: m = 2
y = 2x + 1: start at b = 1 on the y-axis, then go over 1 and up 2.
01234567891001234567xy3264
Slope triangles on one line are similar, so they give the same slope.

How to graph y = mx + b

  1. Plot b on the y-axis. For y = 2x + 1, put a point at (0, 1).
  2. Use the slope to step. m = 2 = 2/1: go 1 right and 2 up to (1, 3). Do it again to (2, 5).
  3. Draw the line through the points, all the way across the grid.

For a fraction slope like y = (2/3)x − 1, start at (0, −1), then go 3 right and 2 up to (3, 1). For a negative slope like y = −2x + 4, go 1 right and 2 down.

How to write the equation of a line

From a graph: read b where the line crosses the y-axis, then find m with a slope triangle. Put them into y = mx + b.

From a table: the rate of change is m. If the table includes x = 0, that y-value is b. If not, work back.

x2345
y7101316

Each step of 1 in x adds 3 to y, so m = 3. Going back from x = 2 to x = 0 takes away 3 twice: 7 − 6 = 1, so b = 1 and the equation is y = 3x + 1.

From another form: rearrange to get y on its own. 2x + y = 7 becomes y = −2x + 7, so the slope is −2.

A full example, start to finish

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

  1. Slope: (7 − 1) ÷ (6 − 2) = 6 ÷ 4 = 3/2.
  2. Put in one point to find b: 1 = (3/2) × 2 + b, so 1 = 3 + b and b = −2.
  3. Write it: y = (3/2)x − 2.
  4. Check with the other point: (3/2) × 6 − 2 = 9 − 2 = 7. Correct.

y = mx + b practice

Read the slope and y-intercept, match a graph to its equation, and find m and b from a table. New lines every time.

What comes next

In word problems, m is the rate of change and b is the initial value: see linear functions. Two lines in y = mx + b form can be compared at a glance in comparing functions, and where they cross solves a system of equations.

What to say to your child

A short script for teaching it the first time. Pause after each line and let your child do the next step.

  1. “Where does this line cross the y-axis?” (That’s b.)
  2. “From there, how far up for each step right?” (That’s m.)
  3. “So the line is y = m x + b. Let’s write it.”
  4. “Check: pick another point on the line and put its x in. Do you get its y?”
  5. “Now I’ll say an equation. You draw the line.”

More worked examples

Example 1: y = −3x + 2

Slope −3, y-intercept 2. Start at (0, 2), go 1 right and 3 down.

Example 2: Line crosses at 4 and rises 1 for each 2 across

m = 1/2, b = 4: y = (1/2)x + 4.

Example 3: Table x: 0, 1, 2 and y: −5, −1, 3

b = −5 (at x = 0), m = 4: y = 4x − 5.

Practice questions (answers below)

Ask these out loud or write them down. Check each answer, and ask “how did you get that?” for one or two.

  1. Slope of y = 5x − 3
  2. y-intercept of y = −2x + 7
  3. y-intercept of y = 4x
  4. Slope of 3x + y = 9
  5. Line through (0, −2) with slope 3
  6. Table x: 1, 2, 3 and y: 5, 7, 9. Equation?
  7. Line through (1, 4) and (3, 10). Equation?
  8. Is y = 2x + 1 proportional?
Show the answers
  1. 5
  2. 7
  3. 0
  4. −3
  5. y = 3x − 2
  6. y = 2x + 3
  7. y = 3x + 1
  8. No, b is not 0

Common mistakes

b read from the x-axisUsed where the line crosses the x-axis.Fix: b is where the line crosses the y-axis, at x = 0.
Slope of y = 4 − 3x is 4Took the first number.Fix: the slope is the number multiplying x: −3.
b from the first table rowUsed y at x = 2 as b.Fix: b is y at x = 0; work back if the table starts later.
Negative slope drawn upwardWent up for a negative slope.Fix: negative m means go right and then down.

How to teach it at home

Taxi and phone plans

Any bill with a starting fee and a cost per unit is a linear function. Ask: what is the rate of change, and what is the initial value?

Graph a walk

Walk away from a wall, stop, then walk back, while someone times it. Sketch distance against time together.

Input–output game

One person thinks of a rule like “double it and add 1”. The other gives inputs and guesses the rule from the outputs.

By grade

Worksheets and practice

Last reviewed

Questions parents ask

What does y = mx + b mean?

It is the equation of a straight line: m is the slope and b is the y-intercept.

How do you find the y-intercept?

It is b in y = mx + b, the y-value when x = 0, where the line crosses the y-axis.

How do you graph y = mx + b?

Plot b on the y-axis, then use the slope as rise over run to plot more points, and draw the line through them.

How do you write an equation from a graph?

Read b where the line crosses the y-axis, find m with a slope triangle, and write y = mx + b.

What grade learns slope-intercept form?

Grade 8, in Common Core standards 8.EE.B.6 and 8.F.B.4.