Coordinate geometry
Gradient, y = mx + c, midpoints, lengths and parallel and perpendicular lines, all built from one picture: the gradient triangle. Learn to write the equation of any straight line in four steps.
mentorriyaz.in
In 30 seconds
- Gradient = rise ÷ run = (y₂ − y₁) ÷ (x₂ − x₁). Every straight line has the equation y = mx + c, where m is the gradient and c is where it crosses the y-axis.
- The midpoint is the average of the x-values and the y-values. The length of a line segment comes from Pythagoras on the gradient triangle.
- Parallel lines have the same m. Perpendicular lines (Extended) have gradients that multiply to −1.
By the end you can
- Find the gradient of a line from a graph or from two points.
- Write down the gradient and y-intercept from y = mx + c, and rearrange equations into this form.
- Find the midpoint and the length of a line segment.
- Find the equation of a line from its gradient and a point, or from two points.
- Find the equation of a line parallel to a given line.
- Use m₁ × m₂ = −1 for perpendicular lines and find a perpendicular bisector. EXT
1Gradient
Rise over run
Gradient — how steep a line is. It is the change in y (rise) divided by the change in x (run) between any two points on the line.
- Any two points on the line give the same gradient. A straight line is the same steepness everywhere.
- Read from a graph: use the scale on the axes, not the number of squares. Choose two points that sit exactly on grid crossings and as far apart as you can.
Find the gradient of the line through A(1, 2) and B(5, 8).
- rise = 8 − 2 = 6
- run = 5 − 1 = 4
- m = 6 ÷ 4 = 1.5
Find the gradient of the line through (−2, 5) and (4, −1).
- rise = −1 − 5 = −6
- run = 4 − (−2) = 6
- m = −6 ÷ 6 = −1
- the line falls as you go right
Four kinds of gradient
- Positive: the line rises from left to right. Negative: it falls.
- Zero: a horizontal line y = c is flat, so rise = 0.
- Undefined: a vertical line x = c has run = 0, and you cannot divide by 0. It has no gradient.
- Steeper = bigger number (ignoring the sign): m = 3 is steeper than m = 1 and m = −4 is steeper than m = −2.
Find the gradient of the line through (3, 4) and (7, 4).
- rise = 4 − 4 = 0
- run = 7 − 3 = 4
- m = 0 ÷ 4 = 0, a horizontal line y = 4
The line through (1, 3) and (5, k) has gradient 2. Find k.
- gradient = k − 35 − 1 = 2
- k − 3 = 8
- k = 11
- check: (11 − 3) ÷ 4 = 2 ✓
Are three points in a straight line?
- Collinear points lie on one straight line. Find the gradient of the first pair and of the second pair. If they match, the points are collinear.
Show that A(1, 2), B(3, 6) and C(5, 10) lie on a straight line.
- gradient AB = (6 − 2) ÷ (3 − 1) = 4 ÷ 2 = 2
- gradient BC = (10 − 6) ÷ (5 − 3) = 4 ÷ 2 = 2
- the gradients are equal and B is shared, so the points are collinear
2The equation of a straight line
y = mx + c
y-intercept — the point where the line crosses the y-axis. It always has x = 0, so the point is (0, c).
- To read m and c, the equation must start with y = … Rearrange first if it does not (see Algebraic manipulation).
- Sign matters: in y = 3x − 5 the intercept is c = −5, so the line crosses at (0, −5).
Write down the gradient and y-intercept of y = 3x − 5.
- compare with y = mx + c
- gradient m = 3
- y-intercept c = −5, so the point is (0, −5)
Find the gradient and y-intercept of 4x + 2y = 10.
- rearrange to y = … : 2y = −4x + 10
- divide by 2: y = −2x + 5
- gradient −2, y-intercept 5
Does the point (3, 10) lie on the line y = 2x + 4?
- substitute x = 3: y = 2(3) + 4 = 10
- this equals the y-value, so yes, it lies on the line
How m and c change the line
- Bigger m = steeper line. c = 0 means the line passes through the origin (0, 0).
- Same m, different c = parallel lines. They are the same steepness but start at different heights.
Write the equation of the line with gradient −2 that crosses the y-axis at (0, 5).
- use y = mx + c with m = −2 and c = 5
- y = −2x + 5
Horizontal and vertical lines
- Horizontal: y = 4 is the line where every point has y = 4. Its gradient is 0.
- Vertical: x = 3 is the line where every point has x = 3. It has no gradient and it cannot be written as y = mx + c.
Lines written as ax + by = c
- Cover-up method: put x = 0 to find where the line crosses the y-axis. Put y = 0 to find where it crosses the x-axis. Join the two points to draw the line.
- Gradient of ax + by = c: rearrange to y = … or use the shortcut m = −a ÷ b.
Find where the line 2x + 3y = 12 crosses the axes, and write down its gradient.
- x = 0: 3y = 12, so y = 4: point (0, 4)
- y = 0: 2x = 12, so x = 6: point (6, 0)
- gradient = −2 ÷ 3 = −23
Find the intercepts of 5x − 2y = 20.
- x = 0: −2y = 20, so y = −10: point (0, −10)
- y = 0: 5x = 20, so x = 4: point (4, 0)
- check (4, 0): 5(4) = 20 ✓
The line in real life
- Gradient = rate of change. In a cost graph C = 0.5d + 3 the gradient 0.5 is the cost per kilometre and the y-intercept 3 is the fixed charge.
- Units of the gradient: (units of y) ÷ (units of x), such as $ per km or metres per second. Always say what the gradient means.
A taxi charges a fixed fee plus a cost per kilometre. The cost is C = 0.5d + 3 dollars for d kilometres. What does the 3 mean? What is the cost of 12 km?
- the 3 is the fixed fee ($3 before you travel)
- C = 0.5 × 12 + 3 = 6 + 3 = $9
3Midpoint and length of a line
The midpoint
Midpoint — the point exactly halfway between two points on a line segment.
Find the midpoint of A(2, 1) and B(8, 5).
- x: (2 + 8) ÷ 2 = 5
- y: (1 + 5) ÷ 2 = 3
- M = (5, 3)
Find the midpoint of (−3, 4) and (7, −2).
- x: (−3 + 7) ÷ 2 = 4 ÷ 2 = 2
- y: (4 + (−2)) ÷ 2 = 2 ÷ 2 = 1
- M = (2, 1)
M(4, 5) is the midpoint of AB and A is (1, 2). Find B.
- x: from 1 to 4 is +3, so keep going: 4 + 3 = 7
- y: from 2 to 5 is +3, so 5 + 3 = 8
- B = (7, 8)
- check: (1 + 7) ÷ 2 = 4 and (2 + 8) ÷ 2 = 5 ✓
The length of a line segment
- Steps: (1) find the run and the rise by subtracting; (2) square both and add; (3) square root the total.
- Negative differences are fine: a negative squared is positive. Square the whole difference.
Find the length of AB where A is (1, 1) and B is (7, 9).
- run = 7 − 1 = 6 and rise = 9 − 1 = 8
- AB² = 6² + 8² = 36 + 64 = 100
- AB = √100 = 10 units
Find the length of the line from (−2, 3) to (4, −1). Give your answer to 3 significant figures.
- run = 4 − (−2) = 6 and rise = −1 − 3 = −4
- length² = 6² + (−4)² = 36 + 16 = 52
- length = √52 = 7.21 units
The vertices of a triangle are A(0, 0), B(3, 4) and C(6, 0). Show that the triangle is isosceles.
- AB = √(3² + 4²) = √25 = 5
- BC = √((6 − 3)² + (0 − 4)²) = √(9 + 16) = 5
- AB = BC, so the triangle is isosceles
EXT The distance from (1, 2) to (k, 5) is 5. Find the possible values of k.
- (k − 1)² + (5 − 2)² = 25
- (k − 1)² + 9 = 25, so (k − 1)² = 16
- k − 1 = 4 or k − 1 = −4
- k = 5 or k = −3
4Parallel lines
Same gradient, different c
Parallel lines — lines with the same gradient. They are always the same distance apart and never meet.
- To check: rearrange both equations to y = mx + c and compare the m values.
- To find a parallel line: keep the same m and find a new c by substituting a point on the new line.
Which of these lines are parallel? y = 2x + 1, 4x − 2y = 5, y = −2x + 3.
- line 1: m = 2
- line 2: −2y = −4x + 5, so y = 2x − 2.5, m = 2
- line 3: m = −2
- lines 1 and 2 are parallel
Find the equation of the line parallel to y = 3x − 2 that passes through (2, 7).
- parallel, so m = 3: y = 3x + c
- substitute (2, 7): 7 = 3(2) + c = 6 + c
- c = 1
- y = 3x + 1
5Equation of a line from information
Four steps to any line
- Step 1: find the gradient m. Step 2: write y = mx + c with that m. Step 3: substitute one known point to find c. Step 4: write the full equation and check with the other point.
- If you are given m and a point, start at step 2.
Find the equation of the line through (2, 3) and (4, 7).
- m = (7 − 3) ÷ (4 − 2) = 2
- y = 2x + c
- substitute (2, 3): 3 = 2(2) + c, so c = −1
- y = 2x − 1
- check (4, 7): 2(4) − 1 = 7 ✓
Find the equation of the line through (−1, 5) and (3, −3).
- m = (−3 − 5) ÷ (3 − (−1)) = −8 ÷ 4 = −2
- y = −2x + c
- substitute (−1, 5): 5 = −2(−1) + c = 2 + c, so c = 3
- y = −2x + 3
- check (3, −3): −2(3) + 3 = −3 ✓
Find the equation of the line with gradient 12 that passes through (6, 1).
- y = 12x + c
- substitute (6, 1): 1 = 3 + c
- c = −2
- y = 12x − 2
A line crosses the y-axis at (0, −4) and the x-axis at (2, 0). Find its equation.
- m = (0 − (−4)) ÷ (2 − 0) = 4 ÷ 2 = 2
- the y-intercept is given: c = −4
- y = 2x − 4
6Perpendicular lines EXT
Negative reciprocals
Perpendicular lines — lines that meet at 90°. Their gradients multiply to −1.
- EXT Flip the fraction and change the sign: 2 → −12, −34 → 43, 5 → −15.
- EXT A horizontal line (m = 0) is perpendicular to a vertical line. This is the only case where the rule does not work.
EXT Find the equation of the line perpendicular to y = 2x + 1 that passes through (4, 3).
- gradient of the given line = 2, so m = −12
- y = −12x + c
- substitute (4, 3): 3 = −2 + c, so c = 5
- y = −12x + 5
EXT Show that 3y = x + 6 and y = −3x + 2 are perpendicular.
- line 1: y = 13x + 2, so m₁ = 13
- line 2: m₂ = −3
- m₁ × m₂ = 13 × (−3) = −1, so the lines are perpendicular
EXT Find the line perpendicular to 2y + 3x = 6 that passes through (3, 1).
- 2y = −3x + 6, so y = −32x + 3, giving m₁ = −32
- perpendicular: m₂ = 23
- y = 23x + c, and 1 = 23(3) + c = 2 + c, so c = −1
- y = 23x − 1
Perpendicular bisector
Perpendicular bisector — the line that passes through the midpoint of AB and is perpendicular to AB.
- EXT Steps: (1) find the midpoint of AB; (2) find the gradient of AB; (3) take the negative reciprocal; (4) use the midpoint and the new gradient to find c.
EXT A is (1, 2) and B is (5, 6). Find the equation of the perpendicular bisector of AB.
- midpoint M = (3, 4)
- gradient of AB = (6 − 2) ÷ (5 − 1) = 1
- perpendicular gradient = −1
- y = −x + c, and 4 = −3 + c, so c = 7
- y = −x + 7
EXT A is (−2, 1) and B is (4, 5). Find the perpendicular bisector of AB.
- midpoint M = (1, 3)
- gradient of AB = 4 ÷ 6 = 23
- perpendicular gradient = −32
- 3 = −32(1) + c, so c = 4.5
- y = −1.5x + 4.5
- check M: −1.5 + 4.5 = 3 ✓
7Test yourself
Test yourself — cover the answers first
Quick check
- Which is steeper: a line with m = −5 or a line with m = 3?
- EXT What is the gradient of a line perpendicular to y = 4x − 1?
- Find the gradient of the line through (1, 3) and (4, 12).
- Find the gradient of the line through (2, 7) and (6, 3).
- Write down the gradient of y = 5 − 2x.
- Write down the y-intercept of y = 4x − 7.
- Find the gradient and y-intercept of 3x + y = 8.
- What is the gradient of the horizontal line y = 6?
- Does the vertical line x = 2 have a gradient?
- Find the points where 3x + 4y = 24 crosses the axes.
- Does the point (2, −3) lie on y = 4x − 11?
- Find the midpoint of (4, 1) and (10, 7).
- Find the midpoint of (−6, 3) and (2, −5).
- Find the distance from (0, 0) to (5, 12).
- Find the distance from (1, 2) to (4, 6).
- Find the distance from (−1, −2) to (3, 1).
- Find the line parallel to y = 2x + 5 that passes through (0, −1).
- Find the line parallel to y = −x + 4 that passes through (3, 2).
- Find the equation of the line with gradient 3 through (1, 5).
- Find the equation of the line through (0, 3) and (4, 11).
- A is (2, 3) and the midpoint of AB is (5, 7). Find B.
- Show that (0, 1), (2, 5) and (5, 11) are collinear.
- EXT What is the gradient of a line perpendicular to a line with gradient −23?
- EXT Are y = 2x + 3 and 2y + x = 4 perpendicular?
- EXT Find the line perpendicular to y = −3x + 2 that passes through (6, 5).
- EXT Find the perpendicular bisector of A(0, 0) and B(6, 2).
- EXT Find the length of the line from (−3, 2) to (1, 6) to 2 decimal places.
Exam-style
- Find the equation of the line through (1, 4) and (3, 10). [3]
- A is (−2, 3) and B is (6, 9). Find (a) the midpoint of AB and (b) the length of AB. [4]
- The line L passes through (0, −2) and is parallel to 3x − y = 5. Find the equation of L. [3]
- A taxi charges a fixed fee plus a rate per kilometre. A 4 km journey costs $11 and a 10 km journey costs $20. Find the formula C = md + c and say what m means. [4]
- A is (1, 1), B is (4, 5) and C is (8, 2). Show that triangle ABC is right-angled. [4]
- Show that P(−1, 0), Q(2, 6) and R(4, 10) lie on a straight line. [3]
- EXT The line L₁ has equation 3x + 2y = 12. The line L₂ is perpendicular to L₁ and passes through (3, 5). Find the equation of L₂. [4]
- EXT A is (−1, −2) and B is (5, 2). Find the equation of the perpendicular bisector of AB. [5]
- EXT AB is a diameter of a circle with A(1, 2) and B(7, 10). Find the centre and the radius. [4]
- EXT The line through (3, k) and (7, 10) has gradient 32. Find k. [3]
- EXT Find the coordinates of the point where y = 2x + 3 meets y = −x + 9. [3]
Show answers
- m = −5, since 5 is bigger than 3. The minus sign only tells you it falls.
- −14
- 3
- −1
- −2
- (0, −7)
- gradient −3, y-intercept 8
- 0
- No, it is undefined
- (0, 6) and (8, 0)
- Yes: 4(2) − 11 = −3
- (7, 4)
- (−2, −1)
- 13
- 5
- 5
- y = 2x − 1
- y = −x + 5
- y = 3x + 2
- y = 2x + 3
- (8, 11)
- both gradients are 2
- 32
- Yes: the gradients are 2 and −12, and 2 × (−12) = −1
- y = 13x + 3
- M = (3, 1), gradient −3, so y = −3x + 10
- √32 = 5.66
- m = (10 − 4) ÷ (3 − 1) = 3
y = 3x + c and 4 = 3 + c, so c = 1
y = 3x + 1 - (a) ((−2 + 6) ÷ 2, (3 + 9) ÷ 2) = (2, 6)
(b) run = 8 and rise = 6, so AB = √(64 + 36) = √100 = 10 - rearrange: y = 3x − 5, so m = 3
L has the same gradient and c = −2
y = 3x − 2 - m = (20 − 11) ÷ (10 − 4) = 1.5
11 = 1.5(4) + c, so c = 5
C = 1.5d + 5
m = $1.50 per kilometre - AB² = 3² + 4² = 25
BC² = 4² + 3² = 25
AC² = 7² + 1² = 50
AB² + BC² = 50 = AC², so the angle at B is 90° - gradient PQ = 6 ÷ 3 = 2
gradient QR = 4 ÷ 2 = 2
equal gradients and Q is shared, so P, Q and R are collinear - 2y = −3x + 12, so m₁ = −1.5
m₂ = 23
5 = 23(3) + c = 2 + c, so c = 3
y = 23x + 3 - midpoint = (2, 0)
gradient AB = 4 ÷ 6 = 23
perpendicular gradient = −1.5
0 = −1.5(2) + c, so c = 3
y = −1.5x + 3 - centre = midpoint = (4, 6)
AB = √(6² + 8²) = √100 = 10
radius = 10 ÷ 2 = 5 - (10 − k) ÷ (7 − 3) = 1.5
10 − k = 6
k = 4 - 2x + 3 = −x + 9, so 3x = 6 and x = 2
y = 2(2) + 3 = 7
(2, 7)
Send it to me on WhatsApp. I read every message.
Want regular help? Send this to your parent →