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

0246805101520xy(4, 11)

x: 4. y: 11

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.

Exam line: From A to B, x goes 2 → 6 (that's 4 across) and y goes 7 → 15 (that's 8 up). Gradient m = change in y ÷ change in x = 8 ÷ 4 = 2, so the line climbs 2 for every 1 across. Slide to the y-axis and you read c = 3. Put them together: y = 2x + 3.
Watch out: Tempted to say c = 7, or c = 15? Neither A nor B is on the y-axis. c is the y-value where the line actually crosses it, at x = 0, and here that's 3.

Watch it done: a line through two points

Problem

Find the equation of the straight line through P(1, 5) and Q(4, 14).

Your turn

One point and a gradient

A straight line has gradient 4 and passes through the point (3, 5). Find its equation. (You've been handed the gradient, so this is just the second half of the method you just watched.)

  1. y = 4x + cThe gradient is given, so m = 4 goes straight in. Only c is unknown.
  2. missing step
Which line is step 2?

Exam line: Given a point and the gradient: put m straight into y = mx + c, substitute the point, solve for c.

Find the faulty line

Where does this answer go wrong?

Find the equation of the straight line through (−1, 8) and (3, 0).

A student's answer — which line goes wrong?

Exam line: Start both subtractions from the same point, then test the other point in your final equation.

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

1Two points, or one point and a gradient, are enough to fix a straight line completely.
2A line that falls from left to right has a negative gradient. If your m says otherwise, check your subtraction order.
3A point's y-coordinate is c only when that point has x = 0.
4Every point on the line fits its equation, so the other point you were given is a built-in check.

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?
How much y changes for every 1 you move right: change in y ÷ change in x. Negative if the line falls.
What is c in y = mx + c?
The value of y where the line crosses the y-axis, which is the value of y when x = 0.
Finding a gradient from two points: which order do you subtract in?
The same order on the top and the bottom. Start both subtractions from the same point.
You know m and one point on the line. How do you find c?
Substitute the point's x and y and the value of m into y = mx + c, then solve for c.
When is c the same as a given point's y-coordinate?
Only when that point has x = 0, so it sits on the y-axis.
Both points have the same x-coordinate, e.g. (3, 1) and (3, 6). What's the line?
A vertical line. The change in x is 0, so the gradient is undefined; the equation is x = 3.

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 posted

More AQA GCSE Maths topics

See the full AQA Maths curriculum →

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.

Helpful guides for parents and students