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

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 to the left edge, which is the y-axis, where x = 0.

Exam line: Gradient m = change in y ÷ change in x. From A to B the line goes 4 across (x: 2 to 6) and 8 up (y: 7 to 15), so m = 8 ÷ 4 = 2: it climbs 2 for every 1 across. Then c is the value of y where the line meets the y-axis. That makes this line y = 2x + 3.
Watch out: At the y-axis the point reads (0, 3), so c = 3. Not 7, and not 15. c is the value of y where the line crosses the y-axis, and neither A nor B is on the y-axis.

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 already been handed the gradient, so this is 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, and solve for c.

Spot the slip

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, 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

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 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?
How much y changes for every 1 you move in x: change in y ÷ change in x.
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.
How can you check that your equation is right?
Substitute the point you didn't use. Its coordinates must fit the equation exactly.
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.

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

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.