Find the line through two points
The slope of the line through (x1, y1) and (x2, y2) is m = (y2 − y1) ÷ (x2 − x1). The line is y − y1 = m(x − x1).
This is original written practice with invented points. Each equation is checked by putting both points in.
Find the slope, write the line, then check both points
- Work out m = (y2 − y1) ÷ (x2 − x1).
- Write y − y1 = m(x − x1) with the first point.
- Simplify to the form y = mx + c.
- Check: put both points in. Both sides must match for each.
Through (1, 2) and (3, 8)
m = (8 − 2) ÷ (3 − 1) = 3. Then y − 2 = 3(x − 1), so y = 3x − 1.
Check: At (1, 2): 3 − 1 = 2. At (3, 8): 9 − 1 = 8.
Through (2, 5) and (4, 1)
m = (1 − 5) ÷ (4 − 2) = −2. Then y − 5 = −2(x − 2), so y = −2x + 9.
Check: At (2, 5): −4 + 9 = 5. At (4, 1): −8 + 9 = 1.
Through (−1, −3) and (3, 5)
m = (5 − (−3)) ÷ (3 − (−1)) = 8 ÷ 4 = 2. Then y + 3 = 2(x + 1), so y = 2x − 1.
Check: At (−1, −3): −2 − 1 = −3. At (3, 5): 6 − 1 = 5.
Counterexample: subtracting in a different order
A student finds the slope through (1, 2) and (3, 8) as 6 ÷ (1 − 3) = −3 and writes y = −3x + 5.
The check fails. At (1, 2) the line gives 2, but at (3, 8) it gives −9 + 5 = −4, not 8. Subtract the x values in the same order as the y values: (8 − 2) ÷ (3 − 1) = 3.
Try one yourself
Find the line through (0, 1) and (2, 7) and check it.
Show the worked self-check
m = (7 − 1) ÷ (2 − 0) = 3, so y = 3x + 1. Check: at (0, 1) the line gives 1, and at (2, 7) it gives 6 + 1 = 7.
Scope and limits
- The page covers lines through two points with different x values.
- It does not cover vertical lines, the intercept form or distance from a point to a line.
- The points are invented, and the questions are practice, not an exam key.
- Every equation is checked with both points.
Common questions
What if x1 equals x2?
Then the line is vertical and the slope formula divides by zero. The equation is simply x = x1, and the slope is not defined.
Does the order of the two points matter?
No, as long as you subtract in the same order on top and bottom. Swapping both points gives the same slope, and the same final line.
How do I get the form ax + by = c?
Move the x term to the left side and clear any fraction. For y = 3x − 1, subtract 3x from both sides to get −3x + y = −1, or multiply by −1 to get 3x − y = 1.
What does the slope tell me about the line?
It is the change in y for each one-unit step in x. A positive slope rises left to right, a negative slope falls, and a zero slope is a horizontal line.
Sources and scope
Sources checked . They support the slope formula and the point-slope form of a line. The numbers, worked examples and self-check above are original EZT practice.
- NCERT Class 11 Mathematics: Straight Lines, for slope and the line through two points.
- Math Is Fun: Equation of a Line from 2 Points, for a worked two-point method.
Read the Class 11 straight lines chapterBrowse tuition and practice pages