MathPath
Grades 1–13 Math Hub
Grades 8–10 · Coordinate Geometry · Formula Deep Dive

Distance & Midpoint Formulas: Proof & Examples

In the coordinate plane, the Distance Formula finds the exact length of a line segment using the Pythagorean Theorem, while the Midpoint Formula finds its exact center by averaging the coordinates.

$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}, \qquad M = \left(\frac{x_1+x_2}{2},\; \frac{y_1+y_2}{2}\right)$$

Variables: Coordinates $(x_1, y_1)$ and $(x_2, y_2)$ in the 2D plane.

When to use: Coordinate geometry proofs, finding segment lengths and centers.

Segment in the Coordinate Plane

xy-1123456-1123456(1,2)(5,5)

Between $(1, 2)$ and $(5, 5)$: horizontal leg $\Delta x = 4$, vertical leg $\Delta y = 3$, distance $d = \sqrt{4^2 + 3^2} = 5$, and midpoint $M = (3, 3.5)$.

Derivation of Both Formulas

Plot two points $A(x_1, y_1)$ and $B(x_2, y_2)$ and draw a horizontal and vertical line to form a right triangle.

  1. The horizontal leg has length $|x_2 - x_1|$ and the vertical leg has length $|y_2 - y_1|$.
  2. By the Pythagorean Theorem, the segment length $d$ (hypotenuse) satisfies $d^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2$.
  3. Taking the positive square root yields $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$.
  4. For the midpoint $M$, the point halfway between $x_1$ and $x_2$ is their average $\frac{x_1 + x_2}{2}$, and halfway between $y_1$ and $y_2$ is $\frac{y_1 + y_2}{2}$.

Key Coordinate Applications

Circle Radius & Center

If endpoints of a diameter are given, the midpoint is the center and half the distance is the radius.

Finding a Missing Endpoint

Given $A(x_1, y_1)$ and midpoint $M(m_x, m_y)$, solve $x_2 = 2m_x - x_1$ and $y_2 = 2m_y - y_1$.

Horizontal / Vertical Segments

When $y_1 = y_2$, $d = |x_2 - x_1|$; when $x_1 = x_2$, $d = |y_2 - y_1|$.

3D Distance Extension

In 3D space, simply add $(z_2 - z_1)^2$ under the square root.

Step-by-Step Worked Examples

Example 1: Distance and Midpoint with Negative Coordinates

Problem: Find the distance and midpoint between $(-2, 4)$ and $(4, -4)$.
  1. Differences: $x_2 - x_1 = 4 - (-2) = 6$, and $y_2 - y_1 = -4 - 4 = -8$.
  2. Distance: $d = \sqrt{6^2 + (-8)^2} = \sqrt{36 + 64} = \sqrt{100} = 10$.
  3. Midpoint: $M = \left(\frac{-2 + 4}{2}, \frac{4 + (-4)}{2}\right) = (1, 0)$.

Example 2: Finding a Missing Endpoint from the Midpoint

Problem: Segment $AB$ has endpoint $A(2, 5)$ and midpoint $M(6, 1)$. Find $B(x, y)$.
  1. Set up midpoint equations: $\frac{2 + x}{2} = 6$ and $\frac{5 + y}{2} = 1$.
  2. Multiply by $2$: $2 + x = 12 \Rightarrow x = 10$, and $5 + y = 2 \Rightarrow y = -3$.
  3. So $B = (10, -3)$. Quick check: average of $2$ and $10$ is $6$; average of $5$ and $-3$ is $1$ ✓.

Common Mistakes to Avoid

Mistake 1: Confusing Subtraction (Distance) with Addition (Midpoint)

✗ Wrong: Subtracting coordinates in the Midpoint Formula or adding them in the Distance Formula.
✓ Correct: Distance measures how far apart points are (SUBTRACT: $x_2 - x_1$). Midpoint finds the average (ADD & divide by 2: $\frac{x_1 + x_2}{2}$).

Why: Mixing $+$ and $-$ is the #1 test error when both formulas appear on the same quiz.

Mistake 2: Squaring Negative Differences as Negative

✗ Wrong: Computing $(-8)^2 = -64$ inside the Distance Formula.
✓ Correct: $(-8)^2 = +64$. Every squared term inside the square root is non-negative.

Why: Distance is never imaginary or smaller than either leg.

Frequently Asked Questions

Can distance ever be negative?

No. Distance is a length, so we always take the principal (non-negative) square root.

Does point order matter in the Distance or Midpoint Formula?

No! Because $(x_2 - x_1)^2 = (x_1 - x_2)^2$ and $x_1 + x_2 = x_2 + x_1$, both formulas give the exact same result regardless of order.

Can I simplify a non-perfect square distance?

Yes—for example, $\sqrt{20} = 2\sqrt{5} \approx 4.47$. Check whether your assignment asks for exact radical form or a rounded decimal.

Practice & Related Resources

Apply Distance & Midpoint Formulas on interactive problems, printable PDF worksheets, and calculators.

Pythagorean Theorem (a² + b² = c²) →Grade 9 Coordinate Geometry Quiz →Printable Coordinate Geometry Worksheets →Open Geometry Calculator → ← Back to Geometry Formulas Cheat Sheet