MathBored

Essential Math Primer
← Back to Primer Overview
R54 • Lesson 84 of 105

Distance Formula

Finding distance between two points using coordinates and the Pythagorean theorem

Reserve & Extensions • K-12

Prerequisites: M25, H29, M24

Key Concepts

  • distance formula
  • coordinate plane
  • Pythagorean theorem
  • applications

Distance Formula

How far is it between two points on a coordinate plane? You cannot simply measure along the x-axis or the y-axis -- in most cases the path is diagonal. The distance formula gives us the exact straight-line distance between any two points, and it comes directly from a theorem you already know: the Pythagorean theorem.

Deriving the Formula

Given two points (x1, y1) and (x2, y2), imagine drawing a right triangle where:

By the Pythagorean theorem (a2 + b2 = c2):

d = √[(x2 - x1)2 + (y2 - y1)2]

Worked Example 1: Finding Distance

Find the distance between A(1, 2) and B(4, 6).

  1. Identify coordinates: x1 = 1, y1 = 2, x2 = 4, y2 = 6
  2. Horizontal distance: 4 - 1 = 3
  3. Vertical distance: 6 - 2 = 4
  4. Apply formula: d = √(32 + 42) = √(9 + 16) = √25 = 5

Worked Example 2: With Negative Coordinates

Find the distance between P(-3, 5) and Q(2, -7).

  1. Horizontal: 2 - (-3) = 5
  2. Vertical: -7 - 5 = -12 (the square makes it positive)
  3. d = √(52 + (-12)2) = √(25 + 144) = √169 = 13

Squaring Removes the Worry About Order

Since we square the differences, it does not matter which point you call (x1, y1) and which you call (x2, y2). The result is always the same.

The Midpoint Formula

The midpoint is the point exactly halfway between two given points. Simply average the x-coordinates and average the y-coordinates:

Midpoint = ((x1 + x2) / 2, (y1 + y2) / 2)

Worked Example 3: Finding the Midpoint

Find the midpoint of A(2, 8) and B(10, -4).

  1. Average x-coordinates: (2 + 10) / 2 = 12 / 2 = 6
  2. Average y-coordinates: (8 + (-4)) / 2 = 4 / 2 = 2
  3. Midpoint: (6, 2)

Applications

The distance formula is used in navigation (GPS calculates distances between coordinates), computer graphics (collision detection in games), and physics (displacement calculations).

Common Mistake: Forgetting to Square

The formula is d = √[(x2 - x1)2 + (y2 - y1)2], not d = (x2 - x1) + (y2 - y1). Simply adding the differences gives the wrong answer.

Practice Problems

1. Find the distance between (0, 0) and (5, 12).

Show Solution

d = √(25 + 144) = √169 = 13

2. Find the distance between (-1, 3) and (3, 3).

Show Solution

d = √(42 + 02) = √16 = 4. (These points share a y-coordinate, so the distance is purely horizontal.)

3. Find the midpoint of (-6, 4) and (8, -2).

Show Solution

Midpoint = ((-6 + 8)/2, (4 + (-2))/2) = (2/2, 2/2) = (1, 1)

4. Find the distance between (2, -1) and (-3, 11).

Show Solution

d = √[(-3 - 2)2 + (11 - (-1))2] = √[25 + 144] = √169 = 13

5. A phone shows you are at location (3, 7) on a grid map. A coffee shop is at (9, 15). Each grid unit represents 0.1 miles. How far away is the coffee shop?

Show Solution

d = √[(9-3)2 + (15-7)2] = √[36 + 64] = √100 = 10 grid units. At 0.1 miles each: 10 × 0.1 = 1 mile.

Lesson Summary

Overview