01 / 20

The Distance Formula

Learn to compute the distance between any two points on the coordinate plane and interpret it in context.

Math 1

What Is Distance?

In everyday life, distance is how far apart two things are: the length of the straight line connecting them. On the coordinate plane, we can calculate this exactly using coordinates.

Points on the Coordinate Plane

x y 1 2 3 4 5 1 2 3 4 5 \(A(1, 2)\) \(B(4, 5)\) \(d = ?\)

Every point has an \(x\)-coordinate (horizontal) and a \(y\)-coordinate (vertical). We write a point as \((x, y)\). The distance \(d\) between two points is the length of the straight segment joining them.

Built on Pythagorean Theorem

\((x_1, y_1)\) \((x_2, y_2)\) \((x_2, y_1)\) \(|x_2 - x_1|\) \(|y_2 - y_1|\) \(d\)

The Distance Formula

\((x_2 - x_1)^2\)
Squared horizontal change: how far left or right
\((y_2 - y_1)^2\)
Squared vertical change: how far up or down
\(\sqrt{\phantom{x}}\)
Square root undoes the squaring to give the actual length

Visualizing the Formula

x y 1 2 3 4 5 1 2 3 \(A(1, 1)\) \(B(4, 3)\) \(4 - 1 = 3\) \(3 - 1 = 2\) \(d = \sqrt{3^2+2^2} = \sqrt{13}\)

Distance vs. Displacement

Distance (Coordinate) Displacement / Directed
Definition Straight-line length between two points Change in position (can be negative)
Sign Always \(\geq 0\) Positive or negative
Formula \(\sqrt{(\Delta x)^2 + (\Delta y)^2}\) \(\Delta x = x_2 - x_1\), \(\Delta y = y_2 - y_1\)
Order matters? No: \(d(A,B) = d(B,A)\) Yes: direction changes sign

How to Apply the Formula

1
Label the points. Assign \((x_1, y_1)\) and \((x_2, y_2)\). Either point can be "first."
2
Subtract coordinates. Compute \(x_2 - x_1\) and \(y_2 - y_1\).
3
Square each difference. This removes negatives and sets up Pythagorean Theorem.
4
Add the squares. Sum the two results under the radical.
5
Take the square root. Simplify or approximate as needed. Include units if the problem has a context.

Example 1: Basic Calculation

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

\(P(2, 3)\) \(Q(7, 7)\) 5 4 \(d = \sqrt{41}\)

Example 2: Negative Coordinates

Find the distance between \(A(-3, 2)\) and \(B(1, -4)\).

x y \(A(-3, 2)\) \(B(1, -4)\) 4 6 \(d = \sqrt{52}\)

Example 3: Real-World Context

A fire station is at \((2, 5)\) and a house is at \((10, 11)\) on a city grid where each unit represents 0.25 miles. How far must a fire truck travel in a straight line?

1
Find coordinate distance: \(d = \sqrt{(10-2)^2 + (11-5)^2} = \sqrt{8^2 + 6^2} = \sqrt{64 + 36} = \sqrt{100} = 10\) units
2
Convert to miles: \(10 \times 0.25 = \) 2.5 miles

Example 4: Simplifying Radicals

Find the exact distance between \(M(-1, -5)\) and \(N(3, 1)\).

1
Subtract: \(x_2 - x_1 = 3 - (-1) = 4\), \(y_2 - y_1 = 1 - (-5) = 6\)
2
Square and add: \(4^2 + 6^2 = 16 + 36 = 52\)
3
Simplify: \(\sqrt{52} = \sqrt{4 \cdot 13} = 2\sqrt{13}\)

Special Cases

Horizontal Segment
Same \(y\)-values: \(d = |x_2 - x_1|\). The vertical part is zero.
Vertical Segment
Same \(x\)-values: \(d = |y_2 - y_1|\). The horizontal part is zero.

Common Mistakes

✕ Forgetting to Square
Writing \(\sqrt{(x_2-x_1) + (y_2-y_1)}\) instead of squaring each difference first.
✕ Sign Errors
Subtracting \((-3) - 2\) as \(-1\) instead of \(-5\). Watch double negatives.
✕ Forgetting the Root
Stopping at \(d^2 = 52\) and reporting \(52\) as the distance instead of \(\sqrt{52}\).

Summary Checklist

Step Action Watch For
1 Label \((x_1,y_1)\) and \((x_2,y_2)\) Order doesn't matter
2 Compute \(x_2 - x_1\) and \(y_2 - y_1\) Negative signs
3 Square each difference Result is always non-negative
4 Add the squares Don't add before squaring
5 Take \(\sqrt{\phantom{x}}\) and simplify Simplify radicals, add units

Question 1 of 5

What is the distance between \((0, 0)\) and \((3, 4)\)?

Question 2 of 5

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

Question 3 of 5

Points \(A(1, 6)\) and \(B(1, -2)\) form a vertical segment. What is the distance?

Question 4 of 5

A park is at \((3, 2)\) and a school is at \((9, 10)\) on a grid where each unit is 0.5 km. What is the straight-line distance in km?

Question 5 of 5

Which expression correctly gives the distance between \((a, b)\) and \((c, d)\)?