Watch on Instagram

Math Bytes · Algebra 1 · Episode 10 · Graphing lines and slope

y = mx + b

Most straight lines can be written as y = mx + b, where m is the slope (how steep the line is) and b is the y-intercept (where the line crosses the y-axis). Example: to graph y = 2x + 1, start at (0, 1), then go up 2 and right 1.

Posted · About a 1 minute watch, 2 minute read · Take the quiz

Two numbers, one whole line

A straight line goes on forever, but you only need two numbers to describe most of them. Write the line as

y = mx + b

  • m is the slope: how steep the line is (rise over run).
  • b is the y-intercept: where the line crosses the y-axis, at the point (0, b).

This is called slope-intercept form.

A worked example

Graph y = 2x + 1.

  • Start at b. Here b = 1, so put a dot at (0, 1) on the y-axis.
  • Step with m. The slope is 2, which means up 2 for every 1 step right. From (0, 1) go up 2 and right 1 to reach (1, 3).
  • Connect the dots. The line through (0, 1) and (1, 3) is the whole line.

Check another point by putting in x = 3: y = 2 · 3 + 1 = 6 + 1 = 7, so (3, 7) is on the line ✓. From (1, 3), two more steps of up 2, right 1 land on (3, 7) too.

Try it yourself

Graph y = 3x − 2. Start at (0, −2), then go up 3 and right 1 to reach (1, 1). Connect the dots.

Then check a point: put in x = 2. y = 3 · 2 − 2 = 6 − 2 = 4, so (2, 4) is on the line.

Good to know

  • If m is negative, the line goes downhill: a slope of −2 means down 2 for every 1 step right.
  • If m = 0, the line is flat: y = b.
  • A vertical line like x = 5 has an undefined slope, so it can't be written as y = mx + b. That's why we say "most" straight lines.
  • The order of the terms doesn't matter: y = 1 + 2x is the same line as y = 2x + 1.

Answer to the comment question

y = 3x + 2. What is y when x is 4? y = 14. Put in x = 4: y = 3 · 4 + 2 = 12 + 2 = 14, so the point (4, 14) is on the line.

Test your knowledge

Quick quiz: y = mx + b

4 multiple-choice questions. Pick one answer for each, then check how you did.

1In y = mx + b, what does m tell you?
2Where does the line y = 2x + 5 cross the y-axis?
3For y = 2x + 1, what is y when x = 3?
4To graph y = 4x + 3, where do you start and how do you step?

Sources

Video transcript

How can just two numbers describe a whole line?

Most straight lines can be written as y equals m x plus b. The letter m is the slope, how steep the line is. The letter b is the y-intercept, where the line crosses the y-axis.

Take y equals two x plus one. Start at one on the y-axis. That's b. Then use the slope, two: go up two, right one.

Connect the dots, and that's the whole line. Just two numbers: start at b, step with m.

Put in x equals three. Two times three plus one is seven. So three comma seven is on the line.

Your turn. y equals three x plus two. What is y when x is four? Comment your answer below!

That's your byte.

More from Algebra 1

All Algebra 1 lessons