Mathwords logoMathwords

Distance Between Two Points — Definition, Formula & Examples

The distance between two points is the length of the straight line segment connecting them on a coordinate plane. You calculate it using the coordinates of both points and a formula derived from the Pythagorean theorem.

Given two points P1(x1,y1)P_1(x_1, y_1) and P2(x2,y2)P_2(x_2, y_2) in the Cartesian plane, the distance dd between them is defined as d=(x2x1)2+(y2y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}. This metric corresponds to the Euclidean norm of the vector from P1P_1 to P2P_2.

Key Formula

d=(x2x1)2+(y2y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Where:
  • dd = Distance between the two points
  • (x1,y1)(x_1, y_1) = Coordinates of the first point
  • (x2,y2)(x_2, y_2) = Coordinates of the second point

How It Works

To find the distance, subtract the x-coordinates to get the horizontal change and subtract the y-coordinates to get the vertical change. Square both differences, add them together, and take the square root of the sum. This works because the horizontal and vertical changes form the two legs of a right triangle, and the distance is the hypotenuse. The order in which you subtract does not matter, since squaring eliminates any negative signs.

Worked Example

Problem: Find the distance between the points (1, 2) and (4, 6).
Find the differences: Subtract the x-coordinates and the y-coordinates.
x2x1=41=3,y2y1=62=4x_2 - x_1 = 4 - 1 = 3, \quad y_2 - y_1 = 6 - 2 = 4
Square each difference: Square the horizontal and vertical changes.
32=9,42=163^2 = 9, \quad 4^2 = 16
Add and take the square root: Sum the squares and find the square root.
d=9+16=25=5d = \sqrt{9 + 16} = \sqrt{25} = 5
Answer: The distance between (1, 2) and (4, 6) is 5 units.

Another Example

Problem: Find the distance between the points (−3, 1) and (2, −4).
Find the differences: Subtract the coordinates. The order you choose does not affect the final answer.
x2x1=2(3)=5,y2y1=41=5x_2 - x_1 = 2 - (-3) = 5, \quad y_2 - y_1 = -4 - 1 = -5
Square each difference: Squaring removes the negative sign.
52=25,(5)2=255^2 = 25, \quad (-5)^2 = 25
Add and take the square root: Combine the results under the radical.
d=25+25=50=527.07d = \sqrt{25 + 25} = \sqrt{50} = 5\sqrt{2} \approx 7.07
Answer: The distance is 525\sqrt{2}, or approximately 7.07 units.

Visualization

Why It Matters

The distance formula appears constantly in middle-school and high-school geometry, from finding side lengths of triangles to determining whether a point lies on a circle. In physics, it underlies calculations of displacement and speed. Careers in game design, navigation, and engineering all rely on computing distances between coordinates.

Common Mistakes

Mistake: Forgetting to square the differences before adding them.
Correction: Always square each difference first. Adding the raw differences and then squaring gives a wrong answer. The formula requires (x2x1)2+(y2y1)2(x_2 - x_1)^2 + (y_2 - y_1)^2 inside the radical, not (x2x1+y2y1)2(x_2 - x_1 + y_2 - y_1)^2.
Mistake: Subtracting an x-coordinate from a y-coordinate (mixing up coordinates).
Correction: Pair x with x and y with y. Compute x2x1x_2 - x_1 separately from y2y1y_2 - y_1. Mixing them gives a meaningless result.

Related Terms