Section 8-5
The Distance Formula
The distance formula is just the Pythagorean Theorem in disguise.
To calculate the distance AB between point A(x1, y1) and point B(x2, y2), first draw a right triangle which has the segment
as its hypotenuse.
If the lengths of the sides are a and b, then by the Pythagorean Theorem,
(AB)2 = (AC)2 + (BC)2
Solving for the distance AB, we have:
Since AC is a horizontal distance, it is just the difference between the x-coordinates: |(x1 – x2)|. Similarly, BC is the vertical distance |(y1 – y2)|.
Since we're squaring these distances anyway (and squares are always non-negative), we don't need to worry about those absolute value signs.
Example:
Find the distance between points A and B in the figure above.
In the above example, we have:
A(x1, y1) = (–1, 0), B(x2, y2) = (2, 7)
so


