A Decomposition Theorem for Matrices