GCSE · Maths · AQA · Spec 8300 · Foundation
Equation of a line through two points or with given gradient
Give me two points and I can write the equation of the straight line through them. By the end of this page, so can you.
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 to the left edge, which is 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, and the other point checks your answer.
What you need to know
- Gradient m = change in y ÷ change in x, subtracting in the same order on the top and the bottom.
- c is the value of y where the line crosses the y-axis, where x = 0.
- To find c, substitute one point's coordinates and m into y = mx + c, then solve.
- If you're given one point and the gradient, m is already known, so go straight to finding c.
- Check your equation by substituting the other point.
The big picture
Every straight line (except a vertical one) has an equation y = mx + c. If both points share an x-coordinate, the change in x is 0, the gradient is undefined, and the line is vertical: its equation is x = that value, like x = 3. The gradient m is how much y goes up for each 1 you move right, so from two points it's the change in y divided by the change in x. The constant c is the value of y where x = 0, which is where the line crosses the y-axis. To find c, put m and any point on the line into y = mx + c and solve. Then test the other point: a correct equation always fits it.
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 the y-coordinate of a point you were given: that's only right if its x is 0. And subtracting in a different order on the top and bottom of the gradient, which flips its sign. 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?
How can you check that your equation is right?
When is c the same as a given point's y-coordinate?
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
- 3D shapes — properties of faces, surfaces, edges, vertices
- Alternate and corresponding angles on parallel lines
- Angle properties at a point and on a line
- Angle sum in a triangle and polygons
- Approximate solutions of equations from a graph
- Approximate solutions of quadratics from a graph
- Arc lengths, angles and sector areas
- Area and volume formulae — triangles, parallelograms, trapezia, prisms, cylinders
- Box plots, quartiles, inter-quartile range (Higher)
- Calculate with roots and integer indices
- Circle definitions and properties
- Combinations of transformations and invariance (Higher)
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 29 September 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.