The Distance Formula

Formula

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

Used to calculate:

The straight-line distance between two points in a two-dimensional Cartesian coordinate plane.

—

What Is the Distance Formula?

The distance formula calculates the straight-line distance between two points using their x- and y-coordinates. It is derived from the Pythagorean theorem by treating the horizontal and vertical differences between the points as the legs of a right triangle.

—

Formula and Variables

d = \sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
SymbolMeaningUnit
ddDistance between the two pointsSame length unit as the coordinates
x1x_1
x-coordinate of the first point

Length or coordinate unit
y1y_1y-coordinate of the first pointLength or coordinate unit
x2x_2
x-coordinate of the second point
Length or coordinate unit
y2y_2
y-coordinate of the second point
Length or coordinate unit

—

How to Use the Formula

Identify the coordinates of the two points as (x1x_1,Y1Y_1) and (X2X_2,y2y_2). Subtract the corresponding x-coordinates and y-coordinates, square both differences, and add the squared values. Take the nonnegative square root of the sum to find the straight-line distance between the points.

—

When Is This Formula Used?

The distance formula is used to measure the straight-line separation between two points in a two-dimensional Cartesian coordinate system.

Common uses:

– Finding the distance between two points on a coordinate plane
– Calculating lengths of line segments
– Solving coordinate geometry problems

—

Important Notes

– Distance is always nonnegative.
– The standard two-dimensional distance formula assumes a Cartesian coordinate system with perpendicular axes and compatible coordinate scales.
– The x-coordinate differences and y-coordinate differences must represent compatible length units before they are combined.
– A common point of confusion is forgetting to square both coordinate differences before adding them.

—

Alternate Forms

Alternate form:

d = \sqrt{(\Delta x)^2+(\Delta y)^2}

Alternate form:

d^2 = (x_2-x_1)^2+(y_2-y_1)^2

—

Related Formulas