How slope intercept form is found
Every non-vertical line can be written as y = mx + b: m is the slope and b is where it crosses the y-axis.
y = mx + b, where m = (y₂ − y₁) ÷ (x₂ − x₁) and b = y₁ − m × x₁
- From two points: slope m is the rise over the run, (y₂ − y₁) ÷ (x₂ − x₁).
- Then put one point into y = mx + b and solve for b: b = y₁ − m × x₁.
- From a point and the slope: skip the first step and use b = y₁ − m × x₁ straight away.
- Standard form Ax + By = C comes from moving the x term across and clearing fractions.
- If both points share the same x, the line is vertical, x = a, and has no slope.
Worked example — Through (0, −3) and (4, 5): m = (5 − (−3)) ÷ (4 − 0) = 8 ÷ 4 = 2, and b = −3 − 2 × 0 = −3, so y = 2x − 3. It crosses the x-axis at (3/2, 0).
Lines through two points
| x₁ | y₁ | x₂ | y₂ | Equation | Slope m | y-intercept |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 6 | y = 2x | 2 | (0, 0) |
| 0 | -3 | 4 | 5 | y = 2x − 3 | 2 | (0, −3) |
| -2 | 4 | 2 | -4 | y = −2x | −2 | (0, 0) |
| 1 | 1 | 4 | 2 | y = (1/3)x + 2/3 | 1/3 (0.3333) | (0, 2/3) |
| 2 | 5 | 6 | 5 | y = 5 | 0 | (0, 5) |
Swipe the table sideways to see the rest.
Each row is worked out by this calculator.
Things to consider
- Type fractions like 1/3 rather than 0.333 to keep the answer exact.
- A positive slope rises left to right; a negative slope falls.
- Parallel lines share the same slope. Perpendicular slopes multiply to −1.
- Check your answer by putting each point back into the equation.
Frequently asked questions
What is slope intercept form?
It is y = mx + b, where m is the slope of the line and b is the y-intercept, the y value where the line crosses the y-axis.
How do I find it from two points?
Work out the slope m = (y₂ − y₁) ÷ (x₂ − x₁), then b = y₁ − m × x₁. For (1, 2) and (3, 6), m = 2 and b = 0, so y = 2x.
How do I find it from a point and the slope?
Use b = y₁ − m × x₁. For the point (2, 3) and slope −1/2, b = 3 + 1 = 4, so y = −(1/2)x + 4.
How do I convert standard form to slope intercept form?
Solve Ax + By = C for y: y = (−A ÷ B)x + C ÷ B. For 2x + 4y = 8, y = −(1/2)x + 2.
What is the equation of a vertical line?
x = a, where a is the x value every point shares. Its slope is undefined, so it has no slope intercept form.
What does the slope mean?
It is how much y changes for each step of 1 in x. A slope of 2 rises 2 units for every 1 unit across; a slope of 0 is a flat, horizontal line.
Results are estimates for general information only, not financial, medical or professional advice.
