Distance Between Points
Find the distance between two points from their coordinates in 2D and 3D with an exact answer and a step-by-step solution.
The distance between points calculator finds the distance between two points from their coordinates in the plane and in space. The answer is exact — with a simplified root (for example, √8 = 2√2) — and approximate. It also shows the coordinates of vector AB and of the midpoint.
Distance formula
| Case | Formula |
|---|---|
| On a line | d = |xB − xA| |
| In the plane | d = √((xB − xA)² + (yB − yA)²) |
| In space | d = √((xB − xA)² + (yB − yA)² + (zB − zA)²) |
Example 1. A(−1, 2), B(3, −1).
d = √(4² + (−3)²) = √25 = 5.
Example 2. A(1, 2, 3), B(4, 6, 15).
d = √(3² + 4² + 12²) = √169 = 13.
The formula follows from the Pythagorean theorem: the coordinate differences are the legs of a right triangle, and segment AB is its hypotenuse. The distance equals the length of vector AB and does not depend on the order of the points.
Comments
No comments yet.