  The centralizer of an endomorphism of a finite dimensional vector space is
known when the endomorphism is nonderogatory or when its minimal polynomial
splits over the field. It is also known for the real Jordan canonical form. In
this paper we characterize the centralizer of endomorphisms over arbitrary
fields for whatever minimal polynomial, and compute its dimension. The result
is obtained via generalized Jordan canonical forms (for separable and non
separable minimal polynomials). In addition, we also obtain the corresponding
generalized Weyr canonical forms and the structure of its centralizers, which
in turn allows us to compute the determinant of its elements.
