Source: https://mathematiques.lmrl.lu/Cours/Cours_5e/5e Chapitre 7 Pythagore.pdf