Functions
AI Assistant

Distance Between Two Points

The Pythagorean theorem meets coordinate geometry

Measuring distances on a map, finding how far apart two cities are, calculating the length of a diagonal — these all come down to one formula. How far apart are two points on a graph? The distance formula d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} tells you — and it's really just the Pythagorean theorem in disguise.

In this lesson, you'll start with two points, A(1, 2) and B(4, 6), connected by a blue line. A right triangle drawn underneath shows the horizontal leg (3) and vertical leg (4). By the Pythagorean theorem: 3² + 4² = 25, so d = 5.

You'll discover that the distance formula works for ANY two points — even when the answer isn't a nice whole number. By the end, you'll be comfortable finding the distance between any two points on a coordinate plane.

Graph

FAQ

What is the distance formula?
The distance formula d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} calculates the straight-line distance between two points (x₁, y₁) and (x₂, y₂). It's derived directly from the Pythagorean theorem.
How does the distance formula connect to the Pythagorean theorem?
Draw a right triangle with the two points as endpoints of the hypotenuse. The horizontal leg has length |x₂ - x₁| and the vertical leg has length |y₂ - y₁|. By the Pythagorean theorem, the hypotenuse (the distance) is \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}.
Does the distance formula work with negative coordinates?
Yes! The formula works with any coordinates, positive or negative. The squares inside the square root ensure the result is always positive. For example, the distance from (-2, 1) to (4, -3) is \sqrt{(4-(-2))^2 + (-3-1)^2} = \sqrt{36 + 16} = \sqrt{52} \approx 7.21.
What if the distance is not a whole number?
Most of the time, the distance won't be a nice whole number — and that's perfectly normal! For example, the distance from (0, 0) to (3, 3) is \sqrt{18} = 3\sqrt{2} \approx 4.24. You can leave the answer as a square root (exact) or use a decimal (approximate).