sheaf cohomology
Sheaf cohomology measures the failure of local data to assemble into global data. Given a sheaf F on a space X, you can always take its global sections H^0(X, F), but the operation 'restrict from a cover and try to glue' is not always surjective onto the global level — there can be local sections, compatible on overlaps, that fail to come from a global one, or local solvability that does not globalize. The higher cohomology groups H^1, H^2, ... are precisely the obstructions: H^i(X, F) systematically records the i-th layer of failure to pass from local to global.
Precisely, taking global sections is a left-exact functor F -> H^0(X, F) = F(X) on the abelian category of sheaves: a short exact sequence of sheaves 0 -> F' -> F -> F'' -> 0 gives an exact sequence of global sections that need NOT be exact on the right (a global section of F'' may not lift to a global section of F). Sheaf cohomology is the derived functor that repairs this. Concretely, embed F into an injective (or flasque) resolution 0 -> F -> I^0 -> I^1 -> ..., apply global sections to get a complex I^0(X) -> I^1(X) -> ..., and define H^i(X, F) as the i-th cohomology of this complex. The fundamental output is the long exact sequence: every short exact sequence of sheaves yields ... -> H^i(X, F') -> H^i(X, F) -> H^i(X, F'') -> H^{i+1}(X, F') -> ..., the connecting maps measuring exactly the obstructions to lifting. By construction H^0 is global sections, and H^i = 0 for i > 0 when F is flasque or injective.
Sheaf cohomology is the central computational and conceptual tool of scheme theory: the cohomology of coherent sheaves on projective varieties is finite-dimensional and computable, vanishing theorems (Serre, Kodaira) control when H^i = 0, and Riemann-Roch and Serre duality are statements about these groups. It also unifies de Rham, Dolbeault, and Cech cohomology as special cases. Honest cautions. First, cohomology is genuinely a feature of the SHEAF, not just the space — different sheaves on the same X have wildly different cohomology, and the constant sheaf recovers ordinary topological cohomology while a line bundle measures something geometric. Second, the derived-functor definition is clean but uncomputable by hand; in practice one computes via Cech cohomology relative to a good cover or via resolutions, and these agree with derived-functor cohomology only under hypotheses (Cech = derived on separated schemes for quasi-coherent sheaves, or under Leray-type conditions). Third, on a general topological space the choice of injective vs flasque vs soft resolutions matters for which sheaves are acyclic, though they yield the same H^i.
On P^1 over k, the line bundle O(d) has H^0 of dimension d + 1 for d >= 0 (the homogeneous degree-d polynomials) and H^0 = 0 for d < 0; meanwhile H^1(P^1, O(d)) = 0 for d >= -1 and has dimension -d - 1 for d <= -2. The nonzero H^1 is the precise obstruction to extending certain local sections globally — the 'missing global sections' that Serre duality will pair with H^0 of a complementary bundle.
On P^1, H^1(O(d)) is nonzero exactly when d <= -2 — the obstruction Serre duality pairs with H^0.
Sheaf cohomology depends on the SHEAF, not just the space, and the derived-functor definition is not directly computable — Cech cohomology computes it only under hypotheses (e.g. quasi-coherent sheaves on separated schemes, or a Leray cover). Do not conflate the two without checking.