An Extension of the Generalized Inverse of a Matrix