Maths explained · Years 9 and 10

How to find the distance between two points

The distance between two points on the Cartesian plane is the length of the straight line joining them. You find it with the distance formula, which is Pythagoras’ theorem in disguise. Here’s where the formula comes from, how to handle negative coordinates, how to give an exact surd answer, and how to work backwards to a missing coordinate, with a calculator that draws the triangle for you.

Quick answer

Use d = √((x₂ − x₁)² + (y₂ − y₁)²). Find the change in x and the change in y, square each one, add them, then take the square root. From (1, 2) to (7, 10): √(6² + 8²) = √100 = 10 units.

Stuck on a coordinate geometry question?

Snap it. Tuterly shows a detailed worked solution, then gives fresh questions on the same skill until you can do it on your own. Years 7 to 10.

Coming soon on iPhone. Android soon after.

Launch price: 50% off until 31 March 2027. $17.99 $8.99 a week or $59.99 $29.99 a month.

We'll email you when Tuterly launches, plus occasional maths tips and offers. Unsubscribe any time. See our privacy policy.

Years 7 to 10 maths · Coming to iPhone first, then Android

The distance formula

d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
  • (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) are the two points. It doesn't matter which one you call the first.
  • x2−x1x_2 - x_1 is the horizontal change (sometimes called the run).
  • y2−y1y_2 - y_1 is the vertical change (the rise).
  • dd is the straight-line distance between the points, in the same units as the axes.

Some textbooks write it as d=(Δx)2+(Δy)2d = \sqrt{(\Delta x)^2 + (\Delta y)^2}, where Δ\Delta (delta) means "change in". It's the same formula.

Why it works: it’s Pythagoras

(1, 2)(7, 10)7 − 1 = 610 − 2 = 8d

Draw a horizontal line from one point and a vertical line from the other. They meet at a right angle, so the line joining the points is the hypotenuse of a right-angled triangle.

The two shorter sides are the change in xx and the change in yy. Pythagoras' theorem, c2=a2+b2c^2 = a^2 + b^2, gives

d2=(x2−x1)2+(y2−y1)2d^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2

and taking the square root of both sides gives the distance formula. If you forget the formula in a test, sketch the triangle and use Pythagoras. You'll get the same answer.

How to find the distance, step by step

Worked example

Find the distance between A(1,2)A(1, 2) and B(7,10)B(7, 10).

1. Find the change in xx:   7−1=6\;7 - 1 = 6

2. Find the change in yy:   10−2=8\;10 - 2 = 8

3. Square both and add:   62+82=36+64=100\;6^2 + 8^2 = 36 + 64 = 100

4. Take the square root:

d=100=10 unitsd = \sqrt{100} = 10 \text{ units}

Working out the two changes before you square anything keeps the signs under control, and it's exactly what the calculator below does.

Distance between two points calculator

Enter the two points. You’ll get the distance as an exact surd and to 2 decimal places, every step of the working, and a sketch of the right-angled triangle between the points.

First point

Second point

d = 10 units

run 6rise 8(-2, 1)(4, 9)
  1. Distance formula: d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}. It is Pythagoras' theorem, with the horizontal and vertical changes as the two shorter sides.
  2. Label the points: (x1,y1)=(−2,1)(x_1, y_1) = (-2, 1) and (x2,y2)=(4,9)(x_2, y_2) = (4, 9)
  3. Horizontal change (the run): x2−x1=4−(−2)=6x_2 - x_1 = 4 - (-2) = 6
  4. Vertical change (the rise): y2−y1=9−1=8y_2 - y_1 = 9 - 1 = 8
  5. Square each one and add: 62+82=36+64=1006^2 + 8^2 = 36 + 64 = 100
  6. Take the square root: d=100=10 unitsd = \sqrt{100} = 10\text{ units}

Distance with negative coordinates

Worked example

Find the distance between P(−3,4)P(-3, 4) and Q(2,−8)Q(2, -8).

Put the negatives in brackets when you substitute:

x2−x1=2−(−3)=2+3=5x_2 - x_1 = 2 - (-3) = 2 + 3 = 5 y2−y1=−8−4=−12y_2 - y_1 = -8 - 4 = -12

Square and add. A negative number squared is positive:

d=52+(−12)2d = \sqrt{5^2 + (-12)^2} =25+144= \sqrt{25 + 144} =169=13 units= \sqrt{169} = 13 \text{ units}

The points are in different quadrants, but nothing changes in the method. A change of −12-12 just means QQ is 1212 units below PP. Distance is always positive, which is why squaring (and then square rooting) takes care of the direction for you.

Exact answers: leaving the distance as a surd

Most pairs of points don't give a whole-number distance. If the question asks for an exact answer, leave it as a simplified square root (a surd).

Worked example

Find the exact distance between C(−1,−2)C(-1, -2) and D(3,6)D(3, 6).

x2−x1=3−(−1)=4x_2 - x_1 = 3 - (-1) = 4 y2−y1=6−(−2)=8y_2 - y_1 = 6 - (-2) = 8 d=42+82=16+64=80d = \sqrt{4^2 + 8^2} = \sqrt{16 + 64} = \sqrt{80}

Simplify the surd by pulling out the largest square factor, 1616:

d=16×5=45 unitsd = \sqrt{16 \times 5} = 4\sqrt{5} \text{ units} d≈8.94 unitsd \approx 8.94 \text{ units}

Worked example: on a map

On a map grid measured in kilometres, a campsite is at (2,−1)(2, -1) and a lookout is at (−4,3)(-4, 3). How far apart are they in a straight line, to the nearest 0.10.1 km?

x2−x1=−4−2=−6x_2 - x_1 = -4 - 2 = -6 y2−y1=3−(−1)=4y_2 - y_1 = 3 - (-1) = 4 d=(−6)2+42=36+16d = \sqrt{(-6)^2 + 4^2} = \sqrt{36 + 16} =52=213≈7.2 km= \sqrt{52} = 2\sqrt{13} \approx 7.2 \text{ km}

The walking track will be longer than this. The distance formula gives the shortest, straight-line distance ("as the crow flies").

Finding a missing coordinate

Sometimes you're given the distance and have to find a coordinate. Substitute everything you know, square both sides to get rid of the square root, then solve.

Worked example

The distance between (1,3)(1, 3) and (k,7)(k, 7) is 55 units. Find the possible values of kk.

(k−1)2+(7−3)2=5\sqrt{(k - 1)^2 + (7 - 3)^2} = 5

Square both sides:

(k−1)2+16=25(k - 1)^2 + 16 = 25 (k−1)2=9(k - 1)^2 = 9 k−1=3ork−1=−3k - 1 = 3 \quad \text{or} \quad k - 1 = -3 k=4ork=−2k = 4 \quad \text{or} \quad k = -2

There are two answers because the point could be 33 units to the right of x=1x = 1 or 33 units to the left. Check one: from (1,3)(1, 3) to (−2,7)(-2, 7) is (−3)2+42=25=5\sqrt{(-3)^2 + 4^2} = \sqrt{25} = 5.

Using distance on shapes

Test questions often give the corners of a shape and ask you to prove something about it. Find the length of each side with the distance formula, then compare.

  • Isosceles triangle: two sides are equal.
  • Right-angled triangle: the squares of the two shorter sides add to the square of the longest side.
  • Rhombus or square: all four sides are equal.
  • Perimeter: add up all the side lengths.

Horizontal and vertical sides need no formula. From (−2,5)(-2, 5) to (6,5)(6, 5) the yy-values match, so the distance is just 6−(−2)=86 - (-2) = 8.

In three dimensions (Year 10A), add a third term: d=(Δx)2+(Δy)2+(Δz)2d = \sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2}. From (0,0,0)(0, 0, 0) to (2,3,6)(2, 3, 6) that's 4+9+36=49=7\sqrt{4 + 9 + 36} = \sqrt{49} = 7. There's more on this in 3D Pythagoras.

Common mistakes

  • Subtracting a negative wrongly. 2−(−3)2 - (-3) is 55, not −1-1. Write negative coordinates in brackets and change −(−)- (-) to ++ before you go on.
  • Typing −122-12^2 into a calculator. That gives −144-144. Use brackets, (−12)2=144(-12)^2 = 144, or square the number without its sign, since the square is always positive.
  • Adding the coordinates instead of subtracting. The formula uses the differences x2−x1x_2 - x_1 and y2−y1y_2 - y_1. Adding them is the midpoint method, and it gives a different answer.
  • Mixing up the order. Use the same point first in both brackets: x2−x1x_2 - x_1 and y2−y1y_2 - y_1. Matching an xx from one point with a yy from the other gives nonsense.
  • Square rooting each part separately. 36+64\sqrt{36 + 64} is 100=10\sqrt{100} = 10, not 6+8=146 + 8 = 14. Add first, then take the square root.
  • Forgetting the second answer when finding a missing coordinate. (k−1)2=9(k - 1)^2 = 9 gives k−1=3k - 1 = 3 or −3-3.

Practice questions with answers

Try each one before you open the answer. Rounded answers are to 2 decimal places.

  1. Find the distance between (2,3)(2, 3) and (5,7)(5, 7).

    Show the answer

    Changes: 5−2=35 - 2 = 3 and 7−3=47 - 3 = 4. d=32+42=25=5d = \sqrt{3^2 + 4^2} = \sqrt{25} = 5

  2. Find the distance between (−4,1)(-4, 1) and (4,7)(4, 7).

    Show the answer

    Changes: 4−(−4)=84 - (-4) = 8 and 7−1=67 - 1 = 6. d=64+36=100=10d = \sqrt{64 + 36} = \sqrt{100} = 10

  3. Find the distance between (0,−5)(0, -5) and (12,0)(12, 0).

    Show the answer

    Changes: 1212 and 55. d=144+25=169=13d = \sqrt{144 + 25} = \sqrt{169} = 13

  4. Find the exact distance between (3,−2)(3, -2) and (−3,1)(-3, 1).

    Show the answer

    Changes: −3−3=−6-3 - 3 = -6 and 1−(−2)=31 - (-2) = 3. d=36+9=45=35≈6.71d = \sqrt{36 + 9} = \sqrt{45} = 3\sqrt{5} \approx 6.71

  5. Find the distance between (−2,−7)(-2, -7) and (−2,5)(-2, 5).

    Show the answer

    The xx-values are the same, so the line is vertical. d=5−(−7)=12d = 5 - (-7) = 12

  6. Find the distance between (1.5,2)(1.5, 2) and (4.5,6)(4.5, 6).

    Show the answer

    Changes: 33 and 44. d=9+16=5d = \sqrt{9 + 16} = 5

  7. Which point is closer to the origin: (6,−8)(6, -8) or (−7,7)(-7, 7)?

    Show the answer

    36+64=100=10\sqrt{36 + 64} = \sqrt{100} = 10 and 49+49=98≈9.90\sqrt{49 + 49} = \sqrt{98} \approx 9.90. So (−7,7)(-7, 7) is closer, but only just.

  8. The distance from (a,1)(a, 1) to (5,4)(5, 4) is 55 units. Find the two possible values of aa.

    Show the answer

    (5−a)2+32=25(5 - a)^2 + 3^2 = 25, so (5−a)2=16(5 - a)^2 = 16 and 5−a=45 - a = 4 or −4-4. So a=1a = 1 or a=9a = 9.

  9. Triangle ABCABC has vertices A(0,0)A(0, 0), B(4,2)B(4, 2) and C(2,6)C(2, 6). Show that it is isosceles and right-angled.

    Show the answer

    AB=16+4=20AB = \sqrt{16 + 4} = \sqrt{20}, BC=4+16=20BC = \sqrt{4 + 16} = \sqrt{20} and AC=4+36=40AC = \sqrt{4 + 36} = \sqrt{40}. AB=BCAB = BC, so it's isosceles. AB2+BC2=20+20=40=AC2AB^2 + BC^2 = 20 + 20 = 40 = AC^2, so by the converse of Pythagoras it has a right angle at BB.

The Tuterly Method

Snap. Fix. Ace.

Got a distance question wrong? Don't just move on. Study your mistakes.

  1. Snap.

    Snap every question you get wrong, from tests, homework and class work.

  2. Fix.

    See the worked solution, then fresh questions on that skill. Even just one each day.

  3. Ace.

    A full practice test, with questions you've got wrong mixed in.

How the Tuterly Method works →

Distance and coordinate geometry by year level

Following the Victorian Curriculum 2.0. Schools sequence topics differently, so check your course.

Year 8

Pythagoras' theorem

Pythagoras’ theorem: finding the hypotenuse and a shorter side, which the distance formula is built on.

Year 9

Coordinate geometry

The distance between two points, alongside gradient and midpoint.

Year 9

Pythagoras (applied)

Two-step Pythagoras problems, including the distance between points.

Year 10

Coordinate geometry

Parallel and perpendicular lines, with distance and midpoint used in multi-part questions.

Distance between two points: common questions

What is the distance formula?

d = √((x₂ − x₁)² + (y₂ − y₁)²). Subtract the x-coordinates, subtract the y-coordinates, square both answers, add them, then take the square root. For (1, 2) and (7, 10), that's √(6² + 8²) = √100 = 10.

Is the distance formula just Pythagoras’ theorem?

Yes. Join the two points and draw a horizontal and a vertical line to make a right-angled triangle. The horizontal side is the change in x, the vertical side is the change in y, and the distance between the points is the hypotenuse, so d² = (change in x)² + (change in y)².

Does it matter which point is (x₁, y₁)?

No. Swapping the points changes the signs of the differences, but squaring makes them positive again, so you get the same distance. From (−3, 4) to (2, −8) the changes are 5 and −12; the other way round they are −5 and 12. Both give √169 = 13.

How do you find the distance with negative coordinates?

Put each negative number in brackets when you substitute. For (−3, 4) and (2, −8): x₂ − x₁ = 2 − (−3) = 5 and y₂ − y₁ = −8 − 4 = −12. Then 5² + (−12)² = 25 + 144 = 169, so the distance is 13. Subtracting a negative is the step most students get wrong.

How do you give the distance in exact form?

Leave the answer as a square root and simplify it. For a distance of √80, find the biggest square factor: 80 = 16 × 5, so √80 = 4√5. That is exact; 8.94 is the rounded value. If a question says ‘exact’, give the surd.

What year level learns the distance between two points?

In the Victorian Curriculum 2.0 it’s part of Year 9 coordinate geometry, alongside gradient and midpoint, once students know Pythagoras’ theorem from Year 8. Year 10 uses it in harder line and shape problems, and Year 10A extends the same idea to three dimensions.

Tuterly · Years 7 to 10 maths

Lost marks on a distance question?

Snap it with Tuterly. You’ll see every step of the working, then get fresh questions on the same skill until it’s mastered. Built for the Australian Curriculum by Bayside Academics.

Coming soon on iPhone. Android soon after.

Launch price: 50% off until 31 March 2027. $17.99 $8.99 a week or $59.99 $29.99 a month.

We'll email you when Tuterly launches, plus occasional maths tips and offers. Unsubscribe any time. See our privacy policy.

Years 7 to 10 maths · Coming to iPhone first, then Android
Or try it free now with your own question →