Distance Formula and Pythagorean Theorem