← All notesMaths · Coordinate geometry⬇ Download PDF
IGCSE Mathematics 0580 · Chapter 6 notes · ~25 min read

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.

Gradienty = mx + cMidpoint & lengthParallel & perpendicular lines
RSby Riyaz Sir
mentorriyaz.in
No tag = Core (everyone)EXTENDED Extended onlyhighlight = comes up again and againTest yourself at the end

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

xy12345671234567890A (1, 2)B (5, 8)run = 4rise = 6gradient m = rise ÷ run= (y2 − y1) ÷ (x2 − x1)= (8 − 2) ÷ (5 − 1)= 6 ÷ 4= 1.5Always subtract in thesame order on top andbottom.
Draw a right-angled triangle under the line: the vertical side is the rise and the horizontal side is the 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.

gradient m = y₂ − y₁x₂ − x₁
subtract the coordinates in the same order on top and bottom
  • 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.
Worked example

Find the gradient of the line through A(1, 2) and B(5, 8).

  1. rise = 8 − 2 = 6
  2. run = 5 − 1 = 4
  3. m = 6 ÷ 4 = 1.5
Worked example

Find the gradient of the line through (−2, 5) and (4, −1).

  1. rise = −1 − 5 = −6
  2. run = 4 − (−2) = 6
  3. m = −6 ÷ 6 = −1
  4. the line falls as you go right
Common mistakeSubtracting in a different order on top and bottom, such as (8 − 2) ÷ (1 − 5). That gives −1.5 and the wrong sign. Keep the same point first on both lines.

Four kinds of gradient

positiverises: m > 0y = 2x + 1negativefalls: m < 0y = −x + 3zeroflat: m = 0y = 4undefinedvertical: no mx = 3
Read a line from left to right: if it climbs the gradient is positive, if it drops it is negative.
  • 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.
Worked example

Find the gradient of the line through (3, 4) and (7, 4).

  1. rise = 4 − 4 = 0
  2. run = 7 − 3 = 4
  3. m = 0 ÷ 4 = 0, a horizontal line y = 4
Worked example

The line through (1, 3) and (5, k) has gradient 2. Find k.

  1. gradient = k − 35 − 1 = 2
  2. k − 3 = 8
  3. k = 11
  4. 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.
Worked example

Show that A(1, 2), B(3, 6) and C(5, 10) lie on a straight line.

  1. gradient AB = (6 − 2) ÷ (3 − 1) = 4 ÷ 2 = 2
  2. gradient BC = (10 − 6) ÷ (5 − 3) = 4 ÷ 2 = 2
  3. the gradients are equal and B is shared, so the points are collinear

2The equation of a straight line

y = mx + c

xy-2-11234-2-112345670(0, 1)12y = 2x + 1y = mx + cm = gradient(steepness: rise ÷ run)c = y-intercept(where the line crossesthe y-axis)here m = 2 and c = 1
Every point on the line has coordinates that fit the equation. m tells you the slope and c tells you where the line starts on the y-axis.

y-intercept — the point where the line crosses the y-axis. It always has x = 0, so the point is (0, c).

y = mx + c
m = gradient, c = y-intercept
  • 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).
Worked example

Write down the gradient and y-intercept of y = 3x − 5.

  1. compare with y = mx + c
  2. gradient m = 3
  3. y-intercept c = −5, so the point is (0, −5)
Worked example

Find the gradient and y-intercept of 4x + 2y = 10.

  1. rearrange to y = … : 2y = −4x + 10
  2. divide by 2: y = −2x + 5
  3. gradient −2, y-intercept 5
Worked example

Does the point (3, 10) lie on the line y = 2x + 4?

  1. substitute x = 3: y = 2(3) + 4 = 10
  2. this equals the y-value, so yes, it lies on the line
Common mistakeReading the gradient from 3y = 6x + 12 as 6. Divide every term by 3 first: y = 2x + 4, so m = 2.

How m and c change the line

Change m: the steepnessxyy = 0.5xy = xy = 2xy = −xChange c: shifts up or downxyy = x + 3y = xy = x − 2c = 0: all pass through the originsame m = 1: the lines are parallel
Changing m changes the steepness. Changing c slides the whole line up or down without turning it.
  • 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.
Worked example

Write the equation of the line with gradient −2 that crosses the y-axis at (0, 5).

  1. use y = mx + c with m = −2 and c = 5
  2. y = −2x + 5
Memory trickm = "how much y changes for each 1 step right". y = 3x + 2 means: start at 2 on the y-axis and go up 3 for every 1 step to the right.

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.
Common mistakeMixing them up. x = 3 is vertical (it crosses the x-axis at 3). y = 3 is horizontal (it crosses the y-axis at 3). Remember: x = 3 cuts the x-axis at 3 and stands upright, like a post.

Lines written as ax + by = c

xy-11234567-1123450(6, 0)(0, 4)2x + 3y = 12ax + by = cx = 0: 3y = 12, y = 4y = 0: 2x = 12, x = 6join (0, 4) and (6, 0)or rearrange:3y = −2x + 12y = −(2/3)x + 4
To find where the line crosses each axis, set x = 0 for the y-intercept and y = 0 for the x-intercept.
  • 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.
Worked example

Find where the line 2x + 3y = 12 crosses the axes, and write down its gradient.

  1. x = 0: 3y = 12, so y = 4: point (0, 4)
  2. y = 0: 2x = 12, so x = 6: point (6, 0)
  3. gradient = −2 ÷ 3 = −23
Worked example

Find the intercepts of 5x − 2y = 20.

  1. x = 0: −2y = 20, so y = −10: point (0, −10)
  2. y = 0: 5x = 20, so x = 4: point (4, 0)
  3. 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.
Worked example

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?

  1. the 3 is the fixed fee ($3 before you travel)
  2. C = 0.5 × 12 + 3 = 6 + 3 = $9

3Midpoint and length of a line

The midpoint

xy12345678912345670A (2, 1)B (8, 5)M (5, 3)midpoint =the average of thex-values and theaverage of the y-valuesx: (2 + 8) ÷ 2 = 5y: (1 + 5) ÷ 2 = 3M = (5, 3)
The midpoint is halfway along the line, so its coordinates are the averages of the end coordinates.

Midpoint — the point exactly halfway between two points on a line segment.

midpoint M = (x₁ + x₂2 , y₁ + y₂2)
add and halve the x-values, then add and halve the y-values
Worked example

Find the midpoint of A(2, 1) and B(8, 5).

  1. x: (2 + 8) ÷ 2 = 5
  2. y: (1 + 5) ÷ 2 = 3
  3. M = (5, 3)
Worked example

Find the midpoint of (−3, 4) and (7, −2).

  1. x: (−3 + 7) ÷ 2 = 4 ÷ 2 = 2
  2. y: (4 + (−2)) ÷ 2 = 2 ÷ 2 = 1
  3. M = (2, 1)
Worked example

M(4, 5) is the midpoint of AB and A is (1, 2). Find B.

  1. x: from 1 to 4 is +3, so keep going: 4 + 3 = 7
  2. y: from 2 to 5 is +3, so 5 + 3 = 8
  3. B = (7, 8)
  4. check: (1 + 7) ÷ 2 = 4 and (2 + 8) ÷ 2 = 5 ✓
Memory trickFinding an end point: the midpoint is the same distance from both ends, so jump again by the same amount. Or use B = 2M − A for each coordinate.

The length of a line segment

xy12345678123456789100A (1, 1)B (7, 9)6810length of ABuse Pythagoras:AB² = run² + rise²AB² = 6² + 8²AB² = 36 + 64 = 100AB = √100 = 10
Draw a right-angled triangle on the line. The line is the hypotenuse, so use Pythagoras.
length AB = √((x₂ − x₁)² + (y₂ − y₁)²)
this is just Pythagoras on the gradient triangle
  • 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.
Worked example

Find the length of AB where A is (1, 1) and B is (7, 9).

  1. run = 7 − 1 = 6 and rise = 9 − 1 = 8
  2. AB² = 6² + 8² = 36 + 64 = 100
  3. AB = √100 = 10 units
Worked example

Find the length of the line from (−2, 3) to (4, −1). Give your answer to 3 significant figures.

  1. run = 4 − (−2) = 6 and rise = −1 − 3 = −4
  2. length² = 6² + (−4)² = 36 + 16 = 52
  3. length = √52 = 7.21 units
Worked example

The vertices of a triangle are A(0, 0), B(3, 4) and C(6, 0). Show that the triangle is isosceles.

  1. AB = √(3² + 4²) = √25 = 5
  2. BC = √((6 − 3)² + (0 − 4)²) = √(9 + 16) = 5
  3. AB = BC, so the triangle is isosceles
Worked example

EXT The distance from (1, 2) to (k, 5) is 5. Find the possible values of k.

  1. (k − 1)² + (5 − 2)² = 25
  2. (k − 1)² + 9 = 25, so (k − 1)² = 16
  3. k − 1 = 4 or k − 1 = −4
  4. k = 5 or k = −3
Common mistakeForgetting the final square root. 6² + 8² = 100 is the length squared. The length is √100 = 10.
Exam tipDraw a quick sketch of the two points and the triangle. It shows you the sizes of the run and rise and tells you whether your answer is sensible: the length must be longer than the rise and the run.

4Parallel lines

Same gradient, different c

xy-2-11234-5-4-3-2-112345670y = 2x + 1y = 2x − 31212Parallel lineshave the SAME gradient.y = 2x + 1 has m = 2y = 2x − 3 has m = 2Different c, so theynever meet.
Parallel lines climb at exactly the same rate, so they never meet.

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.
Worked example

Which of these lines are parallel? y = 2x + 1, 4x − 2y = 5, y = −2x + 3.

  1. line 1: m = 2
  2. line 2: −2y = −4x + 5, so y = 2x − 2.5, m = 2
  3. line 3: m = −2
  4. lines 1 and 2 are parallel
Worked example

Find the equation of the line parallel to y = 3x − 2 that passes through (2, 7).

  1. parallel, so m = 3: y = 3x + c
  2. substitute (2, 7): 7 = 3(2) + c = 6 + c
  3. c = 1
  4. y = 3x + 1
Common mistakeSaying y = 3x − 2 and y = −3x − 2 are parallel because they have the "same number". They have different gradients (3 and −3). They cross the y-axis at the same point, so they are not parallel.

5Equation of a line from information

Four steps to any line

Find the equation of the line through (2, 3) and (4, 7)1Find the gradientm = (7 − 3) ÷ (4 − 2) = 22Write y = mx + cy = 2x + c3Substitute one point3 = 2(2) + c4Solve for cc = −1, so y = 2x − 1check with the other point (4, 7): 2(4) − 1 = 7 ✓
Find m, write y = mx + c, substitute a point to find c, then check with the other point.
  • 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.
Worked example

Find the equation of the line through (2, 3) and (4, 7).

  1. m = (7 − 3) ÷ (4 − 2) = 2
  2. y = 2x + c
  3. substitute (2, 3): 3 = 2(2) + c, so c = −1
  4. y = 2x − 1
  5. check (4, 7): 2(4) − 1 = 7 ✓
Worked example

Find the equation of the line through (−1, 5) and (3, −3).

  1. m = (−3 − 5) ÷ (3 − (−1)) = −8 ÷ 4 = −2
  2. y = −2x + c
  3. substitute (−1, 5): 5 = −2(−1) + c = 2 + c, so c = 3
  4. y = −2x + 3
  5. check (3, −3): −2(3) + 3 = −3 ✓
Worked example

Find the equation of the line with gradient 12 that passes through (6, 1).

  1. y = 12x + c
  2. substitute (6, 1): 1 = 3 + c
  3. c = −2
  4. y = 12x − 2
Worked example

A line crosses the y-axis at (0, −4) and the x-axis at (2, 0). Find its equation.

  1. m = (0 − (−4)) ÷ (2 − 0) = 4 ÷ 2 = 2
  2. the y-intercept is given: c = −4
  3. y = 2x − 4
Exam tipThe y-intercept is a shortcut: if the line crosses the y-axis at (0, c) you already know c, and you only need to find m.
Common mistakePutting the x-coordinate and the y-coordinate the wrong way round when you substitute a point. In the point (2, 3) the x is 2 and the y is 3.

6Perpendicular lines EXT

Negative reciprocals

xym = 2m = −½Perpendicular linesmeet at 90°.m1 × m2 = −12 × (−½) = −1Flip the fraction andchange the sign:2 → −½¾ → −4/3
If one line has gradient m, a line at 90° to it has gradient −1/m: flip the fraction and change the sign.

Perpendicular lines — lines that meet at 90°. Their gradients multiply to −1.

m₁ × m₂ = −1
so m₂ = −1 ÷ m₁, the negative reciprocal
  • 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.
Worked example

EXT Find the equation of the line perpendicular to y = 2x + 1 that passes through (4, 3).

  1. gradient of the given line = 2, so m = −12
  2. y = −12x + c
  3. substitute (4, 3): 3 = −2 + c, so c = 5
  4. y = −12x + 5
Worked example

EXT Show that 3y = x + 6 and y = −3x + 2 are perpendicular.

  1. line 1: y = 13x + 2, so m₁ = 13
  2. line 2: m₂ = −3
  3. m₁ × m₂ = 13 × (−3) = −1, so the lines are perpendicular
Worked example

EXT Find the line perpendicular to 2y + 3x = 6 that passes through (3, 1).

  1. 2y = −3x + 6, so y = −32x + 3, giving m₁ = −32
  2. perpendicular: m₂ = 23
  3. y = 23x + c, and 1 = 23(3) + c = 2 + c, so c = −1
  4. y = 23x − 1
Common mistakeEXT Changing the sign but not flipping (2 becomes −2), or flipping but not changing the sign (2 becomes 12). You need both.

Perpendicular bisector

xy-112345678-1123456780A (1, 2)B (5, 6)MPerpendicular bisector of AB1. midpoint M = (3, 4)2. gradient of AB = 13. perpendicular gradient = −14. y − 4 = −1(x − 3) y = −x + 7
The perpendicular bisector cuts a line segment in half at a right angle. It goes through the midpoint with the negative reciprocal gradient.

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.
Worked example

EXT A is (1, 2) and B is (5, 6). Find the equation of the perpendicular bisector of AB.

  1. midpoint M = (3, 4)
  2. gradient of AB = (6 − 2) ÷ (5 − 1) = 1
  3. perpendicular gradient = −1
  4. y = −x + c, and 4 = −3 + c, so c = 7
  5. y = −x + 7
Worked example

EXT A is (−2, 1) and B is (4, 5). Find the perpendicular bisector of AB.

  1. midpoint M = (1, 3)
  2. gradient of AB = 4 ÷ 6 = 23
  3. perpendicular gradient = −32
  4. 3 = −32(1) + c, so c = 4.5
  5. y = −1.5x + 4.5
  6. check M: −1.5 + 4.5 = 3 ✓
Exam tipEvery point on the perpendicular bisector is the same distance from A and from B. That is why it is used in loci and constructions.

7Test yourself

Test yourself — cover the answers first

Quick check

  1. Which is steeper: a line with m = −5 or a line with m = 3?
  2. EXT What is the gradient of a line perpendicular to y = 4x − 1?
  3. Find the gradient of the line through (1, 3) and (4, 12).
  4. Find the gradient of the line through (2, 7) and (6, 3).
  5. Write down the gradient of y = 5 − 2x.
  6. Write down the y-intercept of y = 4x − 7.
  7. Find the gradient and y-intercept of 3x + y = 8.
  8. What is the gradient of the horizontal line y = 6?
  9. Does the vertical line x = 2 have a gradient?
  10. Find the points where 3x + 4y = 24 crosses the axes.
  11. Does the point (2, −3) lie on y = 4x − 11?
  12. Find the midpoint of (4, 1) and (10, 7).
  13. Find the midpoint of (−6, 3) and (2, −5).
  14. Find the distance from (0, 0) to (5, 12).
  15. Find the distance from (1, 2) to (4, 6).
  16. Find the distance from (−1, −2) to (3, 1).
  17. Find the line parallel to y = 2x + 5 that passes through (0, −1).
  18. Find the line parallel to y = −x + 4 that passes through (3, 2).
  19. Find the equation of the line with gradient 3 through (1, 5).
  20. Find the equation of the line through (0, 3) and (4, 11).
  21. A is (2, 3) and the midpoint of AB is (5, 7). Find B.
  22. Show that (0, 1), (2, 5) and (5, 11) are collinear.
  23. EXT What is the gradient of a line perpendicular to a line with gradient −23?
  24. EXT Are y = 2x + 3 and 2y + x = 4 perpendicular?
  25. EXT Find the line perpendicular to y = −3x + 2 that passes through (6, 5).
  26. EXT Find the perpendicular bisector of A(0, 0) and B(6, 2).
  27. EXT Find the length of the line from (−3, 2) to (1, 6) to 2 decimal places.

Exam-style

  1. Find the equation of the line through (1, 4) and (3, 10). [3]
  2. A is (−2, 3) and B is (6, 9). Find (a) the midpoint of AB and (b) the length of AB. [4]
  3. The line L passes through (0, −2) and is parallel to 3x − y = 5. Find the equation of L. [3]
  4. 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]
  5. A is (1, 1), B is (4, 5) and C is (8, 2). Show that triangle ABC is right-angled. [4]
  6. Show that P(−1, 0), Q(2, 6) and R(4, 10) lie on a straight line. [3]
  7. 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]
  8. EXT A is (−1, −2) and B is (5, 2). Find the equation of the perpendicular bisector of AB. [5]
  9. EXT AB is a diameter of a circle with A(1, 2) and B(7, 10). Find the centre and the radius. [4]
  10. EXT The line through (3, k) and (7, 10) has gradient 32. Find k. [3]
  11. EXT Find the coordinates of the point where y = 2x + 3 meets y = −x + 9. [3]
Show answers
  1. m = −5, since 5 is bigger than 3. The minus sign only tells you it falls.
  2. −14
  3. 3
  4. −1
  5. −2
  6. (0, −7)
  7. gradient −3, y-intercept 8
  8. 0
  9. No, it is undefined
  10. (0, 6) and (8, 0)
  11. Yes: 4(2) − 11 = −3
  12. (7, 4)
  13. (−2, −1)
  14. 13
  15. 5
  16. 5
  17. y = 2x − 1
  18. y = −x + 5
  19. y = 3x + 2
  20. y = 2x + 3
  21. (8, 11)
  22. both gradients are 2
  23. 32
  24. Yes: the gradients are 2 and −12, and 2 × (−12) = −1
  25. y = 13x + 3
  26. M = (3, 1), gradient −3, so y = −3x + 10
  27. √32 = 5.66
  28. m = (10 − 4) ÷ (3 − 1) = 3
    y = 3x + c and 4 = 3 + c, so c = 1
    y = 3x + 1
  29. (a) ((−2 + 6) ÷ 2, (3 + 9) ÷ 2) = (2, 6)
    (b) run = 8 and rise = 6, so AB = √(64 + 36) = √100 = 10
  30. rearrange: y = 3x − 5, so m = 3
    L has the same gradient and c = −2
    y = 3x − 2
  31. m = (20 − 11) ÷ (10 − 4) = 1.5
    11 = 1.5(4) + c, so c = 5
    C = 1.5d + 5
    m = $1.50 per kilometre
  32. AB² = 3² + 4² = 25
    BC² = 4² + 3² = 25
    AC² = 7² + 1² = 50
    AB² + BC² = 50 = AC², so the angle at B is 90°
  33. gradient PQ = 6 ÷ 3 = 2
    gradient QR = 4 ÷ 2 = 2
    equal gradients and Q is shared, so P, Q and R are collinear
  34. 2y = −3x + 12, so m₁ = −1.5
    m₂ = 23
    5 = 23(3) + c = 2 + c, so c = 3
    y = 23x + 3
  35. midpoint = (2, 0)
    gradient AB = 4 ÷ 6 = 23
    perpendicular gradient = −1.5
    0 = −1.5(2) + c, so c = 3
    y = −1.5x + 3
  36. centre = midpoint = (4, 6)
    AB = √(6² + 8²) = √100 = 10
    radius = 10 ÷ 2 = 5
  37. (10 − k) ÷ (7 − 3) = 1.5
    10 − k = 6
    k = 4
  38. 2x + 3 = −x + 9, so 3x = 6 and x = 2
    y = 2(2) + 3 = 7
    (2, 7)
Stuck on a question?

Send it to me on WhatsApp. I read every message.

Want regular help? Send this to your parent →
Share with a friendAsk Riyaz Sir