Distance formula

Draw a right triangle whose hypotenuse is the segment joining the two points. The horizontal and vertical differences between the points are the two legs, so the Pythagorean theorem gives the hypotenuse, which is the distance between the points.

Chalcack concept card · Reviewed by the Chalcack team ·

A horizontal change of 3 and a vertical change of 4 make a right triangle whose hypotenuse, the distance, is 5.

Formulas

  • distance=(horizontal change)2+(vertical change)2\text{distance} = \sqrt{(\text{horizontal change})^2 + (\text{vertical change})^2}
  • For A(x1,y1), B(x2,y2)A(x_1, y_1),\ B(x_2, y_2): AB=(x2−x1)2+(y2−y1)2AB = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

When to use it

Use it when you have the coordinates of two points and need the distance between them (the length of the segment).

Worked example

Find the distance between A(1,2)A(1, 2) and B(4,6)B(4, 6). The horizontal change is 4−1=34 - 1 = 3 and the vertical change is 6−2=46 - 2 = 4. So the distance is 32+42=9+16=25=5\sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5.

Common mistake

A common mistake is just adding the two changes to get 3+4=73 + 4 = 7. Square each one, add them, and then take the square root.

Related concepts

All 181 math concepts