Distance Between Two Points — Cheat sheet

Choose “Save as PDF” in the print dialog.
On this page

The formula

∣AB∣=(x2−x1)2+(y2−y1)2|AB| = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} - Pythagoras with legs ∣x2−x1∣|x_2 - x_1| and ∣y2−y1∣|y_2 - y_1|. Subtraction order never matters.

Special cases

SituationShortcut
Distance to originx2+y2\sqrt{x^2 + y^2}
Horizontal segment (y1=y2y_1 = y_2)∥x2−x1∥\|x_2 - x_1\|
Vertical segment (x1=x2x_1 = x_2)∥y2−y1∥\|y_2 - y_1\|

Unknown coordinate procedure

Set formula equal to the given distance, square both sides, isolate the squared binomial, take ±\pm roots - expect two answers. Classic integer triangles to recognize: 3-4-5, 5-12-13, 8-15-17.