  The concepts of differentiation and integration for matrices are known. As
far as each matrix is differentiable, it is not clear a priori whether a given
matrix is integrable or not. Recently some progress was obtained for
diagonalizable matrices, however general problem remained open. In this paper,
we present a full solution of the integrability problem. Namely, we provide
necessary and sufficient conditions for a given matrix to be integrable in
terms of its characteristic polynomial. Furthermore, we find necessary and
sufficient conditions for the existence of integrable and non-integrable
matrices with given geometric multiplicities of eigenvalues. Our approach
relies on properties of some special classes of polynomials, namely, Shabat
polynomials and conservative polynomials, arising in number theory and
dynamics.
