Finding Equations of Lines
Key Ideas
Key Terms
- gradient-intercept form
- Of a line is y = mx + b, where m is the gradient and b is the y-intercept.
- two points
- (1) calculate m = (y2−y1)÷(x2−x1), (2) substitute one point and m into y = mx + b to find b.
- Parallel lines
- Have equal gradients (same m, different b). e.g. y = 2x + 1 and y = 2x − 5 are parallel.
- Perpendicular lines
- Have gradients whose product is −1: m1 × m2 = −1. The perpendicular gradient is the negative reciprocal: m2 = −1/m1.
- x-intercept
- Set y = 0 and solve for x. y-intercept: set x = 0 and solve for y (or read off b directly).
Parallel vs perpendicular lines
Worked Example — Equation Through Two Points
Question: Find the equation of the line passing through (2, 1) and (4, 7).
Step 1 — Calculate the gradient.
m = (y2 − y1) ÷ (x2 − x1) = (7 − 1) ÷ (4 − 2) = 6 ÷ 2 = 3
Step 2 — Substitute into y = mx + b using point (2, 1).
1 = 3(2) + b ⇒ 1 = 6 + b ⇒ b = −5
Step 3 — Write the equation.
y = 3x − 5
Check with (4, 7): y = 3(4) − 5 = 12 − 5 = 7. ✓
Worked Example — Parallel and Perpendicular Lines
Question: A line has equation y = 2x + 5. Find the equation of: (a) a parallel line through (1, 3); (b) a perpendicular line through (1, 3).
(a) Parallel: Same gradient m = 2. Substitute (1, 3): 3 = 2(1) + b ⇒ b = 1. Equation: y = 2x + 1
(b) Perpendicular: Gradient = −1/2. Substitute (1, 3): 3 = −(1/2)(1) + b ⇒ b = 3.5. Equation: y = −½x + 3.5
Given Gradient and One Point
When you know the gradient m and one point on the line, finding the equation is a two-step process. Step 1: write the equation as y = mx + b, substituting the known gradient for m. Step 2: substitute the coordinates of the known point for x and y, then solve for b. For example, gradient = 3 and the point is (2, 7): write y = 3x + b, substitute to get 7 = 3(2) + b, so 7 = 6 + b, meaning b = 1. The equation is y = 3x + 1.
Given Two Points
When you are given two points, you need an extra step first. Step 1: calculate the gradient using m = (y2 − y1) / (x2 − x1). Step 2: substitute m and one of the two points into y = mx + b to find b. For example, for the points (1, 2) and (3, 8): m = (8 − 2) / (3 − 1) = 6/2 = 3. Then use (1, 2): 2 = 3(1) + b, so b = −1. The equation is y = 3x − 1. Check: substituting (3, 8): y = 3(3) − 1 = 8. ✓
Checking Your Equation
Always verify that your final equation satisfies both given points (if two points were provided) or the given point (if only one was given). Substitute each point's x-value into your equation and check that you get the correct y-value. This takes only a few seconds and immediately catches sign errors or arithmetic mistakes. If a check fails, look first at your value of b — errors in solving for b are the most common mistake in this type of question.
Multiple Approaches
The gradient-intercept method (finding b by substitution) is the most commonly used in Year 9. There is also the point-slope form: y − y1 = m(x − x1), which some students find quicker as it avoids solving for b separately. Both methods give identical results. For example, using point-slope with m = 3 and point (2, 7): y − 7 = 3(x − 2), which expands to y = 3x − 6 + 7 = 3x + 1. Either method is acceptable in an exam.
When b Has a Fractional or Negative Value
The y-intercept b is not always a neat whole number. For example, the line through (1, 1) and (4, 2): m = (2 − 1) / (4 − 1) = 1/3. Then 1 = (1/3)(1) + b, so b = 1 − 1/3 = 2/3. The equation is y = (1/3)x + 2/3. This is perfectly fine — always leave it as a fraction rather than rounding, unless told otherwise. Check both points to confirm.
Mastery Practice
-
Find the equation of the line passing through each pair of points. Write your answer in the form y = mx + b. Fluency
- (1, 5) and (3, 9)
- (0, 2) and (4, 10)
- (2, 7) and (6, 3)
- (−1, 1) and (3, 9)
- (0, −3) and (5, 7)
- (−2, 6) and (2, −2)
- (1, −4) and (4, 5)
- (3, 3) and (7, 7)
-
Find the equation of the line with the given gradient passing through the given point. Give your answer in y = mx + b form. Fluency
- m = 3, through (1, 4)
- m = −2, through (3, 1)
- m = 5, through (0, −4)
- m = ½, through (2, 6)
- m = −¾, through (4, 0)
- m = 4, through (−1, −5)
-
Find the x-intercept and y-intercept for each line equation. Fluency
- y = 2x − 6
- y = −3x + 9
- y = 4x + 8
- y = ½x − 2
- y = −x + 5
- y = 3x − 12
-
Parallel and perpendicular lines. Understanding
- State the gradient of a line parallel to y = 4x − 3.
- State the gradient of a line perpendicular to y = 4x − 3.
- Find the equation of a line parallel to y = 3x + 1 passing through (2, 8).
- Find the equation of a line perpendicular to y = 3x + 1 passing through (3, 4).
- Find the equation of a line perpendicular to y = −2x + 5 passing through (−2, 1).
- Two lines are y = ⅔x + 4 and y = −&frac32;x − 1. Are they parallel, perpendicular, or neither? Explain.
-
For each pair of lines defined by four points, find both equations and determine whether the lines are parallel, perpendicular, or neither. Understanding
- Line 1: (0, 1) and (2, 5). Line 2: (1, 3) and (3, 7).
- Line 1: (0, 0) and (3, 6). Line 2: (0, 4) and (6, 1).
- Line 1: (1, 2) and (4, 8). Line 2: (0, 5) and (6, 3).
-
Problem solving with equations of lines. Problem Solving
- A line passes through A(1, −2) and B(5, 6).
- Find the equation of line AB.
- Find the x-intercept of line AB.
- Find the equation of the line through B that is perpendicular to AB.
- A rectangle has one side along the line y = 2x − 1. An adjacent side passes through the point (3, 5). Find the equation of the adjacent side.
- Point P(k, 7) lies on the line through (1, 1) and (4, 7). Find the value of k.
- Two delivery routes are modelled by lines. Route A passes through depots at (0, 10) and (5, 0). Route B passes through (2, 3) and is parallel to Route A. Find the equation of each route. Do they ever meet? Explain.
- A line passes through A(1, −2) and B(5, 6).
-
Lines through the origin and special lines. Problem Solving
Recall. A line through the origin has equation y = mx (the y-intercept b = 0). Horizontal lines have equation y = k; vertical lines have equation x = c.- Find the equation of the line through the origin and the point (4, 10).
- Find the equation of the line through the origin perpendicular to y = 3x.
- A line is horizontal and passes through (5, −2). Write its equation.
- A line is vertical and passes through (−3, 7). Write its equation.
- Do the three points (0, 0), (2, 5) and (6, 15) lie on the same line? Justify your answer by finding the equation of the line through (0, 0) and (2, 5), then checking whether (6, 15) satisfies it.
-
Using geometric conditions to find line equations. Problem Solving
- Triangle ABC has vertices A(0, 0), B(6, 0) and C(3, 6).
- Find the equation of side AB.
- Find the equation of side AC.
- Find the equation of the line from B to the midpoint of AC.
- A line L1 passes through (1, 4) and (3, 8). A second line L2 is perpendicular to L1 and passes through (3, 8).
- Find the equation of L1.
- Find the equation of L2.
- Find the coordinates of the point where L2 crosses the y-axis.
- Triangle ABC has vertices A(0, 0), B(6, 0) and C(3, 6).
-
Finding intersection points. Problem Solving
Method. To find where two lines intersect, set the two equations equal (since y is the same at the intersection) and solve for x, then substitute to find y.- Find the point where y = 2x + 1 and y = −x + 7 intersect.
- Find the point where y = 3x − 5 and y = x + 3 intersect.
- Two lines have equations y = ½x + 4 and y = −2x − 1. Find their intersection point and verify it lies on both lines.
- Line A passes through (0, 6) and (3, 0). Line B passes through (0, 0) and (2, 4). Find the equations of both lines and determine their intersection point.
-
Extended modelling problems. Problem Solving
- A road runs straight from town P(2, 3) to town Q(10, 11), where coordinates are in kilometres.
- Find the equation of this road.
- A water pipe runs perpendicular to the road and passes through the point R(8, 4). Find the equation of the pipe.
- Find the point where the pipe meets the road.
- Three points are A(0, 2), B(4, 10) and C(6, k).
- Find the equation of the line through A and B.
- Find the value of k such that C lies on this line.
- Find the value of k such that BC is perpendicular to AB.
- A road runs straight from town P(2, 3) to town Q(10, 11), where coordinates are in kilometres.