Linear functions
Finding the equation of a line
Goal: Build y = mx + b from two points · 10 min
Given two points:
- Compute m with the slope formula.
- Substitute one point into y = m·x + b and solve for b.
- Check with the other point.
The same method works for "a line with slope 3 through (2 | 1)": insert into 1 = 3·2 + b → b = −5 → y = 3x − 5.
Worked example: Line through A(2 | 5) and B(6 | 13)
- m = (13 − 5)/(6 − 2) = 8/4 = 2.
- 5 = 2·2 + b → b = 1.
- y = 2x + 1. Check B: 2·6 + 1 = 13 ✓