Coordinate geometry uses algebra to answer questions about points and lines on a graph.

Key ideas: three formulas

For points A(x₁, y₁) and B(x₂, y₂):

  • Gradient: m = (y₂ − y₁) ÷ (x₂ − x₁)
  • Length: AB = √[(x₂ − x₁)² + (y₂ − y₁)²] (Pythagoras' theorem)
  • Equation of a line: y = mx + c. Find m, then substitute a point to find c.

Parallel lines have equal gradients.

Worked example 1

A(−1, 2) and B(3, 10).

  • Gradient = (10 − 2)/(3 − (−1)) = 8/4 = 2
  • Length AB = √(4² + 8²) = √80 = 8.94 units (3 s.f.)
  • Equation: y = 2x + c; 2 = 2(−1) + c, so c = 4 → y = 2x + 4

Worked example 2: a parallel line

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

Gradient = −3, so y = −3x + c; 1 = −6 + c, so c = 7 → y = −3x + 7.

Worked example 3: where a line crosses the axes

For 2y = 3x − 12: when x = 0, y = −6; when y = 0, x = 4.
So the line meets the y-axis at (0, −6) and the x-axis at (4, 0).

Tips

  • Rearrange equations like 2y = 3x − 12 into y = mx + c (y = 1.5x − 6) to read off the gradient.
  • Sketch the points first: a quick sketch shows whether your gradient should be positive or negative.

Common mistakes

  • Subtracting coordinates in a different order on the top and bottom of the gradient formula.
  • Forgetting to square-root when finding the length.
  • Reading the gradient of 2y = 3x − 12 as 3 instead of 1.5.

Try these

  1. Find the length of the line joining P(1, −2) and Q(7, 6).
  2. Find the equation of the line through (0, 3) and (4, −5).
  3. Is the line y = 4x − 1 parallel to 8x − 2y = 7?
Show answers
  1. √(36 + 64) = 10 units
  2. Gradient −2, so y = −2x + 3
  3. Yes: 8x − 2y = 7 gives y = 4x − 3.5, which also has gradient 4