The Pythagorean theorem relates the lengths of the sides of a right triangle, where the sum of the squares of the two shorter sides equals the square of the longest side. The distance formula calculates the distance between two points by taking the square root of the sum of the differences of the x-coordinates squared and y-coordinates squared. Examples are provided to demonstrate both the Pythagorean theorem and distance formula.