Source: https://prof-launay.org/wp-content/uploads/2018/10/4e_cours_02_pythagore.pdf