Distance And Midpoint

Interactive Distance And Midpoint graph — click to explore
Click the graph to explore it interactively →
Question: Find the distance and midpoint of two points
To find the distance and midpoint between two points in a coordinate plane, we use two fundamental formulas derived from basic geometry.

1. The Distance Formula

The distance between two points (x_1, y_1) and (x_2, y_2) is the length of the straight line segment connecting them. This is derived from the Pythagorean theorem ( a^2 + b^2 = c^2), where the horizontal change ( \Delta x) and vertical change ( \Delta y) form the legs of a right triangle.
\begin{align*} d &= \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \end{align*}

2. The Midpoint Formula

The midpoint is the point exactly halfway between two points. It is found by calculating the average of the x-coordinates and the average of the y-coordinates.
\begin{align*} M &= \left( \frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2} \right) \end{align*}

Example Calculation

Consider two points: Point A (2, 2) and Point B (8, 6).
Step 1: Find the distance. \begin{align*} d &= \sqrt{(8 - 2)^2 + (6 - 2)^2} \\ d &= \sqrt{6^2 + 4^2} \\ d &= \sqrt{36 + 16} \\ d &= \sqrt{52} \approx 7.21 \end{align*}
Step 2: Find the midpoint. \begin{align*} x_m &= \frac{2 + 8}{2} = \frac{10}{2} = 5 \\ y_m &= \frac{2 + 6}{2} = \frac{8}{2} = 4 \\ M &= (5, 4) \end{align*}
In the interactive diagram:
  • Point A (blue) and Point B (red) are the endpoints.
  • The green segment represents the distance between them.
  • Point M (orange) is the calculated midpoint.
  • The dashed grey lines show the horizontal and vertical changes used to calculate the distance. Use the sliders to move Point B and observe how the distance and midpoint update automatically.