In defining sheaf cohomology (say in Hartshorne), a common approach seems to be defining the cohomology functors as derived functors. Is there any conceptual reason for injective resolution to come into play? It is very confusing and awkward to me that why taking injective stuff into consideration would allow you to "extend" a left exact functor.



Sheaf cohomology and injective resolutions
Since everybody else is throwing derived categories at you, let me take another approach and give a more lowbrow explanation of how you might have come up with the idea of using injectives. I'll take for granted that you want to associate to each object (sheaf) $F$ a bunch of abelian groups $H^i(F)$ with $H^0(F)=\Gamma(F)$, and that you want a short exact sequence of objects to yield a long exact sequence in cohomology.


I also want one more assumption, which I hope you find reasonable: if $F$ is an object such that for any short exact sequence $0\to F\to G\to H\to 0$ the sequence $0\to \Gamma(F)\to \Gamma(G)\to \Gamma(H)\to 0$ is exact, then $H^{i}(F)=0$ for $i>0$. This roughly says that $H^{i}$ is zero unless it's forced to be non-zero by a long exact sequence (you might be able to run this argument only using this for $i=1$, but I'm not sure). Note that this implies that injective objects have trivial $H^{i}$ since any short exact sequence with $F$ injective splits.


Now suppose I come across an object $F$ that I'd like to compute the cohomology of. I already know that $H^{0}(F)=\Gamma(F)$, but how can I compute any higher cohomology groups? I can embed $F$ into an injective object $I^{0}$, giving me the exact sequence $0\to F\to I^{0}\to K^{1}\to 0$. The long exact sequence in cohomology gives me the exact sequence
$$0\to \Gamma(F)\to \Gamma(I^{0})\to \Gamma(K^{1})\to H^{1}(F)\to 0 = H^1(I^{0})$$


That's pretty good; it tells us that $H^{1}(F)= \Gamma(K^{1})/\mathrm{im}(\Gamma(I^{0}))$, so we've computed $H^{1}(F)$ using only global sections of some other sheaves. We'll come back to this, but let's make some other observations first.


The other thing you learn from the long exact sequence associated to the short exact sequence $0\to F\to I^{0}\to K^{1}\to 0$ is that for $i>0$, you have
$$H^{i}(I^{0}) = 0\to H^{i}(K^{1})\to H^{i+1}(F)\to 0 = H^{i+1}(I^{0})$$


This is great! It tells you that $H^{i+1}(F)=H^{i}(K^{1})$. So if you've already figured out how to compute $i$-th cohomology groups, you can compute $(i+1)$-th cohomology groups! So we can proceed by induction to calculate all the cohomology groups of $F$.


Concretely, to compute $H^{2}(F)$, you'd have to compute $H^{1}(K^{1})$. How do you do that? You choose an embedding into an injective object $I^{1}$ and consider the long exact sequence associated to the short exact sequence $0\to K^{1}\to I^{1}\to K^{2}\to 0$ and repeat the argument in the third paragraph.


Notice that when you proceed inductively, you construct the injective resolution
$$0\to F\to I^{0}\to I^{1}\to I^{2}\to\cdots$$
so that the cokernel of the map $I^{i-1}\to I^{i}$ (which is equal to the kernel of the map $I^{i}\to I^{i+1}$) is $K^{i}$. If you like, you can define $K^{0}=F$. Now by induction you get that
$$H^{i}(F) = H^{i-1}(K^{1}) = H^{i-2}(K^{2}) = \cdots = H^{1}(K^{i-1}) = \Gamma(K^{i})/\mathrm{im}(\Gamma(I^{i-1})).$$


Since $\Gamma$ is left exact and the sequence $0\to K^{i}\to I^{i}\to I^{i+1}$ is exact, you have that $\Gamma(K^{i})$ is equal to the kernel of the map $\Gamma(I^{i})\to \Gamma(I^{i+1})$. That is, we've shown that
$$H^{i}(F) = \ker[\Gamma(I^{i})\to \Gamma(I^{i+1})]/\mathrm{im}[\Gamma(I^{i-1})\to \Gamma(I^{i})].$$


Whew! That was kind of long, but we've shown that if you make a few reasonable assumptions, some easy observations, and then follow your nose, you come up with injective resolutions as a way to compute cohomology.


