Source: https://imag.umontpellier.fr/~bayen/cours/M1/opti.pdf