☰ Course contents
Mathematics 📐 Grade 8 Graphing Linear Functions: Slope & Intercept
📐 Grade 8 · Lesson 4 of 15

Graphing Linear Functions: Slope & Intercept

Two numbers, m and b, are all you need to draw — and understand — any straight line.

Grade 8Algebra 1
Graphing Linear Functions: Slope & Intercept — illustration
💡
The big idea: Every straight line can be written as y = mx + b. The slope m tells you how steep the line is and which way it tilts; the intercept b tells you where it crosses the y-axis. Change those two numbers and you can make any line you like.
🎯 By the end, you'll be able to
  • Read the slope and y-intercept straight off an equation in the form y = mx + b
  • Explain what m and b each do to the graph
  • Graph a line from its equation by plotting the intercept and using the slope
  • Write the equation of a line from its slope and y-intercept (or a description of it)
📎 You should already know
  • Plotting points on the coordinate plane
  • Slope as rise over run

A line is a rule, not just a picture

A straight line on a graph is really a rule: give it an input x, and it hands back an output y. Linear functions are the simplest rule of all — the output changes by the same amount every time the input goes up by one. That steady, predictable change is exactly what makes a line straight.

Remarkably, you only need two numbers to pin down that rule completely.

🔑 The slope–intercept form
In y = mx + b, the number m is the slope (how much y changes each time x goes up by 1) and b is the y-intercept (the value of y when x = 0 — where the line crosses the vertical axis).
\[ y = m\,x + b \]
Slope–intercept form. m sets the steepness and direction; b sets the starting height.

Meet m and b by moving them

The fastest way to feel what m and b do is to change them and watch. Drag the two sliders below. Notice how m tilts the line (positive tilts up to the right, negative tilts down, zero is flat) and how b slides the whole line up and down without changing its steepness.

🎮 Interactive: build a line LIVE
Drag the Slope (m) and Intercept (b) sliders. The orange triangle shows the slope as rise-over-run: for every 1 you move right, the line rises by m. The dot marks where the line meets the y-axis, at (0, b).
✨ Why b is the crossing point
Set x = 0 in y = mx + b and the mx term vanishes, leaving y = b. So the line always passes through the point (0, b). That is why b is called the y-intercept — no calculation needed, it is just the number sitting after the x term.

Graphing a line in two moves

Once you can read m and b, graphing is quick:

  1. Plot the intercept. Put a dot at (0, b) on the y-axis.
  2. Use the slope to step. Write m as rise/run. From the intercept, move run to the right and rise up (or down, if the rise is negative), and plot a second point. Connect them.
📝 Worked example: Graph the line y = 2x − 3.
  1. Read off the numbers: slope m = 2, intercept b = −3.
  2. Plot the y-intercept first: a dot at (0, −3).
  3. Write the slope as rise/run: 2 = 2/1, so from (0, −3) move 1 right and 2 up to reach (1, −1).
  4. Draw the straight line through (0, −3) and (1, −1).
✓ A line rising steeply to the right, crossing the y-axis at −3. Check it in the tool above by setting m = 2 and b = −3.
📝 Worked example: A line crosses the y-axis at 4 and, for every 3 steps right, drops 1 step down. Write its equation.
  1. The y-intercept is 4, so b = 4.
  2. Rise over run: it drops 1 (rise = −1) over a run of 3, so m = −1/3.
  3. Substitute into y = mx + b.
✓ \(y = -\tfrac{1}{3}x + 4\).
⚠️ A common mix-up
The slope is the number multiplying x, not just the first number you see. In y = 5 − 2x, the slope is −2 and the intercept is 5 — reorder it as y = −2x + 5 to read them safely.

Check your understanding

1. In the equation y = −4x + 7, what is the slope?
The slope is the coefficient of x, which is −4. The 7 is the y-intercept.
2. A line has equation y = 3x − 5. Where does it cross the y-axis?
Set x = 0: y = 3(0) − 5 = −5. The line crosses the y-axis at (0, −5).
3. Which change makes a line steeper without moving where it crosses the y-axis?
Steepness is controlled by m; making |m| larger tilts the line more. Changing b slides the line up or down but keeps the same steepness.
4. A line goes through (0, 2) and rises 3 units for every 1 unit right. Its equation is…
Intercept b = 2 (it passes through (0, 2)); slope m = rise/run = 3/1 = 3. So y = 3x + 2.
✅ Key takeaways
  • Any straight line can be written y = mx + b.
  • m is the slope — how much y changes per step right; its sign sets the tilt.
  • b is the y-intercept — the line always passes through (0, b).
  • Graph a line by plotting (0, b) first, then stepping by the slope's rise over run.
  • The slope is the coefficient of x — reorder the equation if needed before reading it.