GCSE · Maths · AQA · Spec 8300 · Foundation
Equation of a line through two points or with given gradient
Hand me any two points and I'll give you the equation of the straight line through them. Three moves, every time. Ten minutes from now, you'll be doing it too.
Two points are all it takes
Drag the point along the line. Park it on A (2, 7), then on B (6, 15), and watch its coordinates. Then slide it all the way left to the y-axis, where x = 0.
Watch it done: a line through two points
Problem
Find the equation of the straight line through P(1, 5) and Q(4, 14).
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
The step between them gives the gradient. One point gives c. The other point checks you got it right.
What you need to know
- Every straight line that isn't vertical has an equation y = mx + c, and every point on it fits that equation.
- The gradient m is how much y changes for each 1 you move right: climbing is positive, falling is negative.
- From two points, m = change in y ÷ change in x, starting both subtractions from the same point.
Have a goQuick one before you read on: what's the gradient of the line through (2, 3) and (5, 9)?
2
Change in y = 9 − 3 = 6 and change in x = 5 − 2 = 3, so 6 ÷ 3 = 2. Dividing the other way round gives ½, which belongs to a different line.
- Change in y goes on top. Flip it and you get the gradient of a completely different line.
- c is the value of y where the line crosses the y-axis, which is where x = 0.
- A given point's y-coordinate is only c if that point has x = 0.
Have a goYour friend Kit is certain: "The line with gradient 2 through (3, 10) obviously has c = 10. Easy." Is Kit right?
No, Kit has fallen for the classic trap.
(3, 10) has x = 3, so it isn't on the y-axis. c is the y-value only where x = 0, so 10 can't be c here.
- To find c, substitute m and one point's coordinates into y = mx + c, then solve.
- Given one point and the gradient? m is done already, so go straight to finding c.
- Test your equation with the point you didn't use: both sides must come out equal.
Have a goSomeone says the line through (1, 4) and (3, 8) is y = 2x + 3. Put (3, 8) in. Does their equation pass?
No: 2 × 3 + 3 = 9, not 8.
The gradient 2 is right, but c is off by one: the true line is y = 2x + 2. Testing the other point catches the slip in c straight away.
- Two points with the same x-coordinate make a vertical line, with equation x = that number.
The big picture
Every non-vertical straight line has an equation y = mx + c. The gradient m is the signed change in y for each 1 you move right (positive climbing, negative falling, zero flat), so from two points it's change in y ÷ change in x. c is the value of y where x = 0, where the line crosses the y-axis. Find c by putting m and any point into y = mx + c and solving, then test the other point. If both points share an x-coordinate, the change in x is 0, the gradient is undefined, and the line is vertical: x = that value, like x = 3.
Key points
Worked example
Problem
Find the equation of the straight line through (−2, 5) and (4, 2).
⚠ Watch out
Two slips cost the most. Taking c as a given point's y-coordinate: only right if that point has x = 0. And subtracting in different orders on the top and bottom of the gradient, which flips its sign. Good news: testing the other point catches both.
Memory hook
Up over across, one point in, the other to check. The step between the points gives m, one point gives c, and the other point must fit. A right equation always passes.
Check yourself
Find the line with gradient 5 through (2, 3), then put (2, 3) back in to test it. Harder: find the line through (−3, 1) and (1, 9), and check that both points fit.
Flashcards
(6)What does the gradient m of a straight line measure?
What is c in y = mx + c?
Finding a gradient from two points: which order do you subtract in?
You know m and one point on the line. How do you find c?
When is c the same as a given point's y-coordinate?
Both points have the same x-coordinate, e.g. (3, 1) and (3, 6). What's the line?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore AQA GCSE Maths topics
- Approximate solutions of equations from a graph
- Approximate solutions of quadratics from a graph
- Cubic and reciprocal graphs
- Deduce roots of quadratics algebraically
- Equation of a circle and tangent (Higher)
- Expanding single brackets
- Expanding two or more binomials (Higher)
- Factorising — taking out common factors
- Factorising quadratics ax^2+bx+c (Higher)
- Factorising quadratics x^2+bx+c
- Fibonacci, quadratic and geometric sequences
- Functions — inputs and outputs
How this lesson was checked. This AQA GCSE Maths (specification 8300)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 27 October 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.