Slope and Intercept: y = mx + b

Category: Algebra   Level: 201

y = mx + b, m = rise / run

The slope m says how much y climbs per step right, and b says where the line crosses the y-axis. Any slope triangle on the line, big or small, gives the same rise over run.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Draw the line

These points all sit on one straight line. Every 3 steps right, the line climbs 2.

(0, 1), (3, 3), (6, 5), (9, 7)

Step 1: Draw the line

Step 2: Find the y-intercept b

The line crosses the y-axis at height 1. That starting height is b.

x = 0 ⇒ y = 1, so b = 1

Step 2: Find the y-intercept b

Step 3: Measure rise over run

Walk 3 right along the orange run, then 2 up along the purple rise to get back to the line. The slope is rise divided by run.

m = rise / run = 2/3

Step 3: Measure rise over run

Step 4: Try a bigger triangle

Start at (3, 3) and walk 6 right and 4 up. The triangle is twice as big, but the ratio is the same, because a straight line has one steady slope.

4/6 = 2/3

Step 4: Try a bigger triangle

Step 5: Write the equation

Start at b and add m for every step right. That recipe is the whole equation of the line.

y = (2/3)x + 1

Step 5: Write the equation

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render slope-intercept --out /tmp/slope-intercept

Source: svgmath/diagrams/lines.py