# Points, Distance and Midpoint

Description for the calculation of distance and midpoint between 2 points

## Introduction

Any point can be described by a pair of numbers $$(x, y)$$. The numbers are the distance of A from the y axis $$(x)$$ , and from the x axis $$(y)$$. The pair $$(x, y)$$ are called the coordinates of the point A. Any points to the left of the y-axis will have a negative x coordinate. Any points below the x axis, will have a negative y coordinate.

## The distance between 2 points

Find the distance between two points $$A (1,2)$$ and $$B (4,5)$$.

To find the length $$AB$$ we use Pythagoras’ Theorem. $$AB$$ is the hypotenuse of an appropriate right-angled triangle $$ABC$$. This means that $$C$$ must be the point $$(4,2)$$.

The distance $$AC$$ is $$4 − 1 = 3$$

The distance $$BC$$ is $$5 − 2 = 3$$

According to Pythagoras Theorem

$$AB^2 = AC^2 + BC^2$$

Substitute the values for $$AC$$ and $$BC$$

$$AB^2 = 3^2 + 3^2$$

$$AB^2 = 9 + 9 =18$$

$$AB = \sqrt{18} = 4.243$$

The distance between $$A$$ and $$B$$ is $$4.243$$.

You can derive a general formula to use instead

$$AB=\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$$

More examples you can find here

## The midpoint of the line joining two points

Find the midpoint of two points$$A (2, 3)$$ and $$B (4, 5)$$.

Let $$C$$ be the midpoint of the line segment. To find the coordinates of $$C$$ the $$x$$ coordinate must be the average of the $$x$$ coordinates of $$A$$ and $$B$$.

The $$y$$ coordinate must be the average of the $$y$$ coordinates of $$A$$ and $$B$$.

The $$x$$ coordinate is $$\displaystyle \frac{1}{2} (2 + 4) = 3$$.
The $$y$$ coordinate is $$\displaystyle \frac{1}{2} (3 + 5) = 4$$.
So $$C$$ has coordinates $$(3, 4)$$

Now we can derive a general formula for the midpoint. If the two points are $$A (x1, y1)$$ and $$B (x2, y2)$$ then the midpoint $$C$$ must be equal to

$$\displaystyle \frac{1}{2} (x_1 + x_2),\frac{1}{2} (y_1 + y_2)$$