In category theory, the notion of a projective object generalizes the notion of a projective module. Projective objects in abelian categories are used in homological algebra. The dual notion of a projective object is that of an injective object. Definition An object in a category is projective if for any epimorphism and morphism , there is a morphism such that , i.e. the following diagram commutes: That is, every morphism factors through every epimorphism . If C is locally small, i.e., in particular is a set for any object X in C, this definition is equivalent to the condition that the hom functor (also known as corepresentable functor) preserves epimorphisms. Projective objects in abelian categories If the category C is an abelian category such as, for example, the category of abelian groups, then P is projective if and only if is an exact functor, where Ab is the category of abelian groups. An abelian category is said to have enough projectives if, for every object of , there is a projective object of and an epimorphism from P to A or, equivalently, a short exact sequence The purpose of this definition is to ensure that any object A admits a projective resolution, i.e., a (long) exact sequence where the objects are projective. Projectivity with respect to restricted classes discusses the notion of projective (and dually injective) objects relative to a so-called bicategory, which consists of a pair of subcategories of "injections" and "surjections" in the given category C. These subcategories are subject to certain formal properties including the requirement that any surjection is an epimorphism. A projective object (relative to the fixed class of surjections) is then an object P so that Hom(P, −) turns the fixed class of surjections (as opposed to all epimorphisms) into surjections of sets (in the usual sense). Properties The coproduct of two projective objects is projective. The retract of a projective object is projective. Examples The statement that all sets are projective is equivalent to the axiom of choice. The projective objects in the category of abelian groups are the free abelian groups. Let be a ring with identity. Consider the (abelian) category -Mod of left -modules. The projective objects in -Mod are precisely the projective left R-modules. Consequently, is itself a projective object in -Mod. Dually, the injective objects in -Mod are exactly the injective left R-modules. The category of left (right) -modules