An application of group theory to matrices and to ordinary differential equations