Why is the projection map $\mathbb{A}^{n+1}_k\setminus \{0\} \to \mathbb{P}^n_k$ a morphism of schemes? More specifically, I am trying to solve the problem in Ravi Vakil's notes:

Make sense of the following sentence: "The map $$\mathbb{A}^{n+1}_k \setminus \{0\} \rightarrow \mathbb{P}^n_k$$ given by $$(x_0,x_1,..x_n) \rightarrow [x_0,x_1,..,x_n]$$ is a morphism of schemes." Caution: you can’t just say where points go; you have
to say where functions go. So you may have to divide these up into affines, and describe the maps, and check that they glue.

I understand why this works on a very technical level, essentially it seems to be because this diagram commutes (which is mostly because a map of affine schemes is given by its map of global sections):

However, in this answer to the same problem, Michael Joyce argues that there is no need to check gluing because the map is globally defined. So my question is:
Is this map globally defined on points or on functions? If it is globally defined on points, then what makes this example different from the different maps of schemes $Spec(\mathbb{C}) \to Spec(\mathbb{C})$ given by the identity and conjugation maps $\mathbb{C} \to \mathbb{C}$, which are different maps but agree on points? If the map is defined on functions, then why does it seem like the arrow is going in the wrong direction?
 A: Question: "I understand why this works on a very technical level, essentially it seems to be because this diagram commutes (which is mostly because a map of affine schemes is given by its map of global sections):
$$\text{  }$$
If the map is defined on functions, then why does it seem like the arrow is going in the wrong direction?"
Answer:
A "set theoretic" map: For simplicity let us study the projective line and the map
$$\pi: S:=\mathbb{A}^2_k-\{(0,0)\}\rightarrow C:=\mathbb{P}^1_k$$
defined "pointwise" by $\pi(a,b):=(a:b) \in C$. if $\lambda \in k^*$ it follows $\pi(\lambda a, \lambda b):=(\lambda a: \lambda b)=(a:b)$. There is a "set theoretic"  action of $k^*$ on $S$ and $\pi(\lambda p)=\pi(p)$.
A "scheme map": We want to define a surjective map of schemes $\pi: S \rightarrow C$, using an open cover.
Let $C$ have homogeneous coordinates $x_0,x_1$ and let $S:=Spec(k[x,y])-\{(0,0)\}$.
Let $D(x_0):=Spec(k[x_1/x_0])$ and let $D(x_1):=Spec(k[x_0/x_1])$. Define the maps
$$\phi_0:k[x_0/x_1] \rightarrow k[x,y,1/y]$$
by $\phi_0(x_0/x_1):= x/y$ and define
$$\phi_1:k[x_1/x_0] \rightarrow k[x,1/x,y]$$
by $\phi_1(x_1/x_0):=y/x$. There is a well defined induced map
$$\rho:k[x_0/x_1,x_1/x_0] \rightarrow k[x,1/x,y,1/y]$$
since $1=(x_0/x_1)(x_1/x_0) \rightarrow (x/y)(y/x).$ You get
$$1=\rho(1)=\rho((x_0/x_1)(x_1/x_0))=(x/y)(y/x)=1$$
hence the induced map $\rho$ is well defined: The maps $\phi_0,\phi_1$ glue.
Example: The "scheme maps" induced by $\phi_0,\phi_1$ are (at the level of $k$-rational points) as follows:
$$\phi_0^*(a,b):= a/b$$
and
$$\phi_1^*(a,b):=b/a.$$
Here $\mathfrak{m}:=(x-a,y-b) \subseteq k[x,y]$ is a $k$-rational point with $(a,b) (\neq (0,0)) \in k^2$. Equivalently, at the level of maximal ideals you get
$$\phi_0^{-1}(x-a,y-b)=(x_1/x_0-a/b)$$
and
$$\phi_1^{-1}(x-a,y-b)=(x_0/x_1-b/a).$$
Hence the maps $Spec(k[x,y,1/y])\rightarrow D(x_1)$ and $Spec(k[x,1/x,y]) \rightarrow D(x_0)$ glue to a "global" surjective  map of schemes $\pi: S \rightarrow C$. The map $\pi$ has the property that
$$\pi^{-1}(D(x_i)) \cong Spec(k[t,1/t]) \times_k \mathbb{A}^1_k \cong GL(1,k)\times_k \mathbb{A}^1_k,$$
for $i=0,1$. The map $\pi^{-1}(D(x_i)) \rightarrow D(x_i) \cong \mathbb{A}^1_k$ is the projection map. Hence $\{D(x_i)\}$ is a trivialization of $\pi$ in the Zariski topology. The map $\pi$ is a "principal $GL(1,k)$-bundle" on $C$. The group scheme $GL(1,k):=Spec([t,1/t])$ has as $k$-rational points $k^*$ - the multiplicative group of non-zero elements in $k$.
Note: There is a well defined action
$$\sigma: GL(1,k) \times_k S \rightarrow S$$
and an isomorphism $S/GL(1,k) \cong C$. Hence you may view the projective line $C$ as the "geometric quotient" (in the sense of Mumford) of $S$ by $GL(1,k)$.
Example: Projective space: This construction generalize. Let $X:=\mathbb{A}^{n+1}_k-\{(0,..,0)\}$ and define similarly a map
$$\gamma: X \rightarrow Y:=\mathbb{P}^n_k.$$
Let $D(x_i) \subseteq Y$ be the "standard" open affine cover of $Y$. It follows
$$\pi_i: \pi^{-1}(D(x_i)) \cong GL(1,k)\times_k D(x_i) \rightarrow D(x_i)$$
is the projection map onto $D(x_i)$. There is an action
$$\sigma: GL(1,k)\times_k X \rightarrow X$$
and an isomorphism $X/GL(1,k) \cong Y$. Hence $Y:=\mathbb{P}^n_k$ is the "geometric quotient" of $X$ by $GL(1,k)$. $Y$ is a principal $GL(1,k)$-bundle and $D(x_i)$ is a local trivialization of $\pi$.
Note: If you wish to study this topic you should - as an exercise - generalize the above construction to projective space of any dimension: Write down explicit formulas for the maps of rings and prove that they glue to give a global map of schemes.
Your comment: "...there is no need to check gluing because the map is globally defined. So my question is: Is this map globally defined on points or on functions? "
The problem is that $X$ is a non-affine scheme, and to construct a map you must define it locally and prove it glues to a global map. If $U:=Spec(B), V:=Spec(A)$ it follows
$$F1.\text{  }Hom_{Sch}(U,V) \cong Hom_{rings}(A,B).$$
Hence for affine schemes you define a map $\phi: U \rightarrow V$ via  a map $f: A\rightarrow B$. Since $X$ above is non-affine you use formula $F1$ locally and define maps locally. To get a well defined global map of schemes you must prove that these locally defined maps glue (agree on intersections).
It seems to me this is what is "explained" on the photo, but there are no explicit formulas. Above I give such formulas for the projective line.
Example: More generally you may for $X:=\mathbb{A}^{n+1}_k -\{(0)\}$ construct a left $G:=GL(1,k)$-action $\sigma_a$ on $X$ which "pointwise" is the action (let $a:=(a_0,..,a_n)\in \mathbb{Z}^{n+1}$)
$$\sigma_a(\alpha,(x_0,..,x_n)):=(\alpha^{a_0}x_0,..,\alpha^{a_n}x_n)$$
and you may ask for a construction of the quotient $X/G$. This is how weighted projective space is constructed. The canonical map $\pi: X \rightarrow X/G:=\mathbb{P}(a_0,..,a_n)$ is a principal $G$-bundle. If $a_i=1$ for all $i$ you get projective space. You may also construct multi projective space as an "algebraic stack" (a stack quotient) using this construction.
Note: The map $\pi: X:=\mathbb{A}^{n+1}_k-\{(0)\} \rightarrow \mathbb{P}^n_k$ is a map of schemes and you get canonically an induced map of functors of points
$$ h_{\pi}:h_X \rightarrow h_{\mathbb{P}^n_k},$$
and the functor $h_{\mathbb{P}^n_k}$ may be defined as "a functor parametrizing line bundle quotients". You may also try to construct $h_{\pi}$
using this language, but the above construction is "more elementary" and "direct".
A: I think what Joyce is saying is just that the morphism glues because it is defined "globally"(it is just intuition you have to check algebraically that the morphism glues but it's easy) but there is a more conceptual way to look at this exercise:
you can describe the functor of points of $P^n$: giving a morphism from a scheme $X$ to $P^n$ is the same as giving an invertible sheaf $\lambda$ on $X$ and global section $s_1,...,s_n$ of $\lambda$ such that for every point $x\in X$ for at least one $i$ we have $s_i(x)\not=0$. in your example $X=A^n-\{0\}$ and $\lambda=O_X$.
the proof of this general statement is a direct generalisation of your proof for the special case of $A^n-\{0\}$ and for example you can find it in the Hartshorne or Gortz book(maybe even in vakil) but my point is that you can do the general case once and after that you can globally defined this maps
