Making use of an elementary fact on invariant subspace and determinant of a linear map and the method of algebraic identities, we obtain a factorization formula for a general characteristic polynomial of a matrix. This answers a question posed in [A. Deng, I. Sato, Y. Wu, Characteristic polynomials of ramified uniform covering digraphs, European J. Combin. 28 (2007) 1099-1114]. The approach of this work can be used to supply alternative proofs of several other earlier results, including some results of [Y. Teranishi, Equitable switching and spectra of graphs, Linear Algebra Appl. 359 (2003) 121-131]. (C) 2007 Elsevier Inc. All rights reserved.