Equation of a Line Through Two Points
Find the equation of the straight line through two given points: gradient first, then c.
In the exam for Edexcel Further Pure Maths 4PM1, Cambridge IGCSE Maths 0580, Cambridge O Level Maths 4024, Edexcel IGCSE Maths 4MA1 · 16 real past-paper questions below
اقرأ هذا الدرس مشروحاً بالعربي ←
Two Points Fix One Line
Only one straight line goes through two points. You find its equation in two moves.
Steps
- 1
Gradient: up ÷ across between the two points gives .
- 2
c: put one point's x and y into and solve.
Written as a formula, the gradient is:
Formula
is one point and is the other. The top is the change in y (up), the bottom is the change in x (across). Take both in the same order.
Key idea
Then use the other point as a check. It must fit too.
Gradient, Then c
The main question: find the equation of the line through and .
Worked example
- 1
— Gradient formula: take the y's away on top and the x's away underneath, in the same order.
- 2
— Up 9, across 3, so the gradient is 3.
- 3
— Put m = 3 into y = mx + c. Only c is still unknown.
- 4
— Substitute the point (2, 5): x = 2 goes next to the 3, and y = 5 goes on the left.
- 5
— Work out 3 × 2 = 6.
- 6
— Take 6 from both sides: 5 − 6 = −1.
- 7
— Put c back into y = 3x + c. This is the equation.
Common mistake
Swapping x and y when you substitute, as in . The x goes next to the m.
Key idea
Check with the other point: . It fits.
Key idea
Show the gradient sum and the substitution line. Each one earns a mark for working, even if a slip spoils your final answer.
Negative Coordinates and Fractions
Take extra care with minus signs. The gradient can come out as a fraction: keep it as a fraction.
Worked example
- 1
— The two points. The first one has a negative x, so watch the signs.
- 2
— Gradient formula. Put −2 in brackets so its minus sign is not lost.
- 3
— Minus a negative is plus: 6 − (−2) = 8. The top is −4 because the line goes down.
- 4
— Divide top and bottom by 4. Keep it as a fraction, it is exact.
- 5
— Substitute (6, 0): the point with a 0 gives easier sums.
- 6
— Work out −½ × 6 = −3.
- 7
— Add 3 to both sides.
- 8
— Put m and c into y = mx + c. Check with (−2, 4): −½ × (−2) + 3 = 4. It fits.
Common mistake
Working out the across as . It is .
Another Way: y − y₁ = m(x − x₁)
Some textbooks and mark schemes use a second formula. It gets to the equation without finding c as a separate step.
Formula
is the gradient and is any point on the line. The x and y stay as letters.
Worked example
- 1
— Line through (−4, 9) and (6, −16). Find the gradient first, as before. Brackets keep the −4 safe.
- 2
— −16 − 9 = −25 and 6 + 4 = 10, so the gradient is −2.5.
- 3
— Put m and the point (−4, 9) into the formula: , .
- 4
— Minus a negative is plus: x − (−4) = x + 4.
- 5
— Multiply out the bracket: −2.5 × x and −2.5 × 4 = −10.
- 6
— Add 9 to both sides: −10 + 9 = −1. Now it is in the form y = mx + c.
Common mistake
Writing . Here is −4, so becomes .
Key idea
Both methods give the same line and earn the same marks. Use the one you find easier.
“Show That” Questions
Some questions give you the answer in another form, like “Show that the line AB is 3y = x + 7”. All the marks are for working, so write every line.
Worked example
- 1
— A is (−1, 2) and B is (5, 4). Gradient formula, with −1 in brackets.
- 2
— Minus a negative is plus, so across is 6. Divide top and bottom by 2.
- 3
— Substitute A: x = −1, y = 2.
- 4
— ⅓ × (−1) = −⅓.
- 5
— Add ⅓ to both sides. Keep it as a fraction: a rounded 2.33 cannot give the exact answer.
- 6
— The equation in the form y = mx + c.
- 7
— Multiply every term by 3 to clear the fractions. This matches the line you were asked to show.
Key idea
In a “show that” question, an answer with a missing line can lose marks. The examiner wants every step, with no gaps.
Which Method? Read the Question
Check what you are given and how the answer should look.
| You see | You do |
| Two points | gradient, then c |
| A gradient and one point | skip to c |
| Two points with the same y | that number |
| Two points with the same x | that number (a vertical line) |
| A point on the y-axis, | straight away |
| Answer as ax + by + c = 0 | Equation in the Form ax + by + c = 0 |
| A line drawn on a grid | Finding the Equation From a Graph |
| Through the midpoint, at right angles | The Perpendicular Bisector |
Key idea
Put in whichever point has the easier numbers. A point with a 0 in it is best.
Practise equation of a line through two points now
Interactive visual aids, then real past-paper questions marked on your working like the exam. Free to start.
Practise free on LemmaraReal past-paper questions on equation of a line through two points
Each with a full worked solution.
Lemmara is an independent study tool, not affiliated with or endorsed by Cambridge International Education or Pearson Edexcel. The lessons and worked examples are Lemmara’s own.