Derived from the Pythagorean Theorem, the distance formula is used to find the distance between two points in the plane. The Pythagorean Theorem, a2+b2=c2 a 2 + b 2 = c 2 , is based on a right triangle where a and b are the lengths of the legs adjacent to the right angle, and c is the length of the hypotenuse.