Skip to content

The distance between points and the midpoint of a segment

The distance between points and the midpoint of a segment

A segment parallel to an axis

Every point in the coordinate system has two coordinates: x\displaystyle x – how far right or left, and y\displaystyle y – how far up or down. When two points share a coordinate, the segment between them is parallel to one of the axes, and its length is the difference between the other coordinates.

  • A(1,3)\displaystyle A(1,3) and B(6,3)\displaystyle B(6,3) have the same y\displaystyle y, so AB\displaystyle AB is parallel to the x\displaystyle x-axis: AB=6−1=5\displaystyle {AB}={6-1}={5}.
  • B(6,3)\displaystyle B(6,3) and C(6,−1)\displaystyle C(6,-1) have the same x\displaystyle x, so BC\displaystyle BC is parallel to the y\displaystyle y-axis: BC=3−(−1)=4\displaystyle {BC}={3-(-1)}={4}.
  • Take the smaller from the larger: a length is never negative.
The distance between two points

A segment that is not parallel to the axes is the hypotenuse of a right-angled triangle whose legs are parallel to the axes. So Pythagoras’ theorem gives its length.

In the drawing, A(1,1)\displaystyle A(1,1) and B(5,4)\displaystyle B(5,4), and the point C(5,1)\displaystyle C(5,1) completes a right-angled triangle:

  • the leg AC\displaystyle AC is parallel to the x\displaystyle x-axis: AC=5−1=4\displaystyle {AC}={5-1}={4} – the difference between the x\displaystyle x-coordinates;
  • the leg BC\displaystyle BC is parallel to the y\displaystyle y-axis: BC=4−1=3\displaystyle {BC}={4-1}={3} – the difference between the y\displaystyle y-coordinates;
  • by Pythagoras’ theorem: AB=42+32=25=5\displaystyle {AB}={\sqrt{4^{2}+3^{2}}}={\sqrt{25}}={5}.

So for any two points (x1,y1)\displaystyle (x_1,y_1) and (x2,y2)\displaystyle (x_2,y_2), the legs are the differences between the coordinates, and the distance is

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

The order of the points makes no difference: each difference is squared, and the square of a negative number is positive.

Example: a distance that is a root

The distance between P(−2,3)\displaystyle P(-2,3) and Q(4,−1)\displaystyle Q(4,-1):

PQ=(4−(−2))2+(−1−3)2=36+16=52=213PQ=\sqrt{(4-(-2))^{2}+(-1-3)^{2}}=\sqrt{36+16}=\sqrt{52}=2\sqrt{13}
  • 52=4⋅13=213\displaystyle {\sqrt{52}}={\sqrt{4\cdot13}}={2\sqrt{13}}: the 4\displaystyle 4 comes out from under the root.
  • Leave the result as a root. 7.21\displaystyle 7.21 is only an approximation of it, and working on with it gives results that are not exact.
Exercise 1

Find the distance between the two points.
Write the result exactly, in its simplest form.

a
A(2,1)\displaystyle A(2,1), B(5,5)\displaystyle B(5,5)

    / – 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
    C(−1,4)\displaystyle C(-1,4), D(3,−2)\displaystyle D(3,-2)

      / – 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
      E(0,−3)\displaystyle E(0,-3), F(−3,0)\displaystyle F(-3,0)

        / – 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

        The midpoint of a segment

        The coordinates of a segment’s midpoint are the means of the coordinates of its ends: its x\displaystyle x is halfway between the two x\displaystyle x-coordinates, and its y\displaystyle y halfway between the two y\displaystyle y-coordinates.

        M(x1+x22, y1+y22)\displaystyle M\left(\frac{x_1+x_2}{2},\ \frac{y_1+y_2}{2}\right)

        In the drawing, the midpoint of the segment from A(2,−3)\displaystyle A(2,-3) to B(8,5)\displaystyle B(8,5):

        • xM=2+82=5\displaystyle {x_M}={\frac{2+8}{2}}={5};
        • yM=−3+52=1\displaystyle {y_M}={\frac{-3+5}{2}}={1};
        • so M(5,1)\displaystyle M(5,1). A check: from A\displaystyle A to M\displaystyle M is 3\displaystyle 3 to the right and 4\displaystyle 4 up, and so is M\displaystyle M to B\displaystyle B.
        Exercise 2

        Find the midpoint of the segment.

        a
        A(−3,5)\displaystyle A(-3,5), B(7,1)\displaystyle B(7,1):
        xM\displaystyle x_M

          / – 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

          yM\displaystyle y_M

            / – 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
            C(−4,−6)\displaystyle C(-4,-6), D(1,0)\displaystyle D(1,0):
            xM\displaystyle x_M

              / – 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

              yM\displaystyle y_M

                / – 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

                One end of a segment from its midpoint

                When one end and the midpoint of a segment are known, the other end comes from an equation: the midpoint formula, with the missing coordinate as its unknown.

                Example: M(3,1)\displaystyle M(3,1) is the midpoint of the segment AB\displaystyle AB, and A(−1,4)\displaystyle A(-1,4).

                • −1+x2=3\displaystyle {\frac{-1+x}{2}}={3}, so −1+x=6\displaystyle {-1+x}={6} and x=7\displaystyle {x}={7};
                • 4+y2=1\displaystyle {\frac{4+y}{2}}={1}, so 4+y=2\displaystyle {4+y}={2} and y=−2\displaystyle {y}={-2};
                • B(7,−2)\displaystyle B(7,-2).
                Exercise 3

                The point M(2,−1)\displaystyle M(2,-1) is the midpoint of the segment PQ\displaystyle PQ.
                P(5,3)\displaystyle P(5,3).
                Find the coordinates of the point Q\displaystyle Q.

                xQ\displaystyle x_Q
                  yQ\displaystyle y_Q
                    Exercise 4

                    The vertices of the triangle ABC\displaystyle ABC are A(1,1)\displaystyle A(1,1), B(5,3)\displaystyle B(5,3) and C(3,7)\displaystyle C(3,7).

                    a

                    Find the lengths of the sides.

                    AB\displaystyle AB

                      / – 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

                      BC\displaystyle BC

                        / – 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

                        AC\displaystyle AC

                          / – 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

                          What kind of triangle is ABC\displaystyle ABC?
                          Explain by the lengths you found.

                          Exercise 5

                          ABCD\displaystyle ABCD is a parallelogram.
                          Three of its vertices are A(−4,−3)\displaystyle A(-4,-3), B(−1,2)\displaystyle B(-1,2) and C(5,4)\displaystyle C(5,4).
                          A parallelogram’s diagonals bisect each other, so the diagonals AC\displaystyle AC and BD\displaystyle BD have the same midpoint.

                          a

                          Find the coordinates of the vertex D\displaystyle D.

                          xD\displaystyle x_D
                            yD\displaystyle y_D
                              b

                              Find the lengths of the sides AB\displaystyle AB and BC\displaystyle BC.

                              AB\displaystyle AB

                                / – 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

                                BC\displaystyle BC

                                  / – 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