# Two points: distance between them and midpoint coordinates

In this article we review calculating the distance between two points, when coordinates of these points are known. Also we review calculating midpoint between these points.

Distance between two plane points $A(x_1,y_1)$ and $B(x_2,y_2)$ can be calculated with this formula: $${AB=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}}$$

Midpoint $C(x_m,y_m)$ coordinates, when endpoints are $A(x_1,y_1)$ and $B(x_2,y_2)$, can be calculated with these formulas: $${x_m=\frac{x_1+x_2}{2}, \ y_m=\frac{y_1+y_2}{2}}$$

## Solved examples

What is the distance between two plane points $A(5,10)$ and $B(20,30)$?

Using the formula above, we get:

$${AB=\sqrt{(20-5)^2+(30-10)^2}=25}$$Answer: AB = 25

What is the missing value of x, if we have point $A(x,7)$, point $B(2,3)$ and the length of segment $AB$ is 5?

Using the formula above, we get this equation:

$${\sqrt{(2-x)^2+(3-7)^2}=5}$$To solve this equation, we take a square above sides of the equation, then simplify everything and solve equation by factoring:

$$\begin{align} \Bigl(\sqrt{(2-x)^2+(3-7)^2}\Bigr)^2 & =5^2 \\ (2-x)^2+16 & =25 \\ 4-4x+x^2+16 & =25 \\ x^2-4x-5 & =0 \\ (x-5)(x+1) & =0 \\ x=5 & \ \text{or} \ x=-1 \\ \end{align}$$Answer: x = 5 or x = -1

Find the midpoint $M$ coordinates of the line segment with the given endpoints $A(3,9)$ and $B(7,-5)$?

Using the formulas above, we get:

$$x_m=\frac{3+7}{2}=5, \ y_m=\frac{9+(-5)}{2}=2$$Answer: $M(x,y)=M(5,2)$

Find the other endpoint $B$ coordinates of the line segment with the given endpoint $A(4,-12)$ and midpoint $M(8,11)$?

Using the formulas above, we get two equations and solve them:

$$8=\frac{4+x_2}{2}, \ x_2=12, \ 11=\frac{-12+y_2}{2}, \ y_2=34$$Answer: $B(x_2,y_2)=B(12,34)$

## Wanna check your skills?

A quiz is based on this article and has 5 questions.

### Quiz

2019-03-02

## All categories

## New content

- Rewriting radicals into exponential form (Algebra)
- Infinite geometric sequence sum formula and examples (Algebra)
- Geometric sequence formulas and examples (Algebra)
- Arithmetic sequence formulas and examples (Algebra)
- Simplifying square roots with absolute value (Algebra)
- Quadratic equations. Vieta's formulas and examples (Algebra)
- Basic laws of calculating exponents and examples (Algebra)
- Basic properties of radicals and examples (Algebra)