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.
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 = 5has 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 + 2xis the same line asy = 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.
Sources
- OpenStax, "Elementary Algebra, 4.5 Use the Slope-Intercept Form of an Equation of a Line": y = mx + b with slope m and y-intercept (0, b); graphing a line from its slope and y-intercept
- OpenStax, "Elementary Algebra 2e, 4.4 Understand Slope of a Line": vertical lines have an undefined slope
- Common Core State Standards, "Grade 8 Expressions & Equations": 8.EE.B.6, deriving y = mx + b for a line that crosses the vertical axis at b
- Common Core State Standards, "Grade 8 Functions": 8.F.A.3, y = mx + b defines a linear function whose graph is a straight line
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
- Algebra 1 EP7Solving two-step equations
- Algebra 1 EP8Inequalities and the flip rule
- Algebra 1 EP12What a system is
- Algebra 1 EP13Solving by substitution