Worked Example · Straight-Line Graphs · Paper 1 · 3 marks

Equation of a Line Through Two Points

Rig, founder of IGCSE Add Math Malaysia

Written by Rig, our founder

8 years teaching IGCSE & SPM maths · Updated 16 August 2026

Finding a line through two points is a two-step staple: gradient first, then a point. It underpins many longer 0606 questions.

Find the equation of the straight line passing through the points A(2,3)A(2, 3) and B(4,7)B(4, 7). [3]

The working

Step 1, find the gradient m=y2y1x2x1m = \dfrac{y_2 - y_1}{x_2 - x_1}: m=7342=42=2(M1)m = \frac{7 - 3}{4 - 2} = \frac{4}{2} = 2 \quad \text{(M1)}

Step 2, use one point with yy1=m(xx1)y - y_1 = m(x - x_1), taking A(2,3)A(2, 3): y3=2(x2)(M1)y - 3 = 2(x - 2) \quad \text{(M1)}

Step 3, rearrange: y3=2x4    y=2x1(A1)y - 3 = 2x - 4 \;\Rightarrow\; y = 2x - 1 \quad \text{(A1)}

A quick check: does B(4,7)B(4, 7) satisfy it? 2(4)1=72(4) - 1 = 7 ✓.

Where the marks are won and lost

  • Compute the gradient with a consistent subtraction order: 7342\frac{7-3}{4-2}, both differences the same way round. Flipping one gives the wrong sign.
  • Either point works in yy1=m(xx1)y - y_1 = m(x - x_1); the resulting line is identical. Substituting a point’s coordinates in the wrong slots is the usual slip.
  • Check with the other point, it should satisfy the equation.

Common mistakes

  • Inconsistent order in the gradient (e.g. 7324\frac{7-3}{2-4}), giving the wrong sign.
  • Mixing up which coordinate is x1x_1 and y1y_1 in the point-slope form.
  • Arithmetic slips rearranging to y=mx+cy = mx + c.

Full method: Equation of a Line notes. Topic home: Straight-Line Graphs pillar.

Common questions

How do I find the equation of a line through two points?
Find the gradient first, the change in y over the change in x between the two points, then use one point with y − y₁ = m(x − x₁) to write the equation. Either point works; the line is the same. Getting the gradient's subtraction in a consistent order (both differences top-to-bottom the same way) is the key to avoiding a sign error.

Keep going

See the teaching work on your own child. Then decide.

Every student starts with a 1-hour trial class taught by the vetted tutor your child would actually have. Real teaching, a diagnostic on real exam questions, and a straight answer on the gap to target. One hour at your tutor's rate (RM80–90/hr), no package and no deposit, and you decide afterwards whether to book a weekly slot. Online anywhere in Malaysia.