The ring of global sections of the disjoint union (coproduct) is the product of the rings of global sections of the individual schemes:
$$\bigcup^{\text{disjoint}}_{1\le i\le n} \text{Spec } R_i=\text{Spec }( R_1\times R_2\times \cdots\times R_n).$$
To explain this in more detail: Let $e_j$ be the element of $\hat R:=R_1\times\cdots\times R_n$ with $1$ in the $j$th position and $0$ elsewhere. Then, if $i\ne j$, any prime ideal $\hat P$ in $\hat R$ contains $e_i e_j=0$, so it contains either $e_i$ or $e_j$. Doing this for all pairs $\{i,j\}$ shows you that $\hat P$ must contain all of the $e_i$s except one, so it is of the form $R_1\times\cdots\times R_{i-1}\times P_i\times R_{i+1}\times\cdots\times R_n$, for some prime ideal $P_i$ of $R_i$. This shows that there is a natural correspondence between the points of $\text{Spec } \hat R$ and those of the disjoint union. Now, let $f_1\in R_1$, $\dots$, $f_n\in R_n$. Then
the distinguished open set $D_{(f_1,\ldots,f_n)}$ of $\text{Spec } \hat R$ satisfies
\begin{eqnarray*}
D_{(f_1,\ldots,f_n)}&=&\{\hat P \subseteq \hat R\mid \hat P \text{ prime}, (f_1,\ldots,f_n)\notin \hat P\}\\
&=& \bigcup_{1\le i\le n} \{R_1\times\cdots\times P_i\times \cdots\times R_n\mid P_i \text{ prime}, f_i\notin P_i\}.
\end{eqnarray*}
Since these sets are a basis for the topology, if you then set
$$
U_i:=D_{(0,\ldots,0,1,0,\ldots,0)}, \qquad i=1, \dots, n, \ \ \ \text{1 is at the }i\text{th position}
$$
this shows that
$$
\text{Spec } \hat R = U_1\cup\cdots\cup U_n
$$
is a partition of the topological space of $\text{Spec } \hat R$ into $n$ disjoint clopen sets, and that the subset topology on each $U_i$ is
identical with that of $\text{Spec } R_i$. Therefore, $\text{Spec } \hat R$ is the coproduct of the $\text{Spec } R_i$s in the
category of topological spaces.
There is an isomorphism of localizations
$${\hat R}_{(f_1,\ldots,f_n)} \cong (R_1)_{f_1}\times\cdots\times (R_n)_{f_n}
$$
for which the square
$$
\begin{array}{ccc}
{\hat R}_{(f_1,\ldots,f_n)}&\cong&(R_1)_{f_1}\times\cdots\times(R_n)_{f_n}\\
\downarrow&\ &\downarrow\\
{\hat R}_{(g_1,\ldots,g_n)}&\cong&(R_1)_{g_1}\times\cdots\times(R_n)_{g_n}
\end{array}$$
$$
(g_1 \in \sqrt{(f_1)}, \ \dots, \ g_n \in \sqrt{(f_n)})
$$
commutes. Since the structure sheaf of an affine scheme is assembled from these localizations, this can be used to
show that there is an isomorphism
$$
{\cal O}_{\text{Spec } \hat R}(U)\cong \prod_i {\cal O}_{\text{Spec } R_i} (\alpha_i^{-1}(U))
$$
for all open sets $U\subseteq \text{Spec } \hat R$, where the map $\alpha_i: \text{Spec } R_i\to U_i$ is the map of topological spaces which sends $\text{Spec } R_i$ onto its homeomorphic image inside $\text{Spec } \hat R$. Also, if $V\subseteq U$, the diagram
$$
\begin{array}{ccc}
{\cal O}_{\text{Spec } \hat R}(U)&\cong&\prod_i {\cal O}_{\text{Spec } R_i} (\alpha_i^{-1}(U))\\
\downarrow{}&&\downarrow{}\\
{\cal O}_{\text{Spec } \hat R}(V)&\cong&\prod_i {\cal O}_{\text{Spec } R_i} (\alpha_i^{-1}(V))
\end{array}
$$
commutes. This means that the stalk at each point in each $\text{Spec } R_i$ is isomorphic to the stalk at its image
in $\text{Spec } \hat R$.
For each $i=1$, $\dots$, $n$, there is a morphism $\gamma_i: \text{Spec } R_i\to \text{Spec } \hat R$ which comes from the ring homomorphism projecting $\hat R$ onto $R_i$. To show that $\text{Spec } \hat R$ is the coproduct of the $\text{Spec } R_i$s in the category of schemes, you need to show that for any scheme $Z$ and morphisms $\psi_i: \text{Spec } R_i \to Z$, there is a unique morphism $\psi: \text{Spec } \hat R\to Z$ such that $\psi \circ \gamma_i=\psi_i$ for all $i$. Since $\text{Spec } \hat R$ is the disjoint union of the $\text{Spec } R_i$s as topological spaces, the action of $\psi$ on the topology is determined by letting it act as $\psi_i$ on the copy $U_i$ of $\text{Spec } R_i$ in $\text{Spec } \hat R$.
Now for any open set $W$ in $Z$, the morphisms $\psi_i$ give you ring homomorphisms from ${\cal O}_Z(W)$ to ${\cal O}_{\text{Spec } R_i}(\psi_i^{-1}(W))$.
Using the isomorphism between
$\prod_i {\cal O}_{\text{Spec } R_i}(\psi_i^{-1}(W))$
and ${\cal O}_{\text{Spec } \hat R}(\psi^{-1}(W))$, these can be assembled
into a ring homomorphism from ${\cal O}_Z(W)$ to ${\cal O}_{\text{Spec } \hat R}( \psi^{-1}(W))$. This produces the desired morphism $\psi$.
$\newcommand{\Spec}{\mathrm{Spec}}$Let $X$ be a scheme over $k$. Note that $X_{\overline{k}}=X\times_{\mathrm{Spec}(k)}\mathrm{Spec}(\overline{k})$. So, to give a morphism $X_{\overline{k}}\to X_{\overline{k}}$ it suffices to give maps of $k$-schemes $X\to X$ and $\mathrm{Spec}(\overline{k})\to\mathrm{Spec}(\overline{k})$. If $\sigma\in\mathrm{Gal}(\overline{k}/k)$ then declare that the action of $\sigma$ on $X$ is trivial and that the action of $\sigma$ on $\mathrm{Spec}(\overline{k})$ is the one induced from the $k$-algebra map $\overline{k}\to\overline{k}$. The induced map $X_{\overline{k}}\to X_{\overline{k}}$ is the map $\sigma$. Since it's a map of schemes, it's also a map of topological space (read the remark at the end of the post to see a different convention).
If $X=\mathrm{Spec}(A)$ then $X_{\overline{k}}=\mathrm{Spec}(A\times_k \overline{k})$ and $\sigma$ is the map of schemes $X_{\overline{k}}\to X_{\overline{k}}$ corresponding to the ring map $A\otimes_k \overline{k}\to A\otimes_k \overline{k}$ given by $a\otimes \alpha\mapsto a\otimes \sigma(\alpha)$. Covering $X$ by affines with $k$-rational gluing data allows you to bootstrap this concrete understanding of the map to the general case.
How does this relate to the action on $X(\overline{k})$? Note that
$$X(\overline{k})=\mathrm{Hom}_k(\mathrm{Spec}(\overline{k}),X)=\mathrm{Hom}_{\mathrm{Spec}(\overline{k})}(\mathrm{Spec}(\overline{k}),X\times_{\mathrm{Spec}(k)}\mathrm{Spec}(\overline{k}))$$
The action on the first presentation of $X(\overline{k})$ is to take $x:\Spec(\overline{k})\to X$ and then $\sigma(x)$ is defined to be the composition
$$\mathrm{Spec}(\overline{k})\xrightarrow{\sigma}\Spec(\overline{k})\xrightarrow{x}X$$
where, again, the first map $\sigma$ is that induced by the ring map $\sigma:\overline{k}\to\overline{k}$. What is the action then on the second presentation of $X(\overline{k})$? It can't clearly be the same idea that for $y:\Spec(\overline{k})\to X\times_{\Spec(k)}\Spec(\overline{k})$ we just precompose by $\sigma$ since that won't be a morphism over $\Spec(\overline{k})$. What's true is that $\sigma(y)$ is the composition
$$\Spec(\overline{k})\xrightarrow{\sigma}\Spec(\overline{k})\xrightarrow{y}X\times_{\Spec(k)}\Spec(\overline{k})\xrightarrow{\sigma^{-1}}X\times_{\Spec(k)}\Spec(\overline{k})\qquad (1)$$
To convince ourselves of this, we need to remind ourselves how the identification
$$\mathrm{Hom}_k(\mathrm{Spec}(\overline{k}),X)=\mathrm{Hom}_{\mathrm{Spec}(\overline{k})}(\mathrm{Spec}(\overline{k}),X\times_{\mathrm{Spec}(k)}\mathrm{Spec}(\overline{k}))$$
works. It takes an $x:\Spec(\overline{k})\to X$ and maps to $y:\Spec(\overline{k})\to X\times_{\Spec(k)}\Spec(\overline{k})$ which, written in coordinates, is the map $(x,\mathrm{id})$. So, we see that $\sigma(y)$ should just be $(x\circ\sigma,1)$. Let's now think about the composition in $(1)$ looks like when written in coordinates. The projection to $X$ is the composition
$$\Spec(\overline{k})\xrightarrow{\sigma}\Spec(\overline{k})\xrightarrow{(x,1)}X\times_{\Spec(k)}\Spec(\overline{k})\xrightarrow{\sigma^{-1}}X\times_{\Spec(k)}\Spec(\overline{k})\xrightarrow{p_1}X$$
Since $p_1\circ\sigma^{-1}$ is just the identity map we see that we get $x\circ\sigma$. What happens we do the second projection? We are looking at the composition
$$\Spec(\overline{k})\xrightarrow{\sigma}\Spec(\overline{k})\xrightarrow{(x,1)}X\times_{\Spec(k)}\Spec(\overline{k})\xrightarrow{\sigma^{-1}}X\times_{\Spec(k)}\Spec(\overline{k})\xrightarrow{p_2}\Spec(\overline{k})$$
which gives us $\sigma^{-1}\circ \sigma=1$. Thus, we see that the composition in $(1)$ is $(x\circ\sigma,1)$ as desired!
Let's do a concrete example. Let's take $X=\mathbb{A}^1_k$. Then, the map $\sigma:X_{\overline{k}}\to X_{\overline{k}}$ is the map corresponding to the ring map $\overline{k}[x]\to \overline{k}[x]$ defined by sending
$$\sum_i a_i x^i\mapsto \sum_i \sigma(a_i)x^i$$
The points of $X_{\overline{k}}$ come in two forms:
- The closed ideals $(x-\alpha)$ for $\alpha\in k$.
- The generic point $(0)$.
It's then clear that $\sigma$ sends $(x-\alpha)$ to $(x-\sigma^{-1}(\alpha))$ (recall that the induced map on $\Spec$ is by pullback! See the remark below) and sends the generic point to itself. That's what it looks like topologically. Let's think about what the action of $\sigma$ looks like on $\overline{k}$-points.
If we take an $\overline{k}$-point corresponding to the map (thinking of $X(\overline{k})$ as $\mathrm{Hom}_k(\Spec(\overline{k}),X)$)
$$x:k[x]\to \overline{k}:p(x)\mapsto p(\alpha)$$
then $\sigma(x)$, on the level of ring maps, is apply $\sigma$ as a poscomposition:
$$\sigma(x):k[x]\to \overline{k}:p(x)\mapsto \sigma(p(\alpha))=p(\sigma(\alpha)$$
where last commutation was because $p(x)\in k[x]$. Let's now think about the same situation in the second presentation $X(\overline{k})=\mathrm{Hom}_{\overline{k}}(\Spec(\overline{k})),X\times_{\Spec(k)}\Spec(\overline{k}))$. Our point $x$ above now corresponds to ring $\overline{k}$-algebra map
$$\overline{k}[x]\to \overline{k}:q(x)\mapsto q(\alpha)$$
If we just postcompose this ring map with $\sigma$ we get
$$\overline{k}[x]\to \overline{k}:q(x)\mapsto \sigma(q(\alpha))$$
which is NOT the desired map sending $q(x)\mapsto q(\sigma(\alpha))$ since $q$ doesn't have rational coefficients. But, if we apply the map $\sigma_X^{-1}$ (where I'm using the subscript $X$ to not confuse it with $\sigma$ on $\overline{k}$) on $X_{\overline{k}}$ this has the effect of applying $\sigma^{-1}$ to the coefficients of $q(x)$. So then, you can see that
$$\sigma(\sigma_X^{-1}(q)(\alpha))=q(\sigma(\alpha))$$
yay!
Hopefully this all makes sense.
NB: Depending on the author one can take the action on $X\times_{\Spec(k)}\Spec(\overline{k})$ to be what I have called $\sigma^{-1}$. This has a couple nice effects:
- It's action geometrically is more intuitive (e.g. instead of sending $(x-\alpha)$ to $(x-\sigma^{-1}(\alpha))$ it sends $(x-\alpha)$ to $(x-\sigma(\alpha))$).
- It's a left action (opposed to a right action).
- In $(1)$ above the inclusion of $\sigma^{-1}$ on $X_{\overline{k}}$ might be jarring, and so if we use this alternative convention we'd just have $\sigma$. I actually like it the way it is because it reminds me of representation theory where if $V$ and $W$ are representations of some $G$ then $\mathrm{Hom}(V,W)$ is a representation of $G$ by $(g\cdot f)(v)=g(f(g^{-1}(v))$.
It's one downside is that ring theoretically it's less natural since then its action on $a\otimes\alpha\in A\otimes_k\overline{k}$ is $a\otimes\sigma^{-1}(\alpha)$. Either convention is OK--nothing changes theory wise--it's just something you have to pay attention/be consistent about.
Best Answer
Just to clarify, the real subtle point here is the following. For a $k$-scheme $X$ let us denote by $|X|$ the underlying topological space. Then, the behind-the-scenes complication here is that $|X\times_k X|\ne |X|\times |X|$. In fact, there is a continuous surjection $|X\times_k X|\to |X|\times |X|$ which is, in general, not an isomorphism (exercise!).
So, if we have a map $\phi:G\times_k G\to G$ and we have $(g,h)\in |G|$ there is no way to make sense of $\phi(g,h)$--one would have to try and lift them to $|G\times_k G|$ and apply $\phi$ there, but this is not well-defined (exercise!).
To convince yourself of why this is not so weird, consider $G=\mathrm{GL}_2$. Note then that we have that $H=\mathrm{SL}_2$ is a closed subscheme of $G$. Let $\eta$ denote the genric point of $G$ and $\eta'$ the generic point of $H$. Then, we have that $k(\eta)=k(x,y,z,w)$ and $k(\eta')=\mathrm{Frac}(k[x,y,z,w]/(xy-zw-1))$. The maps $ \mathrm{Spec}(k(\eta))\hookrightarrow G$ and $\mathrm{Spec}(k(\eta'))\hookrightarrow G$ correspond to the matrices $\begin{pmatrix}x & y\\ z & w\end{pmatrix}$ interpreted in $k(\eta)$ and $k(\eta')$ respectively. How do you 'multiply' those?
The point though is that while $|G\times_k G|\ne |G|\times |G|$ for every $k$-scheme $S$ we have that $(G\times_k G)(S)=G(S)\times G(S)$. Thus, for every $k$-scheme $S$ the map $\phi:(G\times_k G)(S)\to G(S)$ is a map $G(S)\times G(S)\to G(S)$ which is actually the multiplication for a group structure on $G(S)$.