Finding the equation of a straight line is one of the most tested algebra skills at GCSE. Whether you are given a gradient and a point, two points, or told the line is parallel or perpendicular to another, the goal is always the same: write the equation in the form y = mx + c.
What Is the Equation of a Line?
Every straight line on a coordinate grid can be described by an equation. The most common form is:
where m is the gradient (how steep the line is) and c is the y-intercept (where the line crosses the y-axis).
If you know the gradient and any single point on the line, you can substitute into y = mx + c to find c. If you are given two points, you first calculate the gradient, then use one of the points to find c.
Key Formulas
Step-by-Step Method
From a gradient and a point
- Write y = mx + c and substitute the given gradient for m.
- Substitute the coordinates of the point for x and y.
- Solve for c.
- Write the final equation.
From two points
- Calculate the gradient using (y₂ − y₁) / (x₂ − x₁).
- Substitute the gradient and one of the points into y = mx + c.
- Solve for c.
- Write the final equation.
Parallel or perpendicular to a given line (Higher)
- Read off or calculate the gradient of the given line.
- For a parallel line, use the same gradient. For a perpendicular line, use the negative reciprocal.
- Substitute the new gradient and the given point into y = mx + c, then solve for c.
Worked Example 1 — Foundation Level
Question: Find the equation of the line with gradient 3 that passes through (2, 11).
Working:
y = mx + c
Substitute m = 3, x = 2, y = 11:
11 = 3(2) + c
11 = 6 + c
c = 5
Answer: y = 3x + 5
Worked Example 2 — Higher Level
Question: Find the equation of the line passing through (1, 4) and (4, 13).
Working:
Gradient = (13 − 4) / (4 − 1) = 9 / 3 = 3
Substitute m = 3 and the point (1, 4) into y = mx + c:
4 = 3(1) + c
c = 1
Answer: y = 3x + 1
Worked Example 3 — Exam Style
Question: Line L has equation y = 2x − 5. Find the equation of the line perpendicular to L that passes through (6, 1).
Working:
Gradient of L = 2. The perpendicular gradient is −1/2 (negative reciprocal).
Substitute m = −1/2 and the point (6, 1) into y = mx + c:
1 = (−1/2)(6) + c
1 = −3 + c
c = 4
Answer: y = −(1/2)x + 4
Common Mistakes
- Swapping the coordinates in the gradient formula. Always subtract in the same order: (y₂ − y₁) on top and (x₂ − x₁) on the bottom. Mixing up the order gives the wrong sign.
- Forgetting the negative reciprocal for perpendicular lines. The perpendicular gradient is not just the reciprocal — you must also flip the sign. The gradient perpendicular to 3 is −1/3, not 1/3.
- Leaving c out of the final answer. After finding c, make sure you write the full equation y = mx + c. Some students solve for c but never state the equation.
Exam Tips
- Always show your substitution step — writing 11 = 3(2) + c earns method marks even if you make an arithmetic slip.
- If the question says "parallel", the gradient stays the same. If it says "perpendicular", flip and negate.
- Check your answer by substituting the given point back into your final equation to confirm it works.
Practice Questions
Q1 (Foundation): Find the equation of the line with gradient 5 that passes through (1, 8).
Q2 (Foundation): Find the equation of the line through (2, 3) and (6, 11).
Q3 (Higher): A line is parallel to y = 4x + 1 and passes through (3, 5). Find its equation.
Practise finding the equation of a line with instant feedback — completely free on GCSEMathsAI.
Related Topics
Summary
- The equation of a straight line is y = mx + c, where m is the gradient and c is the y-intercept.
- To find the equation from a gradient and a point, substitute into y = mx + c and solve for c.
- To find the equation from two points, first calculate the gradient, then substitute a point to find c.
- Parallel lines share the same gradient; perpendicular lines have gradients that multiply to −1.
- Always check your final equation by substituting a known point back in.
Test your understanding
5 quick MCQs to identify any misconceptions on this topic.
Further reading from leading academic institutions — free and open-access.