Every point in the plane is written as (x, y). The distance between A(x₁, y₁) and B(x₂, y₂) comes straight from Pythagoras: the horizontal and vertical gaps are the two legs of a right triangle and AB is the hypotenuse.
AB = √[(x₂ − x₁)² + (y₂ − y₁)²]
The distance from the origin to (x, y) is √(x² + y²). Spotting a Pythagorean triplet in the gaps often saves the square root.
Worked example 1: (1, 2) to (4, 6)
The gaps are 3 and 4, so AB = √(9 + 16) = 5.
The distance formula also tests shapes: four equal sides with equal diagonals make a square, and two pairs of equal opposite sides make a parallelogram.