Chapter 31 – Coordinate geometry

← Chapter 30All chaptersChapter 32 →
Cambridge IGCSE & O Level Mathematics
Chapter 31

Coordinate geometry

Connect coordinates, gradient, midpoint, distance, and equations of lines, then solve multi-stage parallel and perpendicular geometry problems.

By the end of this chapter, you should be able to

  • find gradients from graphs or pairs of points
  • use the midpoint formula and recover a missing endpoint
  • find exact and decimal distances with Pythagoras
  • interpret, rearrange and derive equations of straight lines
  • use gradients to construct parallel, perpendicular and bisector equations
1

Subtopic 1

The gradient of a straight-line graph

The gradient is the change in \(y\) divided by the change in \(x\) when you move along a straight line. A line rising from left to right has a positive gradient, and a line falling has a negative gradient.

From two points, subtract the corresponding coordinates in the same order. The gradient of a horizontal line is 0. A vertical line has undefined gradient because the change in \(x\) is zero.

Essential rule\[m=\frac{\Delta y}{\Delta x}=\frac{y_2-y_1}{x_2-x_1}\]
Original instructional figure from textbook Chapter 31
Textbook figure: The textbook’s rising, falling and gently sloped lines show positive and negative gradients. Use the two coordinate changes to calculate slope.
Worked example · Easy

Rising line

Calculate the gradient between \((1,2)\) and \((5,10)\).

\(m=(10-2)/(5-1)=8/4=\boxed{2}\).

Worked example · Medium

Negative and fractional gradients

Find the gradient between \((-3,7)\) and \((5,3)\).

\(m=(3-7)/(5-(-3))=-4/8=\boxed{-\tfrac12}\).

Worked example · Exam-style

Unknown coordinate on a line

\(A=(2,7)\) and \(B=(8,k)\) lie on a line of gradient \(-\frac23\). Find \(k\).

\((k-7)/(8-2)=-2/3\).

\(k-7=6(-2/3)=-4\Rightarrow k=3\).

Exam method

Write down the appropriate rule, substitute carefully, show each rearrangement and check that the final result answers the question.

Practise: The gradient of a straight-line graph

The questions progress from straightforward recall to multi-step exam-style reasoning. Answers are hidden until selected.

Question 1

Find the gradient through \((0,1)\) and \((4,9)\).

Show Answer

\(m=(9-1)/(4-0)=8/4=2\).

Question 2

Find the gradient through \((-2,5)\) and \((4,-1)\).

Show Answer

\(m=(-1-5)/(4+2)=-6/6=-1\).

Question 3

Find the gradient through \((-3,4)\) and \((5,4)\).

Show Answer

\(m=(4-4)/(5+3)=0\).

Question 4

Find the gradient through \((2,-4)\) and \((2,6)\).

Show Answer

Change in \(x=0\). Gradient is undefined (vertical line).

Question 5

What is the gradient of a line which rises 9 units for a run of 12 units?

Show Answer

\(m=9/12=3/4\).

Question 6

A line through \((1,3)\) and \((5,k)\) has gradient 4. Find \(k\).

Show Answer

\((k-3)/(5-1)=4\Rightarrow k-3=16\Rightarrow k=19\).

Question 7

Points \(A=(-1,2),B=(3,10),C=(7,18)\). Show that all three are collinear.

Show Answer

\(m_{AB}=(10-2)/(3+1)=2\) and \(m_{BC}=(18-10)/(7-3)=2\).

The gradients agree and the lines share B, so A, B and C lie on the same straight line.

Question 8

A line has gradient \(-3\). Moving 5 units right from \((2,7)\), find the new y-coordinate.

Show Answer

\(\Delta y=m\Delta x=-3(5)=-15\).

\(y=7-15=-8\).

2

Subtopic 2

Line segments

A line segment joins two endpoints. Its midpoint is halfway between them. Average the x-coordinates for the new x-coordinate, and average the y-coordinates for the new y-coordinate.

To recover a missing endpoint, reverse the average. If \(M_x=(A_x+B_x)/2\), then \(B_x=2M_x-A_x\); similarly for y.

Essential rule\[M=\left(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\right)\]
Worked example · Easy

Find a midpoint

Find the midpoint of \((2,3)\) and \((8,7)\).

\(M=((2+8)/2,(3+7)/2)=\boxed{(5,5)}\).

Worked example · Medium

Crossing quadrants

Find the midpoint of \((-7,4)\) and \((5,-8)\).

\(M=((-7+5)/2,(4-8)/2)=\boxed{(-1,-2)}\).

Worked example · Exam-style

Missing endpoint

The midpoint of \(A(-4,9)\) and \(B(x,y)\) is \((3,-2)\). Find \(B\).

\(x=2(3)-(-4)=10\).

\(y=2(-2)-9=-13\).

Thus \(B=\boxed{(10,-13)}\).

Exam method

Write down the appropriate rule, substitute carefully, show each rearrangement and check that the final result answers the question.

Practise: Line segments

The questions progress from straightforward recall to multi-step exam-style reasoning. Answers are hidden until selected.

Question 1

Find the midpoint of \((1,5)\) and \((7,11)\).

Show Answer

\(M=(4,8)\).

Question 2

Find the midpoint of \((-6,4)\) and \((2,-2)\).

Show Answer

\(M=((-6+2)/2,(4-2)/2)=(-2,1)\).

Question 3

Find the midpoint of \((3,-7)\) and \((9,1)\).

Show Answer

\(M=(6,-3)\).

Question 4

A segment has endpoint \(A=(2,5)\) and midpoint \(M=(7,2)\). Find the other endpoint.

Show Answer

\(B=(2(7)-2,2(2)-5)=(12,-1)\).

Question 5

The midpoint of \((-1,k)\) and \((7,5)\) is \((3,1)\). Find \(k\).

Show Answer

\((k+5)/2=1\Rightarrow k=-3\).

Question 6

A diameter of a circle has endpoints \((-4,6)\) and \((8,2)\). Find its centre.

Show Answer

The centre is the midpoint.

\((( -4+8)/2,(6+2)/2)=(2,4)\).

Question 7

A triangle has vertices \(A=(0,0),B=(6,0),C=(2,8)\). Find midpoints of \(AB\) and \(AC\).

Show Answer

\(M_{AB}=(3,0),\quad M_{AC}=(1,4)\).

Question 8

The midpoint of \(AB\) is \((0,0)\) and \(A=(-9,4)\). Find \(B\).

Show Answer

\(B=(2(0)-(-9),2(0)-4)=(9,-4)\).

3

Subtopic 3

The length of a line segment

A line segment between two coordinate points is the hypotenuse of a right triangle. The horizontal side has length \(|x_2-x_1|\) and the vertical side has length \(|y_2-y_1|\). Apply Pythagoras’ theorem.

If an exact answer is required, leave it as a simplified surd. Otherwise round only at the final step and give units if the coordinates represent measured distances.

Essential rule\[AB=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\]
Original instructional figure from textbook Chapter 31
Textbook figure: The textbook’s coordinate graph shows horizontal and vertical changes forming a right triangle, with the line segment as its hypotenuse.
Worked example · Easy

Distance across a right triangle

Find the distance between \((1,1)\) and \((4,5)\).

\(d=\sqrt{(4-1)^2+(5-1)^2}=\sqrt{3^2+4^2}=\boxed5\).

Worked example · Medium

Negative coordinates

Find the length from \((-5,3)\) to \((7,-2)\).

\(d=\sqrt{12^2+(-5)^2}=\sqrt{169}=\boxed{13}\).

Worked example · Exam-style

Simplify an exact surd

A cable stretches from \((-2,-3)\) to \((4,6)\). Find its exact length and length to 2 d.p.

\(d=\sqrt{6^2+9^2}=\sqrt{117}=\boxed{3\sqrt{13}}\).

To 2 d.p.: \(d\approx\boxed{10.82}\).

Exam method

Write down the appropriate rule, substitute carefully, show each rearrangement and check that the final result answers the question.

Practise: The length of a line segment

The questions progress from straightforward recall to multi-step exam-style reasoning. Answers are hidden until selected.

Question 1

Distance between \((0,0)\) and \((6,8)\)?

Show Answer

\(d=\sqrt{36+64}=10\).

Question 2

Distance between \((2,1)\) and \((8,4)\)? Give an exact form.

Show Answer

\(d=\sqrt{6^2+3^2}=\sqrt{45}=3\sqrt5\).

Question 3

Find the distance between \((-4,-2)\) and \((5,10)\).

Show Answer

\(d=\sqrt{9^2+12^2}=\sqrt{225}=15\).

Question 4

Find the length between \((-3,7)\) and \((-3,-5)\).

Show Answer

Same x-coordinate: vertical length \(|7-(-5)|=12\).

Question 5

Find the length between \((-2,4)\) and \((5,1)\) to 2 d.p.

Show Answer

\(d=\sqrt{7^2+(-3)^2}=\sqrt{58}\approx7.62\).

Question 6

The diagonal of a rectangle joins \((1,1)\) to \((13,6)\). Find its length.

Show Answer

\(d=\sqrt{12^2+5^2}=\sqrt{169}=13\).

Question 7

Show that the triangle \(A=(0,0),B=(6,0),C=(0,8)\) is right-angled and find \(BC\).

Show Answer

AB is horizontal and AC vertical, so they meet at 90°.

\(BC=\sqrt{6^2+8^2}=10\).

Question 8

Points \(A=(1,2),B=(7,10)\). Find the distance from A to the midpoint of AB.

Show Answer

\(M=((1+7)/2,(2+10)/2)=(4,6)\).

\(AM=\sqrt{(4-1)^2+(6-2)^2}=5\).

4

Subtopic 4

The general form of the equation of a straight line

The slope-intercept form \(y=mx+c\) identifies gradient \(m\) and the intercept \(c\) where the line crosses the y-axis. A straight line can also be written as \(ax+by=k\); rearrange it to read the gradient.

To find an equation from two known points, calculate \(m\) first. Then insert one coordinate pair into \(y=mx+c\) to obtain \(c\). Horizontal lines have \(y=k\) and vertical lines have \(x=k\); a vertical line cannot be written as \(y=mx+c\) with finite gradient.

Essential rule\[y=mx+c\qquad\Longleftrightarrow\qquad ax+by=k\ (b\ne0)\]
Original instructional figure from textbook Chapter 31
Textbook figure: The textbook graph illustrates how a line’s gradient and the point where it crosses the y-axis determine its equation.
Worked example · Easy

Read the equation

State gradient and y-intercept of \(y=-4x+7\).

Compare with \(y=mx+c\).

Gradient \(m=-4\); y-intercept \(c=7\).

Worked example · Medium

Rearrange general form

Find gradient and y-intercept of \(6x+3y=12\).

\(3y=-6x+12\Rightarrow y=-2x+4\).

Gradient -2; y-intercept 4.

Worked example · Exam-style

Form an equation through two points

Find the line joining \((-2,5)\) and \((4,-7)\).

\(m=(-7-5)/(4+2)=-12/6=-2\).

\(5=-2(-2)+c\Rightarrow c=1\).

Answer \(\boxed{y=-2x+1}\).

Exam method

Write down the appropriate rule, substitute carefully, show each rearrangement and check that the final result answers the question.

Practise: The general form of the equation of a straight line

The questions progress from straightforward recall to multi-step exam-style reasoning. Answers are hidden until selected.

Question 1

Find the gradient and y-intercept of \(y=3x-8\).

Show Answer

\(m=3,\ c=-8\).

Question 2

Find the gradient and y-intercept of \(4x+2y=14\).

Show Answer

\(2y=-4x+14\Rightarrow y=-2x+7\).

Gradient -2, intercept 7.

Question 3

Find the equation of a line of gradient 5 passing through \((0,-3)\).

Show Answer

\(y=mx+c\Rightarrow y=5x-3\).

Question 4

Find the equation through \((1,4)\) and \((3,10)\).

Show Answer

\(m=(10-4)/(3-1)=3\).

\(4=3(1)+c\Rightarrow c=1\).

Hence \(y=3x+1\).

Question 5

Find the equation through \((-1,2)\) and \((3,-6)\).

Show Answer

\(m=(-6-2)/(3+1)=-2\).

\(2=-2(-1)+c\Rightarrow c=0\).

Equation \(y=-2x\).

Question 6

Find an equation for a horizontal line through \((4,9)\).

Show Answer

\(y=9\).

Question 7

Find an equation for a vertical line through \((-2,5)\).

Show Answer

\(x=-2\).

Question 8

The line \(3x+2y=18\) crosses the axes at two points. Find the intercepts.

Show Answer

\(y=0\Rightarrow x=6\); x-intercept \((6,0)\).

\(x=0\Rightarrow y=9\); y-intercept \((0,9)\).

5

Subtopic 5

Parallel and perpendicular lines

Parallel straight lines have equal gradients. Two non-vertical lines are perpendicular when the product of their gradients is \(-1\), so the new gradient is the negative reciprocal. A horizontal line is perpendicular to a vertical line.

To find a parallel or perpendicular line through a particular point: find its gradient from the given line, choose the matching or negative-reciprocal gradient, and substitute the point into \(y=mx+c\). For a perpendicular bisector, first find the midpoint, then the perpendicular gradient.

Essential rule\[m_{\parallel}=m\qquad m_{\perp}=-\frac1m\quad(m\ne0)\]
Original instructional figure from textbook Chapter 31
Textbook figure: The textbook’s square on a coordinate grid illustrates that adjacent sides are perpendicular and opposite sides have equal gradients.
Worked example · Easy

Use the same gradient

Find the equation of the line parallel to \(y=2x+3\) through \((0,-4)\).

Parallel gradient \(m=2\).

The intercept is -4, so \(y=2x-4\).

Worked example · Medium

Negative reciprocal

Find the equation of the perpendicular line to \(y=4x-1\) through \((8,3)\).

\(m_{\perp}=-1/4\).

\(3=-\tfrac14(8)+c=-2+c\Rightarrow c=5\).

Equation \(y=-\frac14x+5\).

Worked example · Exam-style

Perpendicular bisector

Find the perpendicular bisector of the segment joining \((0,2)\) and \((6,6)\).

\(M=(3,4)\).

\(m_{AB}=(6-2)/(6-0)=2/3\), so \(m_{\perp}=-3/2\).

\(y-4=-\frac32(x-3)\Rightarrow\boxed{y=-\frac32x+\frac{17}{2}}\).

Exam method

Write down the appropriate rule, substitute carefully, show each rearrangement and check that the final result answers the question.

Practise: Parallel and perpendicular lines

The questions progress from straightforward recall to multi-step exam-style reasoning. Answers are hidden until selected.

Question 1

Find the gradient of a line parallel to \(3y=6x+5\).

Show Answer

\(y=2x+5/3\); parallel gradient \(2\).

Question 2

Find the gradient of a line perpendicular to \(y=-5x+2\).

Show Answer

\(m_{\perp}=-1/(-5)=1/5\).

Question 3

Find the equation parallel to \(y=3x+2\) through \((1,9)\).

Show Answer

\(y=3x+c\).

\(9=3+c\Rightarrow c=6\). Thus \(y=3x+6\).

Question 4

Find the equation perpendicular to \(y=-2x+4\) through \((4,1)\).

Show Answer

\(m_\perp=1/2\).

\(1=(1/2)(4)+c\Rightarrow c=-1\). Thus \(y=\frac12x-1\).

Question 5

Are lines \(y=\frac32x+7\) and \(3x-2y=9\) parallel?

Show Answer

\(3x-2y=9\Rightarrow y=\frac32x-\frac92\).

Both gradients \(3/2\); yes, parallel.

Question 6

Are lines \(y=4x-1\) and \(x+4y=8\) perpendicular?

Show Answer

\(x+4y=8\Rightarrow y=-\frac14x+2\).

\(4(-1/4)=-1\); yes, perpendicular.

Question 7

Find the perpendicular bisector of \(A=(1,1)\) and \(B=(5,3)\).

Show Answer

\(M=(3,2),\quad m_{AB}=(3-1)/(5-1)=1/2\).

\(m_\perp=-2\).

\(y-2=-2(x-3)\Rightarrow y=-2x+8\).

Question 8

A line passes through \((2,1)\) and is perpendicular to \(2x-3y=6\). Find its equation in integer-coefficient form.

Show Answer

\(2x-3y=6\Rightarrow y=\frac23x-2\).

Perpendicular slope \(-3/2\).

\(y-1=-\frac32(x-2)\Rightarrow2y-2=-3x+6\).

Hence \(3x+2y=8\).

Learning source: The lesson headings follow the table of contents in Cambridge O Level Mathematics, Second Edition. Diagrams are closely cropped from the relevant textbook chapter; explanatory text, examples and exercises are newly written for IGCSE360.
← Chapter 30All chaptersChapter 32 →