Again, let us consider a variety $X$ over a field $k.$ (One can relax this condition about $X$ in various places throughout the discussion, but we won't bother.) Last time, we have discussed that when we have scheme maps $f_{0}, \dots, f_{n} : X \rightarrow \mathbb{A}^{1}$ that do not vanish all together at any single point in $X,$ we can induce a $k$-scheme map $$\pi := [f_{0} : \cdots : f_{n}] : X \rightarrow \mathbb{P}^{n}$$ such that when $X$ is locally of finite type over $k,$ for any $x \in X(k)$ such that $f_{0}(x), \dots, f_{n}(x) \in \mathbb{A}^{1}(k) = k,$ we have $\pi(x) = [f_{0}(x) : \cdots f_{n}(x)] \in \mathbb{P}^{n}(k).$ We also recall that defined this map by the associated $k$-algebra maps $$k[x_{0}/x_{i}, \dots, x_{n}/x_{i}] \rightarrow H^{0}(X_{f_{i}}, \mathscr{O}_{X})$$ such that $(x_{0}/x_{i}, \dots, x_{n}/x_{i}) \mapsto (f_{0}/f_{i}, \dots, f_{n}/f_{i}).$
We now classify all $k$-scheme maps $\pi : X \rightarrow \mathbb{P}^{n}.$ We can consider the standard open cover $$\mathbb{P}^{n} = U_{0} \cup U_{1} \cup \cdots \cup U_{n},$$ where $U_{i} = D_{\mathbb{P}^{n}}(x_{i}).$ Writing $X_{i} := \pi^{-1}(U_{i}),$ the map $\pi$ is given by gluing the $k$-algebra maps $k[x_{0}/x_{i}, \dots, x_{n}/x_{i}] \rightarrow H^{0}(X_{i}, \mathscr{O}_{X_{i}}),$ for $i = 0, 1, \dots, n,$ each of which is determined by where we send $x_{0}/x_{i}, \dots, x_{n}/x_{i}.$ Recall that we can identify $$\mathscr{O}_{\mathbb{P}^{n}}(1)|_{U_{i}} = \mathscr{O}_{U_{i}}$$ so that we have $$H^{0}(U_{i}, \mathscr{O}_{\mathbb{P}^{n}}(1)) = k[x_{0}/x_{i}, \dots, x_{n}/x_{i}].$$
Review on $\mathscr{O}_{\mathbb{P}^{n}}(1)$. We have transition maps $$k[x_{0}/x_{i}, \dots, x_{n}/x_{i}]_{x_{j}/x_{i}} \rightarrow k[x_{0}/x_{j}, \dots, x_{n}/x_{j}]_{x_{i}/x_{j}}$$ given by the multiplication of $x_{i}/x_{j}.$ An element $s$ of $H^{0}(\mathbb{P}^{n}, \mathscr{O}_{\mathbb{P}^{n}}(1))$ is given by $$s = (f_{i}(x_{0}/x_{i}, \dots, x_{n}/x_{i}))_{0 \leq i \leq n}$$ such that $$x_{i}f_{i}(x_{0}/x_{i}, \dots, x_{n}/x_{i}) = x_{j}f_{j}(x_{0}/x_{j}, \dots, x_{n}/x_{j})$$ for $0 \leq i, j \leq n.$ This implies that $$f_{i}(x_{0}/x_{i}, \dots, x_{n}/x_{i}) = a_{i,0}x_{0}/x_{i} + \cdots + a_{i,n}x_{n}/x_{i},$$ and $(a_{i,0}, \dots, a_{n,i}) = (a_{j,0}, \dots, a_{j,n})$ for $0 \leq i, j \leq n$ so that we can write $(a_{0}, \dots, a_{n}) = (a_{i,0}, \dots, a_{n,i})$ for $0 \leq i \leq n.$ Therefore, we have $$H^{0}(\mathbb{P}^{n}, \mathscr{O}_{\mathbb{P}^{n}}(1)) \simeq k x_{0} + \cdots + k x_{n}$$ given by $(a_{0}, \dots, a_{n}) \mapsto a_{0}x_{0} + \cdots + a_{n}x_{n},$ and we shall use the identification $$H^{0}(\mathbb{P}^{n}, \mathscr{O}_{\mathbb{P}^{n}}(1)) = k x_{0} + \cdots + k x_{n}.$$ With respect to this identification, the restriction map $$H^{0}(\mathbb{P}^{n}, \mathscr{O}_{\mathbb{P}^{n}}(1)) \rightarrow H^{0}(U_{i}, \mathscr{O}_{\mathbb{P}^{n}}(1))$$ is given by $a_{0}x_{0} + \cdots + a_{n}x_{n} \mapsto a_{0}x_{0}/x_{i} + \cdots + a_{n}x_{n}/x_{i}.$
Review on pullbacks of quasi-coherent sheaves. Let $\pi : X \rightarrow Y$ be a scheme map and $\mathscr{G}$ a quasi-coherent sheaf on $Y.$ Then the pullback $\pi^{*}\mathscr{G}$ is a quasi-coherent sheaf on $X$ and on the restriction $\mathrm{Spec}(A) \rightarrow \mathrm{Spec}(B)$ of $\pi$ on affine opens, we have $$H^{0}(\mathrm{Spec}(A), \pi^{*}\mathscr{G}) = H^{0}(\mathrm{Spec}(B), \mathscr{G}) \otimes_{B} A.$$ Given a map $\phi : \mathscr{G}_{1} \rightarrow \mathscr{G}_{2}$ of quasi-coherent sheaves on $Y,$ we have the induced map $\pi^{*}\phi : \pi^{*}\mathscr{G}_{1} \rightarrow \pi^{*}\mathscr{G}_{2}$ of quasi-coherent sheaves on $X$ such that the restriction $$H^{0}(\mathrm{Spec}(A), \pi^{*}\mathscr{G}_{1}) \rightarrow H^{0}(\mathrm{Spec}(A), \pi^{*}\mathscr{G}_{2})$$ is given by $$H^{0}(\mathrm{Spec}(B), \mathscr{G}_{1}) \otimes_{B} A \rightarrow H^{0}(\mathrm{Spec}(B), \mathscr{G}_{2}) \otimes_{B} A$$ with $s \otimes a \mapsto \phi(s) \otimes a.$
We can also have $\pi^{*} : H^{0}(Y, \mathscr{G}) \rightarrow H^{0}(X, \pi^{*}\mathscr{G})$ as follows (although this also depends on $\mathscr{G}$). Given $s \in H^{0}(Y, \mathscr{G}),$ we may consider the corresponding $\mathscr{O}_{Y} \rightarrow \mathscr{G}$, which we also call $s,$ given by $H^{0}(V, \mathscr{O}_{Y}) \rightarrow H^{0}(V, \mathscr{G})$ such that $1 \mapsto s|_{V}.$ Then we can consider its pullback $$\pi^{*}s : \mathscr{O}_{X} \simeq \pi^{*}\mathscr{O}_{Y} \rightarrow \pi^{*}\mathscr{G},$$ which corresponds to an element of $H^{0}(X, \pi^{*}\mathscr{G}).$ Restricting to the affine opens we fixed before, this gives rise to $$A \simeq B \otimes_{B} A \rightarrow H^{0}(\mathrm{Spec}(B), \mathscr{G})_{\otimes B} A = H^{0}(\mathrm{Spec}(A), \pi^{*}\mathscr{G})$$ given by $$b \otimes a \mapsto bs \otimes a.$$ Thus, the map $$\pi^{*} : H^{0}(Y, \mathscr{G}) \rightarrow H^{0}(X, \pi^{*}\mathscr{G})$$ must be given by gluing $$H^{0}(\mathrm{Spec}(B), \mathscr{G}) \rightarrow H^{0}(\mathrm{Spec}(A), \pi^{*}\mathscr{G}) = H^{0}(\mathrm{Spec}(B), \pi^{*}\mathscr{G}) \otimes_{B} A$$ defined by $s \mapsto s \otimes 1.$ In particular, for any $s \in H^{0}(Y, \mathscr{G})$ and open $V \subset Y,$ we have $\pi^{*}|_{V} : H^{0}(V, \mathscr{G}) \rightarrow H^{0}(\pi^{-1}(V), \pi^{*}\mathscr{G})$ such that $s|_{V} \mapsto \pi^{*}(s)|_{\pi^{-1}(V)}.$
Going back to the previous discussion, considering the pullback map $$\pi^{*} : H^{0}(\mathbb{P}^{n}, \mathscr{O}_{\mathbb{P}^{n}}(1)) \rightarrow H^{0}(X, \pi^{*}\mathscr{O}_{\mathbb{P}^{n}}(1)),$$ since $\mathscr{O}_{\mathbb{P}^{n}}(1)$ is locally free, one can check that $$D_{X}(\pi^{*}x_{i}) = \pi^{-1}(D_{\mathbb{P}^{n}}(x_{i})) = \pi^{-1}(U_{i}) = X_{i}.$$ The global section $s_{i} := \pi^{*}x_{i}$ does not vanish anywhere in the open subset $X_{i}$ of $X,$ so the restriction of the line bundle $\pi^{*}\mathscr{O}_{\mathbb{P}^{n}}(1)$ of $X$ on $X_{i}$ is trivial, but we will not use this trivialization yet. (We will use this later.)
Remark. What's important for us is the notion of the "inverse" of $s \in H^{0}(X, \mathscr{L})$ when $s$ is nowhere vanishing. Let $X = \bigcup_{\alpha \in I}U_{\alpha}$ be any trivializing open cover for $\mathscr{L}.$ Fix $p \in X,$ and pick any $U_{\alpha} \ni p.$ We have $\mathscr{O}_{U_{\alpha}} \simeq \mathscr{L}|_{U_{\alpha}},$ which gives $\mathscr{O}_{X,p} \simeq \mathscr{L}_{p}.$ Denote by $s'_{p}$ the element of $\mathscr{O}_{X,p}$ corresponding to $s_{p} \in \mathscr{L}_{p},$ the image of $s \in H^{0}(X, \mathscr{L}).$ We have $s_{p} \notin \mathfrak{m}_{X,p}\mathscr{L}_{p}$ (i.e., $s$ does not vanish at $p$), so $s'_{p} \in \mathfrak{m}_{X,p},$ which means that $s'_{p}$ is a unit in $\mathscr{O}_{X,p}.$ Thus, refining our trivializing open cover if necessary, we may assume that there is $w_{\alpha} \in H^{0}(U_{\alpha}, \mathscr{O}_{X})$ such that $s'|_{U_{\alpha}}w_{\alpha} = 1 \in H^{0}(U_{\alpha}, \mathscr{O}_{X}).$ These $w_{\alpha}$'s agree on the intersections of $U_{\alpha}$'s, so we may glue them to construct $w \in H^{0}(X, \mathscr{O}_{X}),$ which we refer to as the inverse of $s.$ (I am not sure whether this is a standard terminology.) Note that even though we needed a trivialization of $\mathscr{L}$ to construct this element, it does not depend on the choice of such a trivialization.
Moreover, note that any element (not necessarily nonvanishing one) of $H^{0}(X, \mathscr{L})$ has a unique corresponding element in $H^{0}(X, \mathscr{O}_{X}),$ given by gluing the ones defined on open subsets in a trivialization of $\mathscr{L}.$ (Note that this element does not depend on the choice of a trivialization.)
Going back to our discussion, now, it makes sense for us to consider the elements $s_{0}/s_{i}, \dots, s_{n}/s_{i} \in H^{0}(X_{i}, \mathscr{O}_{X}),$ namely the elements corresponding to $s_{0}|_{X_{i}}, \dots, s_{n}|_{X_{i}} \in H^{0}(X_{i}, \mathscr{O}_{\mathbb{P}^{n}}(1))$ multiplied by the inverse of $s_{i}|_{X_{i}} \in H^{0}(X_{i}, \mathscr{O}_{\mathbb{P}^{n}}(1)).$ Note that $\mathscr{O}_{\mathbb{P}^{n}}(1)|_{U_{i}} \simeq \mathscr{O}_{U_{i}},$ so $$\pi^{*}(\mathscr{O}_{\mathbb{P}^{n}}(1)|_{U_{i}}) \simeq \pi^{*}\mathscr{O}_{U_{i}} \simeq \mathscr{O}_{X_{i}}.$$ Now, the upshot is that (one can check that) the map $$H^{0}(U_{i}, \mathscr{O}_{U_{i}}) \rightarrow H^{0}(X_{i}, \mathscr{O}_{X_{i}})$$ given by $\pi : X \rightarrow \mathbb{P}^{n}$ coincides with the one corresponding to the pullback map $$H^{0}(U_{i}, \mathscr{O}_{\mathbb{P}^{n}}(1)|_{U_{i}}) \rightarrow H^{0}(X_{i}, \pi^{*}(\mathscr{O}_{\mathbb{P}^{n}}(1)|_{U_{i}})).$$ That is, such a map is given by $$(x_{0}/x_{i}, \dots, x_{n}/x_{i}) \mapsto (s_{0}/s_{i}, \dots, s_{n}/s_{i}).$$ So far, we have shown the following:
Theorem 1. Any $k$-scheme map $\pi : X \rightarrow \mathbb{P}^{n}$ is given by $k$-algebra maps $$H^{0}(U_{i}, \mathscr{O}_{\mathbb{P}^{n}}) \rightarrow H^{0}(\pi^{-1}(U_{i}), \mathscr{O}_{X})$$ such that $x_{0}/x_{i}, \dots, x_{n}/x_{i} \mapsto s_{0}/s_{i}, \dots, s_{n}/s_{i},$ where $s_{i}$ corresponds to the restriction of $\pi^{*}x_{i}$ on $\pi^{-1}(U_{i}).$
More on construction. If $\mathscr{L}$ is any line bundle on $X$ with global sections $s_{0}, s_{1}, \dots, s_{n} \in H^{0}(X, \mathscr{L})$ that do not vanish at a single point in $X$ altogether, then we have an open cover $X = X_{0} \cup \cdots \cup X_{n},$ where $X_{i} := D_{X}(s_{i}).$ Refining these open sets further and gluing back, we can construct a $k$-scheme map $\pi : X \rightarrow \mathbb{P}^{n}$ given by $$k[x_{0}/x_{i}, \dots, x_{n}/x_{i}] \rightarrow H^{0}(X_{i}, \mathscr{O}_{X})$$ such that $(x_{0}/x_{i}, \dots, x_{n}/x_{i}) \mapsto (s_{0}/s_{i}, \dots, s_{n}/s_{i})$ for $i = 0, 1, \dots, n.$
Notation. We write $\pi := [s_{0} : \cdots : s_{n}].$
Theorem 2. We have $\mathscr{L} \simeq \pi^{*}\mathscr{O}_{\mathbb{P}^{n}}(1)$ such that $s_{i} \leftrightarrow \pi^{*}x_{i}$ on $X.$
Remark. For any line bundle $\mathscr{L}$ on a scheme $X.$ If $s \in H^{0}(X, \mathscr{L})$ is nowhere vanishing, then we have $\mathscr{L} \simeq \mathscr{O}_{X}$ given as follows. Consider the map $\mathscr{O}_{X} \rightarrow \mathscr{L}$ given by $$H^{0}(U, \mathscr{O}_{X}) \rightarrow H^{0}(U, \mathscr{L})$$ such that $1 \mapsto s|_{U}.$ This defines an isomorphism of $\mathscr{O}_{X}$-modules for the following reason. Fixing any $p \in X,$ if we consider the map $\mathscr{O}_{X,p} \rightarrow \mathscr{L}_{p}$ on stalks at $p,$ it is an $\mathscr{O}_{X,p}$-linear isomorphism because $s_{p} \notin \mathfrak{m}_{X,p}\mathscr{L}_{p},$ which ensures that $s_{p}$ corresponds to a unit in the local ring $\mathscr{O}_{X,p}$ under the $\mathscr{O}_{X,p}$-linear isomorphism $\mathscr{L}_{p} \simeq \mathscr{O}_{X,p}$ given by the hypothesis that $\mathscr{L}$ is a line bundle.
Trivialization of a line bundle from its sections. Given any line bundle $\mathscr{L}$ on $X$ and $s_{0}, s_{1}, \dots, s_{n} \in H^{0}(X, \mathscr{L})$ that do not vanish altogether at any point in $X,$ the maps $\phi_{i} : \mathscr{O}_{X_{i}} \overset{\sim}{\longrightarrow} \mathscr{L}|_{X_{i}}$ given by $$H^{0}(U, \mathscr{O}_{X_{i}}) \simeq H^{0}(U, \mathscr{L}|_{X_{i}})$$ such that $1 \mapsto s_{i}|_{U}$ is a trivialization of the line bundle $\mathscr{L}.$ That is, any other trivialization of $\mathscr{L}$ is compatible with this one.
Proof of Theorem 2. We have $\phi_{i} : \mathscr{O}_{X_{i}} \overset{\sim}{\longrightarrow} \mathscr{L}|_{X_{i}}$ given by $$H^{0}(U, \mathscr{O}_{X_{i}}) \simeq H^{0}(U, \mathscr{L}|_{X_{i}})$$ such that $1 \mapsto s_{i}|_{U}.$ We can consider $\mathscr{L}$ as a line bundle defined by gluing $\mathscr{O}_{X_{i}}$'s with the transition functions $$\phi_{ij} := \phi_{j}^{-1}\phi_{i} : \mathscr{O}_{X_{ij}} \rightarrow \mathscr{L}|_{X_{ij}} \rightarrow \mathscr{O}_{X_{ij}},$$ where $X_{ij} = X_{i} \cap X_{j}.$ Note that these transition functions are given by $1 \mapsto s_{i} \mapsto s_{i}/s_{j}.$ Now, note that $\pi^{-1}(U_{i}) = D_{X}(s_{i}) = X_{i}$ and for any open $U \subset X_{i},$ we have $$H^{0}(U, \mathscr{L}) \simeq H^{0}(U, \pi^{*}\mathscr{O}_{\mathbb{P}^{n}}(1))$$ given by $s_{i} \mapsto \pi^{*}(x_{i}).$ This map takes $s_{i}/s_{j}$ to $\pi^{*}x_{i}/\pi^{*}x_{j},$ which finishes the proof. $\Box$
Reference. Hartshorne's book and Vakil's notes