Geometry · JSS 2, SS 3
Equation of a straight line
Write the equation of a line from its gradient and a point on it.
- y = mx + c
- y − y1 = m(x − x1)
What the letters mean
- m
- the gradient
- c
- the y-intercept (where the line crosses the y-axis)
- (x1, y1)
- a point on the line
Worked example
Find the equation of the line with gradient 2 passing through (1, 5).
Step 1: Use y − y1 = m(x − x1)
y − 5 = 2(x − 1)
Step 2: Tidy up
y = 2x − 2 + 5 = 2x + 3
Final answer: y = 2x + 3
When to use it
Use it when a question says "find the equation of the line" and gives a gradient and a point, or two points. Use y = mx + c when you can see the y-intercept; use y − y1 = m(x − x1) for any other point. It only works for straight lines, not for curves such as y = x2.
Why it works
Take any point (x, y) on the line and a known point (x1, y1). The gradient between them must be m, so y − y1x − x1 = m. Multiply both sides by (x − x1) and you get y − y1 = m(x − x1). If the known point is (0, c), where the line crosses the y-axis, this becomes y − c = mx, which is y = mx + c.
Try it yourself
Find the equation of the straight line passing through (2, 1) and (4, 7).
Try it first, then show the solution
- Gradient first: m = 7 − 14 − 2 = 62 = 3.
- Use the point (2, 1): y − 1 = 3(x − 2).
- Expand: y − 1 = 3x − 6.
- Add 1 to both sides: y = 3x − 5.
- Check with (4, 7): 3 × 4 − 5 = 7. Correct.
Answer: y = 3x − 5
See it
Play with this picture from the Gradient, Distance and Midpoint lesson.
Your task: plot the point (3, -2)
Drag P. Remember: x first (across), then y (up or down).
Common mistakes
- Expanding the bracket wrongly, e.g. 3(x − 2) = 3x − 2. Multiply every term inside the bracket: 3 × x and 3 × (−2) = −6.
- Not checking with the second point. Always substitute the other point into your final equation; if it does not fit, there is an error.
In BECE and WASSCE
In WASSCE coordinate geometry you may be asked to find a line from two points, or to give it in a form like 3x − y − 5 = 0. SS graph work often uses y = mx + c to read off the gradient and intercept. Follow the form the question asks for.
Questions students ask
How do I find the y-intercept from y = mx + c?
The y-intercept is c, the number on its own. In y = 3x − 5, the line crosses the y-axis at (0, −5). You can confirm by putting x = 0 into the equation.
Is 2y = 4x + 6 the same as y = 2x + 3?
Yes. Divide every term of 2y = 4x + 6 by 2 and you get y = 2x + 3. Always make y the subject before reading the gradient, otherwise you might wrongly say it is 4.