Source: https://www.freemaths.fr/annales-mathematiques/bac-s-mathematiques-antilles-guyane-2017-specialite-corrige-exercice-5-arithmetique-et-matrices.pdf