Source: http://www.math.univ-toulouse.fr/~rondep/CoursTD/polyGMM4.pdf