Pythagorean theorem