The distance between (x1,y1) and (x2,y2) is (x2−x1)2+(y2−y1)2: the theorem on the triangle formed by the horizontal and vertical gaps. Whole-number solutions such as 3,4,5 and 5,12,13 are Pythagorean triples. The converse also holds: if a2+b2=c2, the angle opposite c is a right angle.