Distance Formula
Key Formula
d=(x2−x1)2+(y2−y1)2
Where:
- d = The distance between the two points
- (x1,y1) = The coordinates of the first point
- (x2,y2) = The coordinates of the second point
Worked Example
Problem: Find the distance between the points (1, 2) and (4, 6).
Step 1: Identify the coordinates. Let (x₁, y₁) = (1, 2) and (x₂, y₂) = (4, 6).
x1=1,y1=2,x2=4,y2=6
Step 2: Substitute into the distance formula.
d=(4−1)2+(6−2)2
Step 3: Compute the differences and square them.
d=32+42=9+16
Step 4: Add the squared terms and take the square root.
d=25=5
Answer: The distance between (1, 2) and (4, 6) is 5 units.
Another Example
This example involves negative coordinates, which is where sign errors commonly occur. It demonstrates that subtracting a negative number produces a positive difference.
Problem: Find the distance between the points (−3, 7) and (2, −5).
Step 1: Assign the coordinates. Let (x₁, y₁) = (−3, 7) and (x₂, y₂) = (2, −5).
x1=−3,y1=7,x2=2,y2=−5
Step 2: Substitute into the formula, being careful with the negative signs.
d=(2−(−3))2+(−5−7)2
Step 3: Simplify the expressions inside the parentheses.
d=52+(−12)2=25+144
Step 4: Add and take the square root.
d=169=13
Answer: The distance between (−3, 7) and (2, −5) is 13 units.
Frequently Asked Questions
Where does the Distance Formula come from?
The Distance Formula is derived from the Pythagorean theorem. If you draw a right triangle where the horizontal leg has length |x₂ − x₁| and the vertical leg has length |y₂ − y₁|, then the hypotenuse is the distance between the two points. Applying a² + b² = c² and solving for c gives you the Distance Formula.
Does it matter which point is (x₁, y₁) and which is (x₂, y₂)?
No, it does not matter. Because each difference is squared, the result is always positive regardless of which point you call first. Swapping the two points gives the same distance.
What is the Distance Formula in 3D?
In three dimensions, the formula extends to d = √[(x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²]. You simply add a third squared difference for the z-coordinates. The logic is the same — it generalizes the Pythagorean theorem to one more dimension.
Distance Formula vs. Midpoint Formula
| Distance Formula | Midpoint Formula | |
|---|---|---|
| What it finds | The length of the segment between two points | The point exactly halfway between two points |
| Formula | d = √[(x₂ − x₁)² + (y₂ − y₁)²] | M = ((x₁ + x₂)/2, (y₁ + y₂)/2) |
| Result type | A single number (a distance) | An ordered pair (a point) |
| Based on | Pythagorean theorem | Averaging coordinates |
Why It Matters
The Distance Formula appears throughout algebra, geometry, trigonometry, and physics whenever you need to measure how far apart two objects or locations are on a coordinate grid. You will use it to prove geometric properties like showing a triangle is isosceles, to find the length of a side in coordinate geometry proofs, and to calculate magnitudes of vectors. It also underpins the equation of a circle, since a circle is defined as all points at a fixed distance (the radius) from a center point.
Common Mistakes
Mistake: Forgetting to square the differences before adding them — writing √[(x₂ − x₁) + (y₂ − y₁)] instead of √[(x₂ − x₁)² + (y₂ − y₁)²].
Correction: Always square each difference first, then add, then take the square root. The squaring is essential because it comes from the Pythagorean theorem.
Mistake: Making sign errors when coordinates are negative, such as computing (2 − (−3)) as −1 instead of 5.
Correction: Subtracting a negative number means you add its absolute value. Write it out carefully: 2 − (−3) = 2 + 3 = 5. Double-check your signs before squaring.
Related Terms
- Formula — General term for mathematical rules like this one
- Point — The ordered pairs the formula operates on
- Distance from a Point to a Line — Related formula for point-to-line distance
- Plane — The 2D coordinate plane where the formula applies
- Three Dimensions — Extends the formula with a z-coordinate term
- Pythagorean Theorem — The theorem from which the formula is derived
- Midpoint — Finds the center point rather than the length
- Equation of a Circle — Uses the distance formula to define a circle

is
the distance between 