TITLE: Global sections of $\mathcal{O}(-1)$ and $\mathcal{O}(1)$, understanding structure sheaves and twisting.
QUESTION [48 upvotes]: In chapter 2 section 7 (pg 151) of Hartshorne's algebraic geometry there is an example given that talks about automorphisms of $\mathbb{P}_k^n$. In that example Hartshorne states that $\mathcal{O}(-1)$ has no global sections. However, we know that $\mathcal{O}(1)$ is generated by global sections. This is stated at the first of the section that if $\mathbb{P}_k^n = \operatorname{Proj} k[x_0,...,x_n]$ then the $x_0,...,x_n$ give rise to global sections $x_0,...,x_n\in\Gamma(\mathbb{P}_k^n,\mathcal{O}(1))$.
I guess I don't understand this twisted structure sheaf very well, or to be honest I don't think I understand structure sheaves in general as well as I would like. The twisting part seems simple at first- you shift the grading of Proj over and then take the structure sheaf.  Admittedly I don't feel comfortable using the structure sheaf other than using the basic facts about it that Hartshorne gives when it is introduced. If anyone could give some insight as to what's going on here or how I might be able to understand this better it would be much appreciated.
Thanks.

REPLY [16 votes]: $\mathcal{O}(m)$ is the bundle which is trivial on the usual open cover of $\mathbb{P}_k^n$, and with the transitional morphisms between $U_{i_1}$ and $U_{i_2}$ given by $f \to f \times (x_{i_1}/x_{i_2})^m$.
A global section of $\mathcal{O}(m)$ is the data of a family of polynomials, one polynomial $P_i \in k[x_0 / x_i \ldots x_n / x_i] = \Gamma(\mathcal{O}(m),U_i) = \Gamma(\mathcal{O}_{\mathbb{P}_k^n},U_i)$ for each of those open sets, satisfying the relations $P_{i_1}(x_0 / x_{i_1} \ldots x_n / x_{i_1}) \times (x_{i_1}/x_{i_2})^m = P_{i_2}(x_0 / x_{i_2} \ldots x_n / x_{i_2}) $.
So, $P_i(x_0 / x_i \ldots x_n/ x_i) \times x_i^m$ seems to be some rational function $f \in k(x_1 \ldots x_n)$ independant of $i$, with the condition that $f(x_0 \ldots x_n)/x_i^m \in k [x_0/x_i \ldots x_n/x_i]$. This implies that the denominator of $f$ must be a power of $x_i$, for all $i$. Thus $f$ has to be a polynomial in $k[x_0 \ldots x_n]$
Now, when $m \ge 0$, the conditions $f / x_i^m \in k [x_0/x_i \ldots x_n/x_i]$ can only be realised when $f$ is a homogeneous degree $m$ polynomial in $k[x_0 \ldots x_n]$, and this gives a bijective correspondence between homogeneous degree $m$ polynomial and the global sections of $\mathcal{O}(m)$.
When $m < 0$, it is not possible to find a polynomial $f$ satisfying those conditions, so there is no global section of $\mathcal{O}(m)$