Skip to content

The distance between two points and the midpoint

The distance between two points and the midpoint

A city map in a coordinate system

In a new neighbourhood the streets are straight: some run from west to east, and some from south to north.
The neighbourhood’s map has a coordinate system: one unit on each axis is 100 metres, the length of one block.
The bakery is at the point A(1,2)\displaystyle A(1,2), and the chemist’s at the point B(7,10)\displaystyle B(7,10).

A=(1,2)\displaystyle A=(1,2)
B=(7,10)\displaystyle B=(7,10)
C=(7,2)\displaystyle C=(7,2)
  • C(7,2)\displaystyle C(7,2) is the corner where someone walking east from A\displaystyle A turns north, towards B\displaystyle B.
  • From A\displaystyle A to C\displaystyle C: 7−1=6\displaystyle {7-1}={6} units, 600 metres.
  • From C\displaystyle C to B\displaystyle B: 10−2=8\displaystyle {10-2}={8} units, 800 metres.
  • Walking along the streets from A\displaystyle A to B\displaystyle B: 6+8=14\displaystyle {6+8}={14} units, 1,400 metres.
The straight-line distance

The straight-line distance between two points is the length of the straight segment joining them – the way a delivery drone flies, and the way a cable is stretched.

The triangle ACB\displaystyle ACB is right-angled: the right angle is at the corner C\displaystyle C, where a street running east meets a street running north.

  • The legs: AC=6\displaystyle {AC}={6} and CB=8\displaystyle {CB}={8}.
  • The hypotenuse: the segment AB\displaystyle AB.

By Pythagoras’ theorem:

AB2=62+82=36+64=100AB^{2}=6^{2}+8^{2}=36+64=100AB=100=10AB=\sqrt{100}=10

A drone flying from the bakery to the chemist’s covers 10 units, 1,000 metres – 400 metres less than someone walking along the streets.

The distance formula
A difference in the brackets may be negative, but its square is positive: it does not matter which point you write first.

The legs of the triangle are the difference between the x\displaystyle x-coordinates and the difference between the y\displaystyle y-coordinates.
So the distance between the points (x1,y1)\displaystyle (x_1,y_1) and (x2,y2)\displaystyle (x_2,y_2) is:

d=(x2−x1)2+(y2−y1)2\displaystyle d=\sqrt{(x_2-x_1)^{2}+(y_2-y_1)^{2}}

The example below works out the distance between A(1,2)\displaystyle A(1,2) and D(5,7)\displaystyle D(5,7), rounded to two decimal places:

d=(5−1)2+(7−2)2=16+25=41≈6.40d=\sqrt{(5-1)^{2}+(7-2)^{2}}=\sqrt{16+25}=\sqrt{41}\approx6.40
  • 41\displaystyle \sqrt{41} is not a whole number, so we write ≈\displaystyle \approx and round.
  • The distance is about 6.40 units, that is about 640 metres.
The midpoint of a segment

A delivery company wants to build a warehouse halfway, in a straight line, between the bakery A(1,2)\displaystyle A(1,2) and the chemist’s B(7,10)\displaystyle B(7,10).
The midpoint of the segment AB\displaystyle AB is the point M\displaystyle M on the segment that is the same distance from A\displaystyle A and from B\displaystyle B.
Its coordinates are the means of the coordinates of A\displaystyle A and B\displaystyle B:

M=(x1+x22,y1+y22)\displaystyle M=\left(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\right)
A=(1,2)\displaystyle A=(1,2)
B=(7,10)\displaystyle B=(7,10)
M=(4,6)\displaystyle M=(4,6)
  • The x\displaystyle x-coordinate: 1+72=4\displaystyle {\frac{1+7}{2}}={4}.
  • The y\displaystyle y-coordinate: 2+102=6\displaystyle {\frac{2+10}{2}}={6}.
  • The warehouse is at M(4,6)\displaystyle M(4,6), 5 units – 500 metres – from each of the shops: half of the 1,000 metres between A\displaystyle A and B\displaystyle B.
Exercise 1

A supermarket chain has two branches in town.
One branch is at the point K(1,1)\displaystyle K(1,1), and the other at the point L(4,5)\displaystyle L(4,5).
One unit on each axis is 100 metres.

a

Work out the straight-line distance between the branches, in units.

    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

    b

    How many metres is that?

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

      c

      A lorry drives from K\displaystyle K to L\displaystyle L along the streets: first east, then north.
      How many metres does it drive?

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

        Exercise 2

        A mobile phone mast is at the point T(−2,3)\displaystyle T(-2,3), and a house at the point H(4,−1)\displaystyle H(4,-1).
        One unit on each axis is 100 metres.
        Work out the straight-line distance between the mast and the house, in units, rounded to two decimal places.
        About how many metres is that?

          / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

          / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

            / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

            / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

            Exercise 3

            The owner of two shops has one at the point S(2,8)\displaystyle S(2,8) and one at the point R(10,4)\displaystyle R(10,4).
            He wants a warehouse at the midpoint of the segment SR\displaystyle SR.
            You can mark the warehouse on the graph.

            S=(2,8)\displaystyle S=(2,8)
            R=(10,4)\displaystyle R=(10,4)
            a

            Find the warehouse’s x\displaystyle x-coordinate.

              / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

              / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

              b

              Find the warehouse’s y\displaystyle y-coordinate.

                / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

                c

                Work out the straight-line distance from the warehouse to the shop S\displaystyle S, rounded to two decimal places.

                  / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                  / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

                  Exercise 4

                  A restaurant’s drone sets out from the point O(0,0)\displaystyle O(0,0) with two orders.
                  The first customer lives at the point E(3,4)\displaystyle E(3,4), and the second at the point F(6,0)\displaystyle F(6,0).
                  The drone flies in straight lines: from O\displaystyle O to E\displaystyle E, from E\displaystyle E to F\displaystyle F, and back to O\displaystyle O.
                  One unit on each axis is 100 metres.

                  a

                  Work out the distance from O\displaystyle O to E\displaystyle E.

                    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                    / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

                    b

                    Work out the distance from E\displaystyle E to F\displaystyle F.

                      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                      / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power

                      c

                      How many metres does the drone fly on the whole round?
                      Had it flown to F\displaystyle F first and then to E\displaystyle E, would the route have been shorter?

                        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – check and a new line · * – times · ^ – power, ↓ – end of the power

                        / – fraction bar · Tab or the arrows – between numerator and denominator, then a note above or below · Enter – a new line · * – times · ^ – power, ↓ – end of the power