MathsGenie logo
RevisionResourcesBlog
  1. Home
  2. /
  3. Blog
  4. /
  5. Equation of a Line Through Two Points GCSE Maths

Equation of a Line Through Two Points GCSE Maths

Equation of a line through two points GCSE maths explained with clear steps, worked examples, common mistakes and exam-style practice questions.

MathsGenie Team
•Last updated: 20 Nov 2026
Share
Add as a preferred source on Google

A student can understand gradients, know that a straight-line equation looks like y=mx+cy=mx+cy=mx+c, and still feel stuck when the question gives two coordinates instead of a graph. That is exactly where our imaginary student, Sam, keeps losing marks.

The good news is that finding the equation of a line through two points GCSE maths questions follow one reliable method: calculate the gradient, substitute one point to find the intercept, then write the complete equation. Once Sam stops treating each question as a puzzle and starts following those steps in order, the topic clicks.

The method at a glance

If a straight line passes through (x1,y1)(x_1,y_1)(x1​,y1​) and (x2,y2)(x_2,y_2)(x2​,y2​):

  • calculate the gradient using m=y2−y1x2−x1m=\frac{y_2-y_1}{x_2-x_1}m=x2​−x1​y2​−y1​​
  • substitute the gradient and either point into y=mx+cy=mx+cy=mx+c
  • solve the resulting equation to find ccc
  • write the final answer as y=mx+cy=mx+cy=mx+c
  • check that both given points satisfy your equation

The letters have specific meanings. The value mmm is the gradient, which measures how steep the line is. The value ccc is the yyy-intercept, where the line crosses the yyy-axis.

For a broader review of this topic, use the Maths Genie GCSE revision lessons alongside the method below.

Why two points are enough

One point alone does not identify a unique straight line. Imagine placing a pencil tip on that coordinate and rotating the pencil. Infinitely many lines could pass through the same point.

A second point fixes the direction. The two coordinates now tell us both where the line is and how steep it must be. That is why the first calculation is the gradient:

m=change in ychange in xm=\frac{\text{change in }y}{\text{change in }x}m=change in xchange in y​

or, using coordinates,

m=y2−y1x2−x1.m=\frac{y_2-y_1}{x_2-x_1}.m=x2​−x1​y2​−y1​​.

The order matters less than consistency. If you calculate y2−y1y_2-y_1y2​−y1​ on top, you must calculate x2−x1x_2-x_1x2​−x1​ underneath. Sam's early mistake is to reverse only one of the subtractions. That changes the sign and gives the wrong gradient.

Equation of a line through two points worked examples

Worked example with a positive gradient

Find the equation of the straight line passing through (2,5)(2,5)(2,5) and (6,13)(6,13)(6,13).

First, find the gradient:

m=13−56−2=84=2.m=\frac{13-5}{6-2}=\frac{8}{4}=2.m=6−213−5​=48​=2.

The equation must therefore have the form

y=2x+c.y=2x+c.y=2x+c.

Now substitute one of the points. Using (2,5)(2,5)(2,5) means x=2x=2x=2 and y=5y=5y=5:

5=2(2)+c.5=2(2)+c.5=2(2)+c. 5=4+c.5=4+c.5=4+c. c=1.c=1.c=1.

The equation is

y=2x+1.\boxed{y=2x+1}.y=2x+1​.

Check it with the other point, (6,13)(6,13)(6,13):

2(6)+1=13.2(6)+1=13.2(6)+1=13.

It works. This final check is quick and catches many substitution errors.

Sam's breakthrough is small but important: the coordinates do not go straight into the final answer. They are evidence used to discover mmm and ccc.

You now have the full method; use the Maths Genie lessons and GCSE question bank to practise applying it without having to create a set of questions yourself.

Worked example with a negative gradient

Find the equation of the line passing through (−1,7)(-1,7)(−1,7) and (3,−1)(3,-1)(3,−1).

Calculate the gradient carefully:

m=−1−73−(−1)=−84=−2.m=\frac{-1-7}{3-(-1)}=\frac{-8}{4}=-2.m=3−(−1)−1−7​=4−8​=−2.

So the equation has the form

y=−2x+c.y=-2x+c.y=−2x+c.

Substitute (−1,7)(-1,7)(−1,7):

7=−2(−1)+c.7=-2(-1)+c.7=−2(−1)+c. 7=2+c.7=2+c.7=2+c. c=5.c=5.c=5.

Therefore,

y=−2x+5.\boxed{y=-2x+5}.y=−2x+5​.

Check the second coordinate:

−2(3)+5=−1.-2(3)+5=-1.−2(3)+5=−1.

The negative gradient makes sense because yyy decreases as xxx increases. A reasonableness check like this can reveal a sign error before you move on.

Worked example with a fractional gradient

Find the equation of the line through (2,4)(2,4)(2,4) and (8,7)(8,7)(8,7).

The gradient is

m=7−48−2=36=12.m=\frac{7-4}{8-2}=\frac{3}{6}=\frac{1}{2}.m=8−27−4​=63​=21​.

Substitute the point (2,4)(2,4)(2,4) into y=12x+cy=\frac{1}{2}x+cy=21​x+c:

4=12(2)+c.4=\frac{1}{2}(2)+c.4=21​(2)+c. 4=1+c.4=1+c.4=1+c. c=3.c=3.c=3.

The equation is

y=12x+3.\boxed{y=\frac{1}{2}x+3}.y=21​x+3​.

Do not turn the fraction into an awkward decimal unless the question requires it. Exact fractions are usually clearer and reduce rounding errors.

A useful alternative: point-gradient form

You may also build the equation directly from a point and the gradient:

y−y1=m(x−x1).y-y_1=m(x-x_1).y−y1​=m(x−x1​).

For the points (2,5)(2,5)(2,5) and (6,13)(6,13)(6,13), we found m=2m=2m=2. Using (2,5)(2,5)(2,5) gives

y−5=2(x−2).y-5=2(x-2).y−5=2(x−2).

Expanding and rearranging:

y−5=2x−4,y-5=2x-4,y−5=2x−4, y=2x+1.y=2x+1.y=2x+1.

This approach is mathematically efficient, especially when the intercept is fractional. However, if you find it harder to remember, the substitution method using y=mx+cy=mx+cy=mx+c is completely dependable.

Common mistakes that cost marks

Mixing the subtraction order

This is incorrect:

m=y2−y1x1−x2.m=\frac{y_2-y_1}{x_1-x_2}.m=x1​−x2​y2​−y1​​.

The two differences must follow the same coordinate order. Label the points before calculating if negative numbers are involved.

Using the gradient as the intercept

After finding m=2m=2m=2, Sam sometimes writes y=x+2y=x+2y=x+2. But the gradient is the coefficient of xxx, so the correct starting form is

y=2x+c.y=2x+c.y=2x+c.

You still need to calculate ccc.

Substituting coordinates the wrong way round

For the point (2,5)(2,5)(2,5), x=2x=2x=2 and y=5y=5y=5. Writing x=5x=5x=5 and y=2y=2y=2 changes the line completely.

Losing negative signs

With a point such as (−1,7)(-1,7)(−1,7), use brackets during substitution:

7=−2(−1)+c.7=-2(-1)+c.7=−2(−1)+c.

The brackets make the sign calculation visible.

Forgetting the final equation

A calculation ending with c=5c=5c=5 has not fully answered the question. Write the complete result, such as

y=−2x+5.y=-2x+5.y=−2x+5.

Equation of a line through two points questions

Try these without looking back at the examples. Show the gradient calculation and the substitution used to find ccc.

  1. Find the equation of the line through (1,4)(1,4)(1,4) and (5,12)(5,12)(5,12).
  2. Find the equation of the line through (−2,9)(-2,9)(−2,9) and (2,1)(2,1)(2,1).
  3. Find the equation of the line through (0,−3)(0,-3)(0,−3) and (4,5)(4,5)(4,5).
  4. Find the equation of the line through (2,6)(2,6)(2,6) and (5,7)(5,7)(5,7).
  5. A line passes through (3,10)(3,10)(3,10) and (7,22)(7,22)(7,22). Find its equation.

Answers:

  1. y=2x+2y=2x+2y=2x+2
  2. y=−2x+5y=-2x+5y=−2x+5
  3. y=2x−3y=2x-3y=2x−3
  4. y=13x+163y=\frac{1}{3}x+\frac{16}{3}y=31​x+316​
  5. y=3x+1y=3x+1y=3x+1

For realistic exam preparation, complete related questions and compare every line of working with the mark scheme. The Maths Genie GCSE past papers can help you practise recognising the method when it appears among other topics.

Make the method stick

Sam does not improve by memorising five separate examples. The improvement comes from using the same short routine every time:

two points⟶m⟶c⟶y=mx+c⟶check.\text{two points}\longrightarrow m\longrightarrow c\longrightarrow y=mx+c\longrightarrow\text{check}.two points⟶m⟶c⟶y=mx+c⟶check.

That sequence reduces the amount you need to hold in your head. It also makes your working easier for an examiner to follow. If an arithmetic slip occurs near the end, clear earlier steps may still show valid method.

Turn understanding into reliable marks

Knowing the steps once is not the same as recognising them under exam pressure. Sam's next move is to stop improvising and practise the same sequence across straightforward, negative-gradient and fractional-gradient questions. Your turn: Start the matching Maths Genie lessons and question bank, and use the five-step method on every equation-of-a-line question.

  • The method at a glance
  • Why two points are enough
  • Equation of a line through two points worked examples
  • A useful alternative: point-gradient form
  • Common mistakes that cost marks
  • Equation of a line through two points questions
  • Make the method stick
  • Turn understanding into reliable marks

Frequently Asked Questions

How helpful was this article?
Add as a preferred source on Google

More from the blog

20 Nov 2026

What to Do After Your A-Level Maths Mock

What to do after your A-Level Maths mock: analyse errors, repair weak topics and build targeted practice papers for focused, effective revision.

20 Nov 2026

Year 13 A-Level Maths Mocks and Predicted Grades

Year 13 A-Level Maths mocks and predicted grades explained, with practical revision advice, a worked example and a plan for your next targeted practice paper.

20 Nov 2026

Large Data Set Revision for the Mock

Large data set revision for the mock, with a focused checklist, statistical examples, common mistakes and practical advice for A-Level Maths students.

20 Nov 2026

Proof Questions in A-Level Maths Mocks: A Clear Guide

Proof questions in A-Level Maths mocks explained through worked examples, common mistakes and focused revision. Build your next targeted practice paper.

1m+ Students Can't Be Wrong

What GCSE and A-level students say after revising with MathsGenie.

Harvey B. avatar

Harvey B.

Student

“This is such an amazing platform, it offers everything needed to improve your grade in a time efficient manor. Personally I love the videos as I am able to find areas that I am weak at in the practice papers.”
Tameem R. avatar

Tameem R.

Student

“Genuinely took me from a grade 4 in maths to achieving a grade 8 in my GCSE's in less than a few months. Best mathematics revision website for those who are aiming to get those high grades.”
Anyim P. avatar

Anyim P.

Student

“Genuinely I think every maths student should have this site. It takes you through the entire AS and A level Maths course, alongside exam questions with step by step solutions.”
Muhammad A. avatar

Muhammad A.

Student

“predicted papers are very useful and i believe there's not a better website for GCSE maths in the UK”
Rayan K. avatar

Rayan K.

Student

“Best Maths Resource out there! Absolutely amazing videos and very concise explantions on everything. Don't even get me started on the loads of exam question/worksheets that are so helpful. And it's all free!”
Dee avatar

Dee

Student

“The best Maths resource site in the world! They have it all and do a great job of keeping everything up to date. I still don't know how they are able to make this free for all. You are truly amazing.”
Hamid I. avatar

Hamid I.

Student

“They have helped me with my A level Maths performance significantly and I jumped from a grade U to a Grade A in only 2-3 months. I HIGHLY recommend to Maths students especially for A level.”
Sophie avatar

Sophie

Student

“MathsGenie's YouTube videos and worksheets are amazing. The videos go into such great depth but in a way that's simple to understand.”
Maria E. avatar

Maria E.

Student

“Amazing website! Truly helped with my GCSEs - I was a very poor student. Managed to go up and reach all grade 6-9's from U-4's. Would definitely recommend :)”
Justine K. avatar

Justine K.

Student

“Absolutely brilliant website with well organised, well written resources for learning or revising maths. I never hesitate to recommend mathsgenie to my students.”
Daryl G. avatar

Daryl G.

Student

“Took me a bit of getting used to but this new site is excellent. I found the old one really useful but this is next level. I share it with all my colleagues and students.”
Binuk J. avatar

Binuk J.

Student

“I used to be really bad at math. My first GCSE mocks I had a 2 but after I found MathsGenie I jumped from 2 to 4 under 3 months.”
Jourdie avatar

Jourdie

Student

“Improved my grade, I used to be borderline passing maths now I'm performing much better. There are videos, practice papers, solutions, exam questions, past GCSE papers all for free. This is really useful.”
Olla avatar

Olla

Student

“Honestly, it's super great. Easy, with the explanation on the side. Every topic also has more than 50 questions, making you feel more confident in doing different types f question in one topic. Try it!”

Ready to breeze through your GCSEs?IGCSEs?A-Levels?AS Levels?GCSEs?GCSEs?

Sign inStart studying for free

Footer

Quick links

  • GCSE past papers
  • GCSE question bank
  • GCSE worksheets
  • GCSE revision guides
  • GCSE lessons
  • Literary Hub
  • Free maths course
  • A Level past papers
  • A Level question bank
  • Old MathsGenie

Tools

  • Revision planner
  • Mock exam builder
  • Ask Genie AI
  • Answer marking
  • Grade calculator
  • Pricing

Company

  • About MathsGenie
  • Maths Genie on Google Play
  • Careers
  • Contact
  • For educators
  • For parents
  • Student ambassadors
  • More resources
  • Blog
  • Student questions
  • Sitemap
  • Privacy policy
  • Terms of Service
  • Cookie policy
  • Report a bug

GCSE

  • Biology
  • Chemistry
  • English Language
  • English Literature
  • Geography
  • Maths
  • Old Maths
  • Physics
  • Statistics

IGCSE

  • Biology
  • Business
  • Chemistry
  • Computer Science
  • English Language
  • English Literature
  • Geography
  • Maths
  • Physics

A Level

  • Biology
  • Business
  • Chemistry
  • Economics
  • Maths
  • Old Maths
  • Physics
  • Psychology
  • Sociology

AS Level

  • Biology
  • Business
  • Chemistry
  • Economics
  • Maths
  • Physics
  • Psychology
  • Religious Studies
  • Sociology
MathsGenie logo

© 2026 MyDojo, Inc. All rights reserved. MyDojo, Inc. does business as MathsGenie.

Exam board names are used for identification only and do not imply affiliation or endorsement.