Pythagoras Theorem and Its Applications