Source: http://math.univ-lyon1.fr/irem/IMG/pdf/version_4_produit_scalaire_MG.pdf