Math 1 • Geometry

Distance Formula — I can compute distance between two points and interpret it in a context.

Turn any two coordinate points into a precise measurement of the straight-line distance between them.

Math 1 emblem with geometric shapes, a calculator, and division.
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Historical Context & Motivation

How far apart are two cities on a map? How long is the diagonal of a soccer field? Humans have been measuring distances for thousands of years, but a reliable formula for computing straight-line distance between two locations took centuries to develop. The story begins in ancient Greece with a famous theorem about right triangles and reaches its modern form only after mathematicians invented the coordinate plane.

~500 BCE • Pythagorean Theorem

Greek mathematicians, including followers of Pythagoras, formally prove that in a right triangle the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c².

~300 BCE • Euclid's Elements

Euclid compiles and rigorously proves geometric theorems—including the Pythagorean Theorem—in his thirteen-book masterwork, making distance reasoning systematic.

1637 • Descartes' Coordinate System

René Descartes publishes La Géométrie, introducing the x-y coordinate plane. Geometry and algebra merge, allowing points to be described by ordered pairs.

1700s • Distance Formula Emerges

Mathematicians apply the Pythagorean Theorem directly to the coordinate plane, producing the distance formula as a standard algebraic tool for analytic geometry.

The central question the distance formula answers is straightforward: given two points on the coordinate plane, what is the exact straight-line distance between them? Because the formula is just the Pythagorean Theorem in disguise, every time you use it you are building a right triangle, computing its leg lengths, and finding its hypotenuse.

SECTION 2

Core Principles & Definitions

Before you plug numbers into any equation, it helps to understand the handful of ideas that make the distance formula work. Each principle below connects the algebra you see on paper to the geometry you can picture on a graph.

1

Ordered Pairs

Every point on the coordinate plane is described by an ordered pair (x, y). The first value tells how far right or left; the second tells how far up or down from the origin.
2

Horizontal & Vertical Distances

The horizontal distance between two points is the absolute difference of their x-coordinates. The vertical distance is the absolute difference of their y-coordinates.
3

Right-Triangle Connection

Those horizontal and vertical distances form the two legs of a right triangle. The straight-line distance between the points is the hypotenuse of that triangle.
4

Pythagorean Theorem

For any right triangle with legs a and b and hypotenuse c, a² + b² = c². Solving for c gives c = √(a² + b²), which is exactly the distance formula.
✦

KEY TAKEAWAY

Think of the distance formula as a GPS shortcut. Imagine you are standing at one intersection in a city grid and need to know the "as-the-crow-flies" distance to another intersection. You could walk east a certain number of blocks (horizontal leg) and then north a certain number of blocks (vertical leg), forming an L-shape. The distance formula tells you how long the diagonal shortcut would be if you could walk straight through the buildings. The Pythagorean Theorem is doing all the heavy lifting.

SECTION 3

Visual Explanation

The diagram below shows exactly how the distance formula works geometrically. Two points, A and B, sit on the coordinate plane, and a dashed right triangle is drawn between them. Study the horizontal leg, the vertical leg, and the hypotenuse—the hypotenuse length is the distance the formula calculates.

xy24682468A (2, 2)B (8, 7)Δx = 8 − 2 = 6Δy = 7 − 2 = 5d = √(6² + 5²) = √610
Point A (2, 2) and point B (8, 7) define a right triangle. The horizontal leg (Δx = 6) and vertical leg (Δy = 5) combine via the Pythagorean Theorem to produce the hypotenuse d = √61 ≈ 7.81 units.

Notice how the dashed yellow line (the horizontal leg) runs from x = 2 to x = 8, giving a length of 6. The dashed green line (the vertical leg) runs from y = 2 to y = 7, giving a length of 5. The solid pink line is the hypotenuse—the actual straight-line distance we want. The right-angle box in the corner confirms the triangle is a right triangle, which means the Pythagorean Theorem applies directly.

SECTION 4

Mathematical Framework

The distance formula is derived straight from the Pythagorean Theorem applied to the coordinate plane. Here is the formal statement of the theorem, followed by the distance formula itself.

PYTHAGOREAN THEOREM

a2+b2=c2a² + b² = c²

In a right triangle, a and b are the lengths of the two legs, and c is the length of the hypotenuse (the side opposite the right angle).

DISTANCE FORMULA

d=√[(x2−x1)2+(y2−y1)2]d = √[(x₂ − x₁)² + (y₂ − y₁)²]

Where (x₁, y₁) and (x₂, y₂) are the coordinates of two points, and d is the straight-line distance between them. The expression (x₂ − x₁) represents the horizontal leg, and (y₂ − y₁) represents the vertical leg of the right triangle.

Notice that squaring each difference before adding eliminates any issues with negative signs. Whether x₂ is bigger or smaller than x₁ does not matter, because (−3)² and 3² both equal 9. This means you can label the two points in any order and still get the same distance.

SIMPLIFIED FORM

d2=(Δx)2+(Δy)2d² = (Δx)² + (Δy)²

Here Δx ("delta x") means the change in x, and Δy means the change in y. This compact notation emphasizes that the formula finds the hypotenuse of a triangle whose legs are the horizontal and vertical changes.

💡

Order Doesn't Matter

It makes no difference which point you call (x₁, y₁) and which you call (x₂, y₂). Subtracting in the opposite order flips the sign, but squaring removes the negative. The final distance is always the same positive value.

SECTION 5

Step-by-Step Breakdown

Every distance-formula problem follows the same four-step process. The diagram below maps those steps visually, and the table that follows summarizes what to do and what to watch out for at each stage.

STEP 1Identify(x₁, y₁) and (x₂, y₂)STEP 2SubtractΔx = x₂ − x₁ , Δy = y₂ − y₁STEP 3Square & Add(Δx)² + (Δy)²STEP 4Take √d = √(sum)Example: A (−3, 1) → B (5, 7)STEP 1x₁=−3, y₁=1x₂=5, y₂=7STEP 2Δx = 5−(−3) = 8Δy = 7−1 = 6STEP 38² + 6² = 64 + 36= 100STEP 4d = √100 = 10The distance from A (−3, 1) to B (5, 7) is exactly 10 units.
A four-step flowchart shows the process from identifying coordinates through subtraction, squaring-and-adding, to taking the square root. The worked example below uses points A (−3, 1) and B (5, 7) to produce a clean answer of d = 10 units.
StepWhat You DoCommon Mistakes to Avoid
1 — IdentifyLabel the two points as (x₁, y₁) and (x₂, y₂).Don't mix up x- and y-values—keep each pair together.
2 — SubtractCompute x₂ − x₁ and y₂ − y₁ separately.Watch sign errors with negatives: 5 − (−3) = 8, not 2.
3 — Square & AddSquare each difference, then add the two squares.Square before adding—don't add the differences first and then square.
4 — Square RootTake the principal (positive) square root of the sum.Simplify the radical if possible: √50 = 5√2.

Step-by-step process with common pitfalls

SECTION 6

Worked Example

Let's work through a contextual problem from start to finish. Suppose a drone takes off from a rooftop helipad located at coordinate (−4, 3) on a city grid and flies in a straight line to a delivery point at (8, −2). Each grid unit represents 100 meters. How far does the drone fly, in meters?

Drone Delivery Distance

  1. 1

    Step 1 — Identify the coordinates

    Label the takeoff point as (x₁, y₁) = (−4, 3) and the delivery point as (x₂, y₂) = (8, −2).
    (x₁, y₁) = (−4, 3) (x₂, y₂) = (8, −2)
  2. 2

    Step 2 — Find the horizontal and vertical differences

    Compute Δx = x₂ − x₁ = 8 − (−4) = 8 + 4 = 12. Then compute Δy = y₂ − y₁ = −2 − 3 = −5. The negative sign on Δy simply means the drone moved downward; it won't affect the final distance because we will square it.
    Δx = 12, Δy = −5
  3. 3

    Step 3 — Square each difference and add

    Square Δx: 12² = 144. Square Δy: (−5)² = 25. Add the squares: 144 + 25 = 169.
    (Δx)² + (Δy)² = 144 + 25 = 169
  4. 4

    Step 4 — Take the square root

    d = √169 = 13 grid units. Since each grid unit is 100 meters, multiply: 13 × 100 = 1 300 meters.
    d = 13 units = 1 300 meters
  5. 5

    Step 5 — Interpret

    The drone flies exactly 1 300 meters (1.3 km) in a straight line from the helipad to the delivery point. If the drone's battery supports a 2 km range, it can make this trip with room to spare.
    The drone travels 1.3 km—well within its 2 km range.

SECTION 7

Strengths, Limitations & Variations

The distance formula is one of the most useful tools in coordinate geometry, but like any formula it has both ideal use cases and situations where other approaches work better. The table below lays out its strengths alongside its limitations.

StrengthsLimitations
Works for any two points on the coordinate plane, regardless of quadrant or sign.Only gives straight-line ("as-the-crow-flies") distance, not the path along roads or curves.
Exact answer—no estimation required. Results are precise, either whole numbers or simplified radicals.Requires a coordinate system. If points are described without coordinates, you may need to set one up first.
Extends naturally to 3D: d = √[(x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²].On the surface of the Earth, latitude and longitude require the Haversine formula, not the flat-plane distance formula.
Foundation for many other formulas: midpoint, circle equations, and slope-intercept proofs.Can produce irrational numbers (like √2) that must be approximated with a calculator for practical use.

Comparing the distance formula's strengths and limitations

⚡

WHEN TO USE WHAT

Use the distance formula whenever you have two coordinate pairs and need the straight-line distance between them. If you only need the horizontal or vertical distance (not the diagonal), simply subtract the relevant x- or y-coordinates—no formula needed. And if you are working on a curved surface like the Earth, you will eventually learn more advanced tools in trigonometry.

SECTION 8

Connection to Advanced Topics

The distance formula you learn in Math 1 is actually a stepping stone to powerful ideas in more advanced courses. Below is a comparison between the 2D version you are mastering now and extensions you will encounter later.

Feature2D Distance (This Course)Advanced Extensions
DimensionsTwo: x and yThree (x, y, z) in Geometry or Physics; n-dimensions in linear algebra.
SurfaceFlat coordinate planeCurved surfaces use the Haversine or great-circle distance formulas.
ApplicationsClassroom geometry, simple coordinate proofsComputer graphics, GPS navigation, machine learning (Euclidean distance between data points).
Related FormulasMidpoint formula, slope formulaEquation of a circle (x − h)² + (y − k)² = r² is literally the distance formula set equal to a constant radius.

2D distance formula versus advanced extensions

One of the most important connections to notice right now is the equation of a circle. A circle is defined as all points that are a fixed distance r from a center (h, k). If you set d = r in the distance formula and square both sides, you get (x − h)² + (y − k)² = r². So every time you use the equation of a circle, the distance formula is running behind the scenes.

SECTION 9

Practice Problems

Try these five problems to solidify your understanding. They start with a concept check and build up to a challenge that asks you to think critically.

Question 1: CONCEPTUAL

Explain in your own words why the distance formula always gives a positive value, even when one or both of the coordinate differences are negative.
Show answer
The distance formula squares each coordinate difference before adding them together. Squaring any real number—positive or negative—always produces a non-negative result. For example, (−4)² = 16, which is the same as 4² = 16. After adding two non-negative squares, you take the principal (positive) square root. Because the square root of a positive number is positive, the final distance is always positive. In geometric terms, distance is a length, and lengths are never negative.

Question 2: BASIC CALCULATION

Find the distance between the points (1, 3) and (4, 7).
Show answer
Using the distance formula: d = √[(4 − 1)² + (7 − 3)²] = √[3² + 4²] = √[9 + 16] = √25 = 5. The distance between (1, 3) and (4, 7) is exactly 5 units. Notice that 3, 4, 5 is a Pythagorean triple, so the answer comes out as a whole number.

Question 3: INTERMEDIATE

Find the distance between (−6, 2) and (3, −10). Give your answer as a simplified radical.
Show answer
Substitute into the formula: d = √[(3 − (−6))² + (−10 − 2)²] = √[(3 + 6)² + (−12)²] = √[9² + 144] = √[81 + 144] = √225 = 15. In this case the radical simplifies to a whole number. The distance is 15 units. A common mistake would be computing 3 − (−6) as 3 − 6 = −3 instead of the correct 3 + 6 = 9; always be careful with double negatives.

Question 4: APPLIED

A park ranger's station is at (2, 5) on a trail map, and a lost hiker radios in their GPS position as (−7, −1). Each map unit equals 0.25 miles. How far is the ranger from the hiker, in miles? Round to the nearest tenth.
Show answer
First, compute the distance in map units: d = √[(−7 − 2)² + (−1 − 5)²] = √[(−9)² + (−6)²] = √[81 + 36] = √117 = √(9 × 13) = 3√13 ≈ 10.817 map units. Now convert to miles: 10.817 × 0.25 ≈ 2.704 miles. Rounded to the nearest tenth, the ranger is approximately 2.7 miles from the hiker. This real-world interpretation helps the ranger decide whether to drive or hike to the location.

Question 5: CRITICAL THINKING

Point C is at (1, 2) and point D is at (1 + a, 2 + a) where a > 0. Express the distance CD in terms of a. Then determine the value of a that makes CD equal to 10.
Show answer
Substitute into the distance formula: CD = √[((1 + a) − 1)² + ((2 + a) − 2)²] = √[a² + a²] = √(2a²) = a√2 (since a > 0). Now set CD = 10: a√2 = 10, so a = 10/√2 = 10√2/2 = 5√2 ≈ 7.07. This problem shows that when two coordinates change by the same amount, the diagonal distance is always √2 times that amount—a useful pattern when working with 45° lines on the coordinate plane.

SUMMARY

Lesson Summary

Summary

The distance formula — d = √[(x₂ − x₁)² + (y₂ − y₁)²] — is a direct application of the Pythagorean Theorem to the coordinate plane. You form a right triangle whose horizontal leg is the difference in x-coordinates and whose vertical leg is the difference in y-coordinates. Squaring these differences, adding them, and taking the square root gives the straight-line distance between any two points.

Remember to follow the four-step process: identify coordinates, subtract, square and add, then take the square root. Watch for sign errors with negative coordinates, and always interpret your result in context when the problem involves real-world units. This formula connects forward to the equation of a circle, the midpoint formula, and eventually to 3D distance calculations and beyond.

Varsity Tutors • Math 1 • Distance Formula