This study presents the generalization of geometric phases in density matrices. We show that the extended sub-geometric phase has an unified expression during the adiabatic or nonadiabatic process and establish the relations between them and the usual Berry or Aharonov-Anandan phases. We also demonstrate the influence of sub-geometric phases on the physical observables. Finally, the above treatment is used to investigate the geometric phase in a mixed state.