Source: https://math.unice.fr/~nivoche/pdf/Coursdiagonalisation.pdf