The Pythagorean theorem relates the areas of squares on the sides of a right triangle, where the variables stand for lengths in the triangle. An example problem shows how to use the theorem to solve for the length of the hypotenuse. The distance formula finds the distance between two points by subtracting their x- and y-coordinates, squaring the differences, adding them together, and taking the square root of the sum. An example calculates the distance between points (5,1) and (5,-6) as 7 units.