Source: https://www.math.univ-paris13.fr/~boyer/enseignement/agreg/mat-semblable.pdf