Let’s fix a ring . A module (assumed to be a left module, I suppose, but it doesn’t really matter as long as we’re consistent) is said to be projective if the functor is exact. (That is, if is a short exact sequence of -modules, then is also exact.) Dually, is said to be injective if the functor is exact.
There are various equivalent conditions for projectives and injectives. One particularly useful result is that projective modules are exactly the direct summands of free modules. Another one is that injective modules satisfy a certain extension property: A module is injective if and only if for any map and any injective map , there exists a map (not necessarily unique) so that .
Actually, we didn’t need to start with a ring at all; it would make just as much sense to allow to be an object in an arbitrary abelian category . We say that has enough projectives if for every object of , there is an epimorphism (or, a surjective map, in the case of many interesting categories) , where is projective. Dually, has enough injectives if for every object of , there is a monomorphism (or, an injective map, in the case of many interesting categories) , where is injective.
It is easy to see that the category of modules over a ring has enough projectives: if is an -module, just take the free module on all the elements of , and then quotient out by the submodule consisting of all relations in . Hence is isomorphic to a quotient of a free (and hence projective) module.
It is also true that the category of modules over a ring has enough injectives, but this is a bit trickier to prove. To begin, we note that an arbitrary product of injective objects is injective. This follows from the isomorphism . We also note (although I’m not going to prove it here) that in the category of abelian groups (or -modules), injective modules are the same as divisible modules (i.e. modules so that the maps for are all surjective).
Let’s first show that the category of abelian groups has enough injectives. The abelian group that plays the most important role here is . Let be any abelian group, and let be the product of copies of , indexed by the set . Then is injective, and there is a canonical map . We now check that is actually an injective map. To do this, pick . It is easy to find some nontrivial map . By the extension property for injective modules, this map extends to a map on all of . This is enough to show that is an injective map.
Now let’s return to the category of modules over an arbitrary ring . It can be shown that if is an injective abelian group, then has the structure of an injective -module. Now, let be an arbitrary -module. Then let be the product of copies of , indexed by the set . Then, just as before, there is a canonical injective map . This completes the proof that the category of -modules has enough injectives.