- $\mathrm{im}(f) := \ker(\mathrm{cok}(f))$ and
- $\mathrm{coim}(f) := \mathrm{cok}(\ker(f)) = A/\ker(f).$
- $X \cap Y = \ker(\iota_{X} \circ \pi_{Y} : X \hookrightarrow A \twoheadrightarrow A/Y),$
This post is to start writing down some thoughts on extending results in my paper with Yifeng Huang (to be referred as CH) about Haar random matrices over $\mathbb{Z}_{p}.$
Surjection moments. One thing we have not tried in our paper is to use the following strategy, popular in the literature. For example, given an odd prime $p,$ let $\mathcal{F}_{p}$ be the set of all isomorphism classes of finite abelian $p$-groups (or equivalently finite $\mathbb{Z}_{p}$-modules). Equip a structure of the probability space on $\mathcal{F}_{p},$ with the sample space consisting of all subsets of it, with a probability measure $$\mu : \mathcal{F}_{p} \rightarrow [0, 1].$$ The statement goes, if $$\mathbb{E}_{[H] \in \mathcal{F}_{p}}(|\mathrm{Sur}(H, G)|) = 1$$ for any finite abelian $p$-group $G,$ then $\mu$ is the Cohen-Lenstra measure, meaning we have $$\mu(G) := \mu(\{[G]\}) = \dfrac{1}{|\mathrm{Aut}(G)|}\prod_{i=1}^{\infty}(1 - p^{\infty}),$$ for any finite abelian $p$-group $G.$ (A simple proof can be found in the proof of Lemma 8.2 of this paper by Ellenberg, Venkatesh, and Westerland.) Here, we used the following notations:
Surjection moments for Haar $p$-adic matrices. Now, consider the set $\mathrm{Mat}_{n}(\mathbb{Z}_{p})$ of $n \times n$ matrices over $\mathbb{Z}_{p},$ the ring of $p$-adic integers. The $p$-adic topology given by $\mathbb{Z}_{p}$ makes $\mathrm{Mat}_{n}(\mathbb{Z}_{p})$ a compact Hausdorff topological group with respect to its addition, so we can consider its Haar measure, which is a unique probability measure translation-invariant under addition. Can we compute $$\mathbb{E}_{X \in \mathrm{Mat}_{n}(\mathbb{Z}_{p})}(|\mathrm{Sur}(\mathrm{cok}(X), G)|),$$ for a given finite abelian $p$-group $G$?
We have $$\begin{align*}\mathbb{E}_{X \in \mathrm{Mat}_{n}(\mathbb{Z}_{p})}(|\mathrm{Sur}(\mathrm{cok}(X), G)|) &= \int_{X \in \mathrm{Mat}_{n}(\mathbb{Z}_{p})}|\mathrm{Sur}(\mathrm{cok}(X), G)| d\mu_{n}(X) \\ &= \int_{X \in \mathrm{Mat}_{n}(\mathbb{Z}_{p})}|\mathrm{Sur}(\mathbb{Z}_{p}^{n}/ \mathrm{im}(X), G)| d\mu_{n}(X) \\ &= \int_{X \in \mathrm{Mat}_{n}(\mathbb{Z}_{p})}\sum_{\bar{F} \in \mathrm{Sur}(\mathbb{Z}_{p}^{n}/ \mathrm{im}(X), G)}1 d\mu_{n}(X) \\ &= \int_{X \in \mathrm{Mat}_{n}(\mathbb{Z}_{p})}\sum_{F \in \mathrm{Sur}(\mathbb{Z}_{p}^{n}, G)}\boldsymbol{1}_{F(-) = 0}(X) d\mu_{n}(X) \\ &= \sum_{F \in \mathrm{Sur}(\mathbb{Z}_{p}^{n}, G)} \int_{X \in \mathrm{Mat}_{n}(\mathbb{Z}_{p})}\boldsymbol{1}_{F(-) = 0}(X) d\mu_{n}(X) \\ &= \sum_{F \in \mathrm{Sur}(\mathbb{Z}_{p}^{n}, G)} \mathrm{Prob}_{X \in \mathrm{Mat}_{n}(\mathbb{Z}_{p})}(FX = 0),\end{align*}$$
My postdoc mentor suggested me to think about some problems regarding the critical graph of a random graph, so I decided to sit down and read some basic words about this. I might write more on this if I want to store more summaries.
Critical group of a graph. When we consider a graph, we always mean a finite graph. Let $G$ be a graph with $n$ verticies. Given a vertex $v,$ the degree $\deg(v)$ is the number of paths ending at $v$ in an arbitrarily small neighborhood of $v.$ Order the vertices $v_{1}, \dots, v_{n}$ of $G.$ The diagonal matrix $D = D(G)$ of $G$ is the $n \times n$ diagonal matrix whose diagonal entries are given by $\deg(v_{1}), \dots, \deg(v_{n}).$ The adjacent matrix $A = A(G)$ of $G$ is the $n \times n$ matrix whose entries are given by defining its $(i,j)$ entry to be the number of edges between $v_{i}$ and $v_{j}.$ The Laplacian $L = L(G)$ of $G$ is defined to be $D - A.$
Convention. We will only deal with graphs whose vertices don't have self nodes. Moreover, we will assume that every pair of vertices have at max $1$ edge in between. With this convention, note that
Theorem 1. If $G$ is connected, then $\ker(L(G))$ is a cyclic group generated by $(1, 1, \dots, 1).$
Proof. Since the entries of any row of $L = L(G)$ add up to $0,$ we have $(1, 1, \dots, 1) \in \ker(L).$ Conversely, say $x = (x_{1}, \dots, x_{n}) \in \ker(L) \subset \mathbb{Z}^{n}.$ Even without connectedness hypothesis, we have $$0 = x^{T}Lx = \sum (x_{i} - x_{j})^{2},$$ where the sum is over $1 \leq i, j \leq n$ such that $v_{i}$ and $v_{j}$ are connected by an edge. Since $G$ is connected, all the distinct pairs of indices $(i, j)$ must appear in the sum, and since we work over $\mathbb{Z},$ we must have $x_{i} = x_{j}.$ Thus, we have $m := x_{1} = \cdots = x_{n},$ so $(x_{1}, \dots, x_{n}) = m (1, 1, \dots, 1) \in \mathbb{Z}(1, 1, \dots, 1),$ as desired. $\Box$
Remark. Note that if $G$ is not connected, a similar proof to Theorem 1 shows that $\ker(G)$ is generated by tuples that consist of $0$'s and $1$'s, where $1$'s are located in the coordinates corresponding to vertices that belong to each connected component.
Corollary. The rank of the cokernel $\mathrm{cok}(L(G))$ of $L(G)$ is $1$ so that $$\mathrm{cok}(L(G)) \simeq \mathbb{Z} \oplus K(G),$$ where $K(G)$ is a finite abelian group.
We call $K(G)$ (up to an isomorphism) the critical group of $G.$
A divisor of $G$ is an element of $\mathbb{Z}^{|V(G)|},$ where $V(G)$ is the set of vertices of $G.$ We write $\mathrm{Div}(G) := \mathbb{Z}^{|V(G)|}.$ Writing $n := |V(G)|,$ the degree of a divisor $D = (m_{1}, \dots, m_{n})$ is defined to be $\deg(D) := m_{1} + \cdots + m_{n}.$
Remark. It seems that the dual graph of an algebraic curve (whose vertices correspond to the irreducible components) contains quite a bit of information about the curve, which could be a motivation for studying these graph invariants for algebraic geometors. I would not try to make any analogy before I understand this story a bit better. (For example, see p.12 of this article; here, there are also graphs we do not consider in this post.)
The subgroup of divisors of degree $0$ is denoted as $\mathrm{Div}^{0}(G).$ Given a divisor $(x_{1}, \dots, x_{n})$ of $G,$ there are two kinds of chip-firing moves at each vertex $v_{i}$:
I remember that in a complex analysis course and a combinatorics course, my teachers both discussed about cross ratio. I recently realized that Vakil's notes (19.9) contains a nice exposition about this, which I choose to regurgitate here with a bit more elementary explanations.
Let us work over a field $k.$ We can identify $$\mathrm{Aut}(\mathbb{P}^{n}) = \mathrm{PGL}_{n+1}(k) = \mathrm{GL}_{n+1}(k)/k^{\times}$$ because giving an automorphism $\pi : \mathbb{P}^{n} \rightarrow \mathbb{P}^{n}$ is the same as choosing a $k$-linear automorphism of $$H^{0}(\mathbb{P}^{n}, \mathscr{O}_{\mathbb{P}^{n}}(1)) = kx_{0} + \cdots + kx_{n}$$ up to nonzero global sections of $\mathbb{P}^{n},$ which consists of precisely $k^{\times}.$ If we consider this $k$-linear automorphism as $A \in \mathrm{PGL}_{n+1}(k),$ one can check that on $\mathbb{P}^{n}(k),$ the map $\pi$ is given by $x = [x_{0} : \cdots : x_{n}] \mapsto Ax.$ Here, we note that $x$ is seen as an $(n+1) \times 1$ column vector.
One can check that given any distinct $w, x, y \in \mathbb{P}^{1}(k),$ there is precisely one $A \in \mathrm{PGL}_{2}(k)$ such that $A : (w, x, y) \mapsto (0, 1, \infty),$ where we wrote $$a = [a : 1]$$ for any $a \in k = \mathbb{A}^{1}(k)$ and $\infty = [1:0].$ Even though it is a bit convoluted-looking, one can even write down explicitly what $A$ is. (Of course, it will be only unique up to a multiple of an element in $k^{\times}.$) The exact expression is the following:
$$A = \begin{bmatrix}x_{2}(w_{1}y_{2} - y_{1}w_{2}) & -x_{1}(w_{1}y_{2} - y_{1}w_{2}) \\ -w_{2}(y_{1}x_{2} - x_{1}y_{2}) & w_{1}(y_{1}x_{2} - x_{1}y_{2})\end{bmatrix},$$
where $w = [w_{1} : w_{2}]$ and similarly for $x$ and $y.$ Given any other $k$-point $z = [z_{1} : z_{2}]$ of the projective line, the cross ratio of the four points $w, x, y, z$ is defined as $Az.$
Motivation for the nomenclature. We have 5 cases.
Case 1. Consider the case where $w, x, y, z \neq \infty$ so that we can write $w = [w : 1]$ and similarly for $x, y, z.$ Then the cross ratio of $w, x, y, z$ is precisely
$$\frac{(w -y)(z - x)}{(w - z)(y - x)}.$$
Case 2. Let $w = \infty = [1 : 0].$ Then the cross ratio is
$$\frac{z - x}{y - x}.$$
Case 3. Let $x = \infty = [1 : 0].$ Then the cross ratio is
$$\frac{w - y}{w - z}.$$
Case 4. Let $y = \infty = [1 : 0].$ Then the cross ratio is
$$\frac{x - z}{w - z}.$$
Case 5. Let $z = \infty = [1 : 0].$ Then the cross ratio is
$$\frac{w - y}{x - y}.$$
Remark. Note that the cross ratios from Case 2, 3, 4, and 5 may us think that we took each letter to infinity, but we didn't! In any case, this is great because we can just remember the expression from Case 1 as it recovers every other case.
Writing $$\lambda = \lambda(w,x,y,z) = \frac{(w -y)(z - x)}{(w - z)(y - x)}$$ to mean the cross ratio of $w, x, y, z,$ note that
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
Let $X$ be a variety over a field $k.$ Given any set-theoretic functions $f_{0}, \dots, f_{n} : X(k) \rightarrow k$ that has no common zeros, we may define a set map $X(k) \rightarrow \mathbb{P}^{n}(k)$ given by $$x \mapsto [f_{0}(x) : \cdots : f_{n}(x)].$$
Let's think about a scheme-theoretic version of this map. First, we assume that $f_{0}, \dots, f_{n}$ are elements of $H^{0}(X, \mathscr{O}_{X}).$ Note that an element $f \in H^{0}(X, \mathscr{O}_{X})$ corresponds with a $k$-scheme map $X \rightarrow \mathbb{A}^{1}$ that corresponds to the $k$-algebra map $k[t] \rightarrow H^{0}(X, \mathscr{O}_{X})$ defined by $t \mapsto f,$ so we are fixing $k$-scheme maps $f_{0}, \dots, f_{n} : X \rightarrow \mathbb{A}^{1},$ analogous to the previous situation.
A zero of $f$ is a point of $X$ that is sent to the maximal ideal $(t)$ in $\mathbb{A}^{1} = \mathrm{Spec}(k[t]).$ One can easily check that for any $x \in X,$ the following are equivalent:
Example. Consider the case when $X = \mathrm{Spec}(k[x_{1}, \dots, x_{m}])$ and $x = (x_{1} - a_{1}, \dots, x_{m} - a_{m}).$ In this case, we can observe that $x$ is a zero of $f \in k[x_{1}, \dots, x_{m}]$ if and only if $f(a_{1}, \dots, a_{m}) = 0.$
Hence, we may now require that $f_{0}, \dots, f_{n} : X \rightarrow \mathbb{A}^{1}$ have no common zeros. (The data can be thought as $f_{0}, \dots, f_{n} \in H^{0}(X, \mathscr{O}_{X})$ as well.)
Special case: $n = 1$. We first consider the case $n = 1,$ where we see how $f_{0}, f_{1} \in H^{0}(X, \mathscr{O}_{X})$ that have no common zeros may induce a $k$-scheme map $X \rightarrow \mathbb{P}^{1}.$ Due to our hypothesis, we have the following open cover: $X = X_{f_{0}} \cup X_{f_{1}},$ where $$X_{f} := \{x \in X : f \text{ does not vanish at } x\}.$$ It is important to note that (the restriction of) $f$ is invertible in $H^{0}(X_{f}, \mathscr{O}_{X})$ because for any affine open $U = \mathrm{Spec}(R) \subset X,$ we have $$X_{f} \cap U = D_{R}(f|_{U}) \simeq \mathrm{Spec}(R_{f|_{U}}).$$
We now construct two $k$-scheme maps $X_{f_{i}} \rightarrow U_{i} = \mathrm{Spec}(k[x_{0}/x_{i}, x_{1}/x_{i}])$ for $i = 0, 1$ and glue them together. For the construction for each $i,$ it is enough to construct a $k$-algebra map $k[x_{0}/x_{i}, x_{1}/x_{i}] \rightarrow H^{0}(X_{f_{i}}, \mathscr{O}_{X}).$ We do this by the following assignments:
Let $p$ be a prime and $P(t) \in \mathbb{Z}_{p}[t]$ a monic polynomial whose image in $\mathbb{F}_{p}$ modulo $p$ (which we also denote by $...