Powers of a matrix and a formula for the moduli of its eigenvalues