This is a paragraph.

Midpoint of a line segment

Let A(x_1,y_1) and B(x_2,y_2) be the coordinates of a line segment AB. We have:

    \[\boxed{\textrm{\textbf{MIDPOINT FORMULA}:=}\Big(\frac{x_1 +x_2}{2},\frac{y_1 + y_2}{2}\Big)}\]

Simple, right? Very simple. Straight to examples.

Example 1

Find the midpoint of the line segment joining A(-1,2) and B(3,-8).

    \[\boxed{\textrm{\textbf{midpoint=}}\Big(\frac{-1+3}{2},\frac{2+(-8)}{2}\Big)=\Big(\frac{2}{2},\frac{-6}{2}\Big)=(1,-3)}\]

Example 2

Find the midpoint of A(-2,-4) and B(-1,-5).

    \[\boxed{\textrm{\textbf{midpoint=}}\Big(\frac{-2+-1}{2},\frac{-4+-5}{2}\Big)=\Big(\frac{-3}{2},\frac{-9}{2}\Big)}\]

Example 3

Find the midpoint of the line segment joining A(\frac{1}{3},2) and B(-\frac{1}{5},\frac{3}{4})

    \[\boxed{\textrm{\textbf{midpoint=}}\Big(\frac{1/3+(-1/5)}{2},\frac{2+(3/4)}{2}\Big)=\Big(\frac{1}{15},\frac{11}{8}\Big)}\]

Example 4

Find the midpoint of the line segment joining A(-\frac{5}{2},\frac{3}{5}) and B(-\frac{7}{2},\frac{7}{5})

    \[\boxed{\textrm{\textbf{midpoint=}}\Big(\frac{-5/2+(-7/2)}{2},\frac{3/5+7/5}{2}\Big)=(-3,1)}\]

Example 5

Find the midpoint of the line segment joining A(\frac{11}{6},\frac{13}{3}) and B(\frac{5}{3},\frac{7}{6})

    \[\boxed{\textrm{\textbf{midpoint=}}\Big(\frac{11/6+5/3}{2},\frac{13/3+7/6}{2}\Big)=\Big(\frac{7}{4},\frac{11}{4}\Big)}\]

Example 6

A diameter of a circle has endpoints located at A(-3,6) and B(3,-6). Find the coordinates of the center of the circle.

The center of a circle is at the midpoint of any of its diameters, so we simply have to find the midpoint of A(-3,6) and B(3,-6) in this case; it is:

    \[\Big(\frac{-3+3}{2},\frac{6+-6}{2}\Big)=(0,0).\]

So this circle is centered at (0,0), the origin.

Example 7

How many line segments have midpoints at the origin (0,0)?

The answer is infinite. In fact, for any number a\neq 0, the points (a,a) and (-a,-a) all have midpoints at

    \[\Big(\frac{a+-a}{2},\frac{a+-a}{2}\Big)=(0,0),\]

which is the origin. In general, this also works for any point other than the origin: once the midpoint is specified, there are infinite line segments that share that midpoint. On the other hand, a given line segment will always have a unique midpoint.

In the terminology of functions (don’t worry about this yet if you’re still in grade 10), the assignment

    \[A,B\mapsto\textrm{midpoint of}~A,B\]

is a function, while its inverse is not.

Example 8

Line segment AB has midpoint at M(1,3). If A is the point (-2,7), find the coordinates of B.

Let B be the point with coordinates (x,y). Since the midpoint of A(-2,7) and B(x,y) is M(1,3), we have, by the midpoint formula, that

    \[(1,3)=\Big(\frac{-2+x}{2},\frac{7+y}{2}\Big).\]

The x-coordinates must be equal, so 1=\frac{-2+x}{2}; similarly, the y-coordinates must be equal, so 3=\frac{7+y}{2}.

    \begin{align*} \frac{-2+x}{2}&=1\\ -2+x&=1\times 2\quad\textrm{(clear fractions using the LCD)}\\ -2+x&=2\\ x&=4\\ \vdots&\\ \frac{7+y}{2}&=3\\ 7+y&=3\times 2\quad\textrm{(clear fractions using the LCD)}\\ 7+y&=6\\ y&=-1 \end{align*}

Therefore, B is the point (x,y)=(4,-1).

Example 9

Prove that the midpoint of (1,-1) and (3,-5) lies on the line y=\frac{1}{2}x-4.

We first calculate the midpoint of the given points (1,-1) and (3,-5); it is:

    \[\Big(\frac{1+3}{2},\frac{-1+-5}{2}\Big)=(2,-3).\]

Next, we check whether the midpoint we obtained, namely (2,-3), is on the given line y=\frac{1}{2}x-4. To do this, let’s substitute the value of x (that is, 2) into the given equation and see if we’ll get the value of y (that is, -3):

    \begin{align*} y&=\frac{1}{2}x-4\\ &=\frac{1}{2}(2)-4\quad\textrm{[we've replaced x with 2]}\\ &=1-4\\ &=-3 \end{align*}

Since we obtained the desired value of y, we can conclude that the midpoint lies on the line y=\frac{1}{2}x-4.

Example 10

If the midpoint of (x,y) and (y,-x) is (1,3), determine the values of x and y.

We have, by the midpoint formula, that:

    \[(1,3)=\Big(\frac{x+y}{2},\frac{y+-x}{2}\Big).\]

This in turn leads to two separate equations:

    \[1=\frac{x+y}{2},\quad\textrm{and}\quad 3=\frac{y+-x}{2}.\]

Clear fractions to obtain

    \[2=x+y\quad\textrm{and}\quad 6=y+-x.\]

If we re-arrange a bit, we see that this is a linear system:

    \begin{align*} x+y&=2\\ -x+y&=6 \end{align*}


Adding the two equations: 2y=8\implies y=4. Substituting y=4 in any of the two equations gives x=-2. So we conclude that x=-2 and y=4.

Exercises for the reader

  1. Derive the midpoint formula; that is, prove that the midpoint of A(x_1,y_1) and B(x_2,y_2) is \Big(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\Big).
  2. An idea from statistics: Let M\Big(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\Big) be the midpoint of A(x_1,y_1) and B(x_2,y_2). Define the lower midpoint L to be the midpoint of A and M, and the upper midpoint U to be the midpoint of M and B. Prove that:

        \[L=\Big(\frac{3x_1+x_2}{4},\frac{3y_1+y_2}{4}\Big);~U=\Big(\frac{x_1+3x_2}{4},\frac{y_1+3y_2}{4}\Big).\]

  3. In furtherance of exercise 2 above, prove that the midpoint of L and U is M, the midpoint of A and B. (This is expected.)

Length of a line segment

Let A(x_1,y_1) and B(x_2,y_2) be the coordinates of a line segment AB. We have:

    \[\boxed{\textrm{\textbf{DISTANCE FORMULA:=}}\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}}\]

As in the case of the midpoint of a line segment, the above distance/length formula is very easy to use.

Example 1

Find the length of the line segment joining the points A(1,1) and B(2,2).

Let the length be l. We have, by the distance formula, that

    \[l=\sqrt{(2-1)^2+(2-1)^2}=\sqrt{1^2+1^2}=\sqrt{1+1}=\sqrt{2}.\]

Therefore, the line segment is \sqrt{2} units long.

Example 2

Find the distance from the origin to the point (-3,4).

Let the distance be d. Since the origin is the point (0,0), we have, by the distance formula, that

    \[d=\sqrt{(-3-0)^2+(4-0)^2}=\sqrt{9+16}=\sqrt{25}=5.\]

The required distance is 5 units.

Example 3

Find the distance between (\frac{1}{2},-3) and (\frac{3}{5},\frac{7}{8}).

By the distance formula, we have:

    \[d=\sqrt{\Big(\frac{3}{5}-\frac{1}{2}\Big)^2+\Big(\frac{7}{8}--3\Big)^2}=\sqrt{\frac{24041}{1600}}=\sqrt{15.025625}.\]

Using a calculator, we obtain that d\approx 3.88.

Example 4

Determine the possible value(s) of a for which the distance between (a,3) and (-1,-2) is 13 units.

We have, by the distance formula, that

    \[\sqrt{(a--1)^2+(3--2)^2}=13\]

We now simplify and solve:

    \begin{align*} \sqrt{(a+1)^2+(3+2)^2}&=13\\ \sqrt{(a+1)^2+5^2}&=13\\ \sqrt{(a+1)^2+25}&=13\\ (a+1)^2+25&=13^2\quad\textrm{square both sides}\\ (a+1)^2+25&=169\\ (a+1)^2&=169-25\\ (a+1)^2&=144\\ a+1&=\pm\sqrt{144}\quad\textrm{square ROOTS}\\ a+1&=\pm 12\\ a&=-1\pm 12\\ a&=-1+12\quad\textrm{or}\quad a=-1-12\\ a&=11\quad\textrm{or}\quad a=-13 \end{align}

Therefore, there are two possible values of a: 11 or -13.

Example 5

For any number k, prove that the distance between the points (k+1, k-1) and (k-2,k+3) is 5 units.

Let the distance be d. We have, by the distance formula, that:

    \begin{align*}d&=\sqrt{(k-2-(k+1))^2+(k+3-(k-1))^2}\\ &=\sqrt{(k-2-k-1)^2+(k+3-k+1)^2}\\ &=\sqrt{(-3)^2+(4)^2}\\ &=\sqrt{9+16}\\ &=\sqrt{25}\\ &=5, \end{align}

as required. This seems to suggest, as we would expect, that the length of a line segment is invariant under a translation.

Example 6

Let A(7,-9) be a given point. Find the coordinates of a point B that has a distance of 17 units from A. How many possibilities are there?

Let the coordinates of point B be (x,y). Since the distance between A and B is 17 units, we have, by the distance formula, that:

    \[\sqrt{(x-7)^2+(y--9)^2}=17\]

Squaring both sides gives (x-7)^2+(y+9)^2=17^2, or (x-7)^2+(y+9)^2=289. We now use trial-and-error (or, guess-and-check) to find a possible solution. Let’s try x=-1 and y=3:

    \[(-1-7)^2+(3+9)^2=(-8)^2+12^2=64+144=208.\]

Oops \cdots doesn’t work. Let’s try x=-1 and y=6:

    \[(-1-7)^2+(6+9)^2=(-8)^2+15^2=64+225=289.\]

Works! So, a possible choice of coordinates for B is (-1,6). Let’s see if we can find another set of coordinates. Put x=15 and y=6:

    \[(15-7)^2+(6+9)^2=8^2+15^2=64+225=289.\]

Works again!! Let’s try x=-8 and y=-1:

    \[(-8-7)^2+(-1+9)^2=(-15)^2+8^2=225+64=289.\]

Works again!!! In general, there’s an infinite number of solutions to this problem. Later on we’ll recognize the equation (x-7)^2+(y+9)^2=289 as that of a circle, and any point on (the circumference of) the circle is a solution.

Classifying triangles using the length formula

As you’ll recall, a triangle can be SCALENE (all three sides are of different lengths), ISOSCELES (two sides have the same length), or EQUILATERAL (all three sides have the same length). If we know the coordinates of the vertices of the triangle, we can use the distance formula to determine what type of triangle it is.

Example 7

What type of triangle is formed by the points A(0,0), ~B(1,2), ~C(-1,3)?

We’ll need to compare the lengths of the sides of the triangle. Let’s calculate the lengths of AB,BC, and CA using the distance formula:

    \begin{align*} AB&=\sqrt{(1-0)^2+(2-0)^2}\\ &=\sqrt{1^2+2^2}\\ &=\sqrt{1+4}\\ &=\sqrt{5}\\ &\vdots\cdots\\ BC&=\sqrt{(-1-1)^2+(3-2)^2}\\ &=\sqrt{(-2)^2+1^2}\\ &=\sqrt{4+1}\\ &=\sqrt{5}\\ &\vdots\cdots\\ CA&=\sqrt{(-1-0)^2+(3-0)^2}\\ &=\sqrt{(-1)^2+3^2}\\ &=\sqrt{1+9}\\ &=\sqrt{10} \end{align}

Since AB=BC, the given triangle is ISOSCELES. Additionally, this triangle contains 90^{\circ}, due to the fact that AB^2+BC^2=CA^2 (alternatively, this can also be seen by calculating the slopes of AB and BC, which are 2 and -1/2, respectively).

Example 8

Determine an appropriate choice of coordinates for points A,B,C such that the resulting triangle \triangle ABC will be equilateral.

In the exercises below, we give a general strategy for constructing an equilateral triangle using coordinates. For now, we use that knowledge to solve this challenge. Let’s choose A(-1,0),B(1,0),C(0,\sqrt{3}) and use the distance formula to find the lengths of AB,BC,CA:

    \begin{align*} AB&=\sqrt{(1--1)^2+(0-0)^2}\\ &=\sqrt{(1+1)^2+0}\\ &=\sqrt{2^2+0}\\ &=\sqrt{4}\\ &=2\\ &\vdots\cdots\\ BC&=\sqrt{(0-1)^2+(\sqrt{3}-0)^2}\\ &=\sqrt{(-1)^2+(\sqrt{3})^2}\\ &=\sqrt{1+3}\\ &=\sqrt{4}\\ &=2\\ &\vdots\cdots\\ CA&=\sqrt{(0--1)^2+(\sqrt{3}-0)^2}\\ &\sqrt{(0+1)^2+(\sqrt{3})^2}\\ &=\sqrt{1+3}\\ &=\sqrt{4}\\ &=2 \end{align}

It works! We conclude that the triangle \triangle ABC with coordinates at A(-1,0),B(1,0),C(0,\sqrt{3}) is equilateral.

How slope affects the length of a line segment

The slope formula and the distance formula are quite “similar” — in the sense that they both use the “same numbers” but with different operations on them:

    \[\textrm{\textbf{slope:=}}\frac{y_2-y_1}{x_2-x_1}; ~\textrm{\textbf{distance:=}}\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\]

Because of this, we can expect some relationship between the two.

Example 9

Prove that if a line segment with integer coordinates has a slope of 1, then ITS LENGTH CAN NEVER BE AN INTEGER.

Let l be the length of a line segment AB that satisfies the specified condition. Suppose that A is the point (x_1,y_1) and B is the point (x_2,y_2). Since the slope of AB is 1, we have, by the slope formula, that

    \[1=\frac{y_2-y_1}{x_2-x_1},\quad\implies y_2-y_1=x_2-x_1.\]

We now have, by the distance formula, that

    \begin{align*} l&=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\\ &=\sqrt{2(x_2-x_1)^2}\quad\textrm{or}~\sqrt{2(y_2-y_1)^2}\\ &=|(x_2-x_1)|\sqrt{2}\quad\textrm{or}~|(y_2-y_1)|\sqrt{2} \end{align}

The resulting length l is a positive integer multiple of \sqrt{2}. Since \sqrt{2} is not an integer, l is not.

In the next example, we prove that the same thing happens whenever the slope of the line segment is an integer other than 1 (excepting zero).

Example 10

Prove that if a line segment with integer coordinates has a slope m that is an integer, then ITS LENGTH CAN NEVER BE AN INTEGER.

As before, let l be the length of a line segment AB that satisfies the given condition. Suppose that A is the point (x_1,y_1) and B is the point (x_2,y_2). Since the slope of AB is m, we have, by the slope formula, that

    \[m=\frac{y_2-y_1}{x_2-x_1},\quad\implies y_2-y_1=m(x_2-x_1).\]

We now have, by the distance formula, that

    \begin{align*} l&=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\\ &=\sqrt{(x_2-x_1)^2+(m(x_2-x_1))^2}\\ &=\sqrt{(x_2-x_1)^2+m^2(x_2-x_1)^2}\\ &=\sqrt{(x_2-x_1)^2(1+m^2)}\\ &=|(x_2-x_1)|\sqrt{1+m^2} \end{align}

The resulting length l is a positive integer multiple of \sqrt{1+m^2}. Since \sqrt{1+m^2} is not an integer (except when m=0), l is not.

Exercises for the reader

  1. Derive the distance formula; that is, prove that the distance d between (x_1,y_1) and (x_2,y_2) is given by
  2.     \begin{equation*} d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}. \end{equation}

  3. Prove that the distance between two points is invariant under a horizontal/vertical translation. In other words, prove that the distance between (x_1,y_1) and (x_2,y_2) is the same as the distance between (x_1+k,y_1+k) and (x_2+k,y_2+k), for any value of k.
  4. Let a,x,y be real numbers with a\neq 0. Prove that any triangle with vertices located at (x-a,y),(x+a,y),(x,y+a\sqrt{3}) is equilateral.