How do you find the equation of a straight line?
To find the equation of a straight line, first work out the gradient, then substitute it and one point into y − b = m(x − a). In SQA National 5 Maths you do this when given two points, or one point and the gradient. Simplify to the form y = mx + c. Example: Find the line through (2, 3) and (6, 11). m = (11 − 3) ÷ (6 − 2) = 2. y − 3 = 2(x − 2). Answer: y = 2x − 1
Quick answer: Find the gradient, then use y − b = m(x − a) with a point on the line. Tidy the result into y = mx + c.
What the specification expects
This is in the Algebraic skills of the SQA National 5 Mathematics course specification (determining the equation of a straight line). You need to:
- use y − b = m(x − a), or an equivalent method, given two points or one point and the gradient
- find the gradient from two points using m = (y2 − y1) ÷ (x2 − x1)
- identify the gradient and y-intercept from different forms of the equation
Method
- If you have two points, find the gradient m.
- Choose one point (a, b).
- Substitute into y − b = m(x − a).
- Expand and write the answer as y = mx + c.
Worked example 1: two points
Find the equation of the line through (2, 3) and (6, 11).
- m = (11 − 3) ÷ (6 − 2) = 8 ÷ 4 = 2.
- y − 3 = 2(x − 2).
- y = 2x − 4 + 3 = 2x − 1.
- Check (6, 11): 2 × 6 − 1 = 11.
Answer: y = 2x − 1
Worked example 2: a point and the gradient
Find the line with gradient −3 through (−1, 4).
- y − 4 = −3(x + 1).
- y = −3x − 3 + 4.
Answer: y = −3x + 1
Worked example 3: a parallel line
Find the line parallel to 3x + y = 7 through (1, 2).
- Rearrange: y = −3x + 7, so the gradient is −3.
- Parallel lines have equal gradients.
- y − 2 = −3(x − 1), so y = −3x + 5.
Answer: y = −3x + 5
Worked example 4: from a graph
A line passes through (0, 5) and (4, 1). Find its equation.
- m = (1 − 5) ÷ (4 − 0) = −1.
- The y-intercept is 5.
Answer: y = −x + 5
Common mistakes
- Subtracting the coordinates in a different order on the top and bottom of the gradient.
- Writing y − b = m(x − a) with the signs of a and b the wrong way round.
- Forgetting to expand the bracket and tidy to y = mx + c.
- Not checking the second point.
FAQs
Do I need y = mx + c?
Not always. y − b = m(x − a) works from any point, then you can tidy.
What is the gradient of a parallel line?
It is the same as the original line.
Want one-to-one help? Find an online Maths tutor with ExpertTutor.
Want one-to-one support?
One-to-one online tuition can help you build confidence in your subject. Find a tutor who teaches your course.
Find a TutorLearn face to face in Glasgow
Prefer in-person lessons? Visit the ExpertTutor Glasgow Southside centre.
See the centre