Diagonalizability Criterion by Geometric and Algebraic Multiplicities