Uni-Sine
MathematicsGraphs

Coordinate geometry

Coordinate geometry is geometry done with coordinates: points are pairs (x, y), and lines and circles are equations. With a handful of formulas you can find the gradient, midpoint and length of a line segment, write the equation of a straight line, and find the centre and radius of a circle. It starts at GCSE and carries on into A-level, where the topic is called coordinate geometry in the (x, y) plane.

Coordinate geometry formulas

TopicFormula or fact
Gradient of ABm = (y₂ − y₁) ÷ (x₂ − x₁)
Midpoint of AB((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)
Length of AB√((x₂ − x₁)² + (y₂ − y₁)²)
Straight liney = mx + c, y − y₁ = m(x − x₁) or ax + by + c = 0
Parallel linesEqual gradients: m′ = m
Perpendicular linesm′ = −1 ÷ m, so the gradients multiply to −1
Circle, centre the originx² + y² = r²
Circle, centre (a, b)(x − a)² + (y − b)² = r²

In Pearson Edexcel's GCSE, Higher tier students use y = mx + c to spot parallel and perpendicular lines, find the line through two points, and use the equation of a circle with centre at the origin, including its tangents. Edexcel's A-level (topic 3) adds y − y₁ = m(x − x₁), ax + by + c = 0, circles with any centre, and parametric equations.

Gradient, midpoint and distance

Take A(−2, 3) and B(4, 11). Going from A to B, x goes up by 4 − (−2) = 6 and y goes up by 11 − 3 = 8. Every one of the three formulas uses those two changes.

−4−2024246810121068A(−2, 3)B(4, 11)M(1, 7)
The change in x and y make a right-angled triangle, so the length of AB comes from Pythagoras
  • Gradient: 8 ÷ 6 = 4/3. Up 4 for every 3 across.
  • Midpoint: ((−2 + 4) ÷ 2, (3 + 11) ÷ 2) = (1, 7). Average the x values and the y values.
  • Distance: √(6² + 8²) = √100 = 10. This is Pythagoras on the triangle in the diagram.

The Midpoint and Distance Calculator finds all three for any two points, and the distance formula and midpoint guides go into more detail.

Try it

Midpoint and Distance Calculator

Find the midpoint, distance and gradient between two points

Go to its page

Equation of a straight line

To find a line's equation you need its gradient and one point on it. The quickest form is the point slope form, y − y₁ = m(x − x₁). For the line through A(−2, 3) with gradient 4/3:

y - 3 = \frac{4}{3}(x + 2)

Multiply by 3 to clear the fraction: 3y − 9 = 4x + 8. Rearranged into the form ax + by + c = 0 with whole numbers, that is 4x − 3y + 17 = 0. Check it with B(4, 11): 16 − 33 + 17 = 0, so B is on the line.

Parallel and perpendicular lines

Parallel lines have the same gradient. Perpendicular lines have gradients that multiply to −1: flip the fraction and change the sign. A line perpendicular to AB has gradient −3/4.

Example: the perpendicular bisector of AB goes through the midpoint M(1, 7) with gradient −3/4. So y − 7 = −3/4 (x − 1), which gives 4y − 28 = −3x + 3, or 3x + 4y − 31 = 0. Every point on it is the same distance from A and B.

Where two lines meet

The crossing point satisfies both equations, so solve them as simultaneous equations. For y = 4x − 7 and x + 2y = 13, substitute: x + 2(4x − 7) = 13, so 9x − 14 = 13, 9x = 27 and x = 3. Then y = 4(3) − 7 = 5. The lines meet at (3, 5).

Try a pair yourself, then press Mark to check it in the algebra course.

Solve a pair of simultaneous equations for x and y.

Press Mark to have your answer marked in the Algebra course.

Equation of a circle

Every point (x, y) on a circle is r away from the centre (a, b). Writing that with the distance formula and squaring both sides gives the equation of a circle:

(x - a)^2 + (y - b)^2 = r^2

With the centre at the origin it becomes x² + y² = r². Watch the signs: (x + 4)² means x − (−4), so the centre has x-coordinate −4.

Finding the centre and radius by completing the square

When the equation is expanded, such as x² + y² + 8x − 2y − 8 = 0, complete the square on the x terms and the y terms separately:

(x + 4)^2 - 16 + (y - 1)^2 - 1 - 8 = 0
(x + 4)^2 + (y - 1)^2 = 25

So the centre is (−4, 1) and the radius is √25 = 5. More methods are in how to find the centre of a circle.

The tangent to a circle

−10−8−6−4−2024−22465C(−4, 1)P(−1, 5)
The tangent at P is perpendicular to the radius CP

P(−1, 5) is on the circle, since (−1 + 4)² + (5 − 1)² = 9 + 16 = 25. A tangent meets the radius at 90°, so use the perpendicular gradient:

  1. Gradient of the radius CP = (5 − 1) ÷ (−1 − (−4)) = 4/3.
  2. Gradient of the tangent = −3/4.
  3. Tangent: y − 5 = −3/4 (x + 1), so 4y − 20 = −3x − 3, which is 3x + 4y − 17 = 0.

Where a line meets a circle

Substitute the line into the circle and solve the quadratic. Does y = x + 10 meet the circle above? Substituting gives (x + 4)² + (x + 9)² = 25, which simplifies to x² + 13x + 36 = 0, or (x + 4)(x + 9) = 0. So x = −4 or x = −9, and the line crosses the circle at (−4, 6) and (−9, 1).

The discriminant b² − 4ac tells you how many points there are without solving: here 13² − 4 × 36 = 25, which is positive, so two points. Zero means the line is a tangent and touches once; negative means it misses the circle.

practice
Pick an answer, then check it.
A circle has equation (x − 2)² + (y + 6)² = 49. What are its centre and radius?

Circle facts you can use

Edexcel's A-level specification lists three circle theorems to use with coordinates:

  • Angles in a semicircle are 90°. If AB is a diameter and P is on the circle, AP and BP are perpendicular, so their gradients multiply to −1.
  • A chord is cut in half by the perpendicular to it from the centre. So the perpendicular bisector of any chord passes through the centre. Two of them cross at the centre, which is how you find the circle through three points.
  • The radius at a point is perpendicular to the tangent there. That is the tangent method above.

Common mistakes

  • Mixing the order in the gradient. Subtract both coordinates in the same order: (y₂ − y₁) over (x₂ − x₁).
  • Dropping a negative. Subtracting a negative coordinate adds: 4 − (−2) = 6.
  • Wrong signs for the centre. (x − 3)² means the centre is at x = 3, and (x + 3)² means x = −3.
  • Giving r² as the radius. In (x + 4)² + (y − 1)² = 25, the radius is 5, not 25.
  • Only changing the sign for a perpendicular gradient. Flip the fraction as well: the perpendicular to 4/3 is −3/4, not −4/3.
  • Leaving fractions in ax + by + c = 0. Questions usually want a, b and c as integers, so multiply through.

Practise lines and circles under time pressure with today's A-level Maths: Algebra & Functions short timed paper. For the graphs side of the topic, try graphing linear functions.

Common questions

What is coordinate geometry?
Geometry using coordinates, where points are pairs (x, y) and lines and curves are equations. It lets you calculate gradients, lengths, midpoints and where shapes meet.
What are the main coordinate geometry formulas?
Gradient (y₂ − y₁) ÷ (x₂ − x₁), midpoint ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2), distance √((x₂ − x₁)² + (y₂ − y₁)²), straight line y − y₁ = m(x − x₁), and circle (x − a)² + (y − b)² = r².
How do you find the equation of a line through two points?
Find the gradient from the two points, then put it and either point into y − y₁ = m(x − x₁) and rearrange.
How do you find the centre and radius of a circle from its equation?
Write it as (x − a)² + (y − b)² = r², completing the square if it is expanded. The centre is (a, b) and the radius is r.
How do you find the equation of a tangent to a circle?
Find the gradient of the radius to the point, take the negative reciprocal for the tangent, then use y − y₁ = m(x − x₁) at the point.
How do you know if two lines are perpendicular?
Their gradients multiply to −1, for example 2 and −1/2.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Midpoint and Distance Calculator

    Find the midpoint, distance and gradient between two points

    Open the tool
  • Learn it

    Graphing Functions

    Graphing made easier: the patterns in numbers and functions used across STEM

    Start the course
  • Test it

    A-level Maths: Algebra & Functions

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · GraphsDistance formula calculator: distance between two pointsFree distance formula calculator: type two points to get the exact distance as a surd and a decimal, with the right triangle drawn and every step.