Distance Formula

Geometry & Measurement

The distance formula calculates the straight-line distance between two points in the coordinate plane using the Pythagorean theorem.

Formula

d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}

Definition

The distance formula tells you the straight-line distance between two points on a coordinate plane. You subtract the x-coordinates, subtract the y-coordinates, square both differences, add them together, and take the square root.

Example

Distance between $(1, 2)$ and $(4, 6)$: $d = \sqrt{(4-1)^2 + (6-2)^2} = \sqrt{9 + 16} = \sqrt{25} = 5$. The two points are $5$ units apart.

Key Insight

The distance formula is just the Pythagorean theorem in disguise. The horizontal difference is one leg, the vertical difference is the other leg, and the distance is the hypotenuse of an invisible right triangle.

Definition

For two points $(x_1, y_1)$ and $(x_2, y_2)$ in the Cartesian plane, the distance is $d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$. This is derived directly from the Pythagorean theorem applied to the right triangle formed by the two points and their horizontal/vertical separation.

Example

Points $A(-3, 1)$ and $B(5, 7)$: $d = \sqrt{(5-(-3))^2 + (7-1)^2} = \sqrt{64 + 36} = \sqrt{100} = 10$. The distance is $10$ units. Note: order of subtraction does not matter because the differences are squared.

Key Insight

The distance formula is symmetric: $d(A,B) = d(B,A)$. It can be used to verify whether three points form an isosceles or equilateral triangle, to find circle radii, and to prove geometric properties using coordinates.

Definition

The distance formula defines the Euclidean metric on $\mathbb{R}^2$: $d(p, q) = |p - q| = \sqrt{\sum (p_i - q_i)^2}$. This metric satisfies positivity, symmetry, and the triangle inequality, making $\mathbb{R}^2$ a metric space. In $n$ dimensions, $d(p, q) = \sqrt{\sum_{i=1}^{n} (p_i - q_i)^2}$.

Example

Alternative metrics on $\mathbb{R}^2$ include the taxicab (Manhattan) metric $d_1(p,q) = |x_2-x_1| + |y_2-y_1|$ and the Chebyshev metric $d_\infty(p,q) = \max(|x_2-x_1|, |y_2-y_1|)$. These define different "unit circles": a Euclidean circle, a taxicab diamond, and a Chebyshev square.

Key Insight

Metric spaces generalize the distance formula to abstract settings. Cauchy sequences, completeness, and continuity are all defined in terms of metrics, making the distance formula the concrete starting point for functional analysis and topology.