On algebraic properties of generalized inverses of matrices