Curriculum fit: GCSE Maths Algebra (mainly Higher for perpendicular lines). US: Algebra I and Geometry (Expressing Geometric Properties with Equations).
On this page
What Is It?
If you know two points on a straight line, you can work out its equation. First find the gradient, then use one of the points to find the y-intercept.
Lines that are perpendicular (at right angles) have gradients that multiply to −1. This lets you find the equation of a perpendicular line through a given point.
Key Formulas and Ideas
- Gradient m = (y₂ − y₁) ÷ (x₂ − x₁).
- Then substitute a point into y = mx + c to find c.
- Perpendicular gradient = −1 ÷ m.
- Midpoint of (x₁, y₁) and (x₂, y₂) = ((x₁ + x₂)/2, (y₁ + y₂)/2).
Worked Examples
Equation From Two Points
Find the equation of the line through (2, 5) and (4, 9).
- Gradient: (9 − 5) ÷ (4 − 2) = 4 ÷ 2 = 2.
- Substitute (2, 5) into y = 2x + c: 5 = 4 + c, so c = 1.
- Write the equation: y = 2x + 1.
✓ Answer y = 2x + 1
Perpendicular Line
Find the line perpendicular to y = 2x + 3 that passes through (4, 1).
- Perpendicular gradient: −1 ÷ 2 = −½.
- Substitute (4, 1): 1 = −½ × 4 + c = −2 + c, so c = 3.
- Equation: y = −½x + 3.
✓ Answer y = −½x + 3
Midpoint
Find the midpoint of (−2, 3) and (6, 9).
- x: (−2 + 6) ÷ 2 = 2.
- y: (3 + 9) ÷ 2 = 6.
✓ Answer (2, 6)
Common Mistakes to Avoid
- Subtracting the coordinates in a different order on top and bottom.
- Finding the gradient but forgetting to find c.
- Using the reciprocal without changing the sign for a perpendicular line.
- Substituting the numbers into the wrong place in y = mx + c.
Practice Questions
Frequently Asked Questions
Does it matter which point I use to find c?
No. Both points lie on the line, so either gives the same value of c.
What is the gradient of a vertical line?
It is undefined. A vertical line has an equation of the form x = k.
Keep Going With These Guides
Straight Line Graphs: Gradient and y = mx + c
Plot straight lines, work out the gradient and read the equation from a graph. Covers y = mx + c (slope-intercept form), with worked examples.
GCSEHigh SchoolSimultaneous Equations (Systems of Equations) Step by Step
Solve two equations with two unknowns using elimination and substitution. Worked examples for GCSE simultaneous equations and Algebra 1 systems.
GCSEHigh SchoolPythagoras' Theorem: How to Find a Missing Side
Use a² + b² = c² to find any side of a right-angled triangle. Worked examples for GCSE, and the Pythagorean theorem in US Geometry.
KS3GCSEMiddle SchoolHigh SchoolSources and Review
- DfE: GCSE mathematics subject content and assessment objectives
- Common Core State Standards: Mathematics (high school)
Reviewed by StudyMorrow editorial review on 5 Nov 2026.