How to show that $\mathcal{O}(1)$ is generated by the global sections $x_1, \ldots, x_n$? On page 150 of Algebraic Geometry by Hartshorne, line 4 of paragraph 2, it is said that $\mathcal{O}(1)$ is generated by the global sections $x_1, \ldots, x_n$. How to show that $\mathcal{O}(1)$ is generated by the global sections $x_1, \ldots, x_n$?
By definition, $\mathcal{O}(1) = \widetilde{S(1)}$, $S=k[x_0, \ldots, x_n]$. Let $U_i=\{(x_0, \ldots, x_n): x_i \neq 0\}$ be the open covering of $\mathbb{P}^{n}_k$. Then $\mathcal{O}(1)(U_i)$ is the set of functions $s: U_i \to \sqcup_{p \in U_i} S(1)_{p}$ such that $s(p) \in S(1)_p$ and $s$ satisfies some properties. I think that $S(1)_n = S_{n+1}$. Therefore $S(1)_0 = S_1 = \sum_{i=0}^{n} k x_i$. But how to show that $\mathcal{O}(1)$ is generated by the global sections $x_1, \ldots, x_n$? Thank you very much.
 A: To say that $\mathcal{O}(1)$ is generated by the global sections $x_0,\ldots,x_n$ means we have a surjective morphism of $\mathcal{O}_X$-modules 
$$\mathcal{O}_X^{\oplus(n+1)} \to \mathcal{O}(1) \to 0$$
where the global section $e_i$ of $\mathcal{O}_X(X)^{\oplus( n+1)}$ maps to $x_i\in \mathcal{O}(1)(X)$. Thus it is enough to compute global sections of $\mathcal{O}(1)$. Do you know how to do this? 
The answer is: $$\mathcal{O}(1)(X) = \{\text{linear polynomials in $x_0,\ldots,x_n$}\}.$$
How to compute this
Use the standard affine open cover of $\Bbb{P}^n_k$ by $U_0,\ldots,U_n$. Recall that $\mathcal{O}(1)(U_i) = k[x_0,\ldots,x_n]_{(x_i)}$ where $(x_i)$ means the degree zero component of the localization at $\{1,x_i,x_i^2,\ldots\}$. 
Now say you had a global section $s$. What does $s_i:= s|_{U_i}$ look like? Say it is $f_i(x_0,\ldots,x_n)/x_i^{k_i}$ where $f_i$ is homogeneous of degree $k_i$. Since the polynomial ring over a field is a UFD we may assume the denominator and numerator for every $i$ have no common factor. Now what does it mean to now say
$$s_i|_{U_i \cap U_j} = s_j|_{U_i \cap U_j}?$$
Can you deduce your original $f_i$'s had to be linear? If you're confused then just do the case of $X =\Bbb{P}^1$; I have always found that very illuminating.
A: Just in case there is someone who wants to think about it in another way. (This is how I thought about it.)
The situation is the following. Let $A$ be a ring, $\mathbb{P}^n_A= \text{Proj}(S)$ with $S=A[x_0,\dots,x_n]=\bigoplus_{d\geq 0}S_d$ (standard grading) be the $n$-th projective space over $A$ and let us for short denote by $\mathscr{O}=\mathscr{O}_{\mathbb{P}^n_A}$ the structure sheaf of $\mathbb{P}^n_A$.
What is meant by "$\mathscr{O}(1)$ is generated by the global sections $\{x_i\}_i$" is that for every point $P \in \mathbb{P}^n_A$, the stalk $\mathscr{O}(1)_P$ is generated over $\mathscr{O}_P$ by the germs $\{{x_i}_P \}_i$ of the global sections at $P$. But here one has to be carefully (at least at the first attempt): the $x_i$ are not "really" global sections of the twist $\mathscr{O}(1)$. At first we have to clarify how they give rise to global sections of $\mathscr{O}(1)$.
By definition, \begin{align*} \mathscr{O}(1)=S(1)^{\sim}=(\bigoplus_{d\geq 0}S_{d+1})^{\sim}=(S_+)^{\sim}. \end{align*} Then $x_i$ gives a map \begin{align*}
 X_i \colon \mathbb{P}^n_A &\longrightarrow \coprod_{P \in \mathbb{P}^n_A} (S_+)_{(P)}, \\ P & \longmapsto \big(\frac{x_i}{1},P\big), 
 \end{align*} (here note that $\frac{x_i}{1}$ is a degree zero element in the localization $(S_+)_P$, since $x_i$ is a degree zero element in the grading of $S_+$) which is a global section of $\mathscr{O}(1)$.
Now using the natural isomorphisms \begin{align*}
 (\mathscr{O}(1))_P \cong (S_+)_{(P)} \;\;\; \text{and} \;\;\; \mathscr{O}_P \cong S_{(P)}, 
 \end{align*}
we see that it is enough to show that the elements $\frac{x_i}{1} \in (S_+)_{(P)}$ (corresponding to the germs of the $X_i$ at $P$) generate $(S_+)_{(P)}$ over $S_{(P)}$.
But $\{ x_i \}_i$ generates $S_+$ over $S$, hence we get that $\{ \frac{x_i}{1} \}_i$ generates $(S_+)_{(P)}$ over $S_{(P)}$ as desired.
