How does the distance formula in three dimensions follow the Pythagorean theorem?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

In Euclidean geometry, the distance formula in three dimensions is a direct extension of the Pythagorean theorem, which states that the square of the hypotenuse of a right triangle equals the sum of the squares of the other two sides.12

To find the distance between two points (a,b,c) and (d,e,f) in three-dimensional space, one essentially applies the Pythagorean theorem twice. First, the distance between the points in the xy-plane is determined using the two-dimensional formula (a−d)2+(b−e)2. When this horizontal distance is treated as one leg of a new right triangle—with the vertical difference (c−f) as the second leg—the hypotenuse represents the straight-line distance between the two points in 3D space.12

By squaring these components, the formula becomes:
(a−d)2+(b−e)2+(c−f)2
This calculation effectively generalizes the relationship between the sides of a right triangle to three-dimensional Euclidean space.12