Pythagorean Theorem and the Distance Formula