Example of Gluing Schemes Let $k$ be a field. $U_0 = \mathbb{A}^1_k = \operatorname{Spec}(k[T])$ and $U_1=\mathbb{A}^1_k = \operatorname{Spec}(k[S])$.
$U_{01} = D(T) = \mathbb{A}^1_k\backslash \{0\} = \operatorname{Spec}(k[T]_T)$ and
$U_{10} = D(S) = \mathbb{A}^1_k\backslash \{0\} = \operatorname{Spec}(k[S]_S)$.

Then we have two different Isomorphisms between $U_{01}$ and $U_{10}$:


*

*We glue $U_{01}$ and $U_{10}$ via the isomorphism $\varphi:U_{01}\to U_{10}$ induced by $k[S]_S\to k[T]_T$ with $S\mapsto T$.
We obtain the affine line with a double origin.

*We glue with the isomorphism $\psi: U_{01}\to U_{10}$ induced by $k[S]_S\to k[T]_T$ with $S\mapsto T^{-1}$.
We obtain the projective line, which we can imagine to be the scheme 'bowed' to a circle, where we use the extra point to glue $-\infty$ and $\infty$.


I am quite new to the whole scheme structure and the gluing. But I also have problems to see how the spectrum works here:


*

*Why is $\mathbb{A}^1_k\backslash \{0\} = \operatorname{Spec}(k[T]_T)$? I can maybe imagine how $\operatorname{Spec}(k[T]_T) = D(T)$. Is it because in $D(T)$ are the Ideals with $T$ not in it. And the localization $k[T]_T$ also contains no ideals with $T$ in it?

*My next question is, why does the gluing work as described above? I would imagine that gluing $U_0$ and $U_1$ would give a line with no origin, or even two lines with no origin... How does it happen to be the affine line with a double origin?
Also the circle is not clear to me.


I hope someone can help me understand.
All the best, Luca
 A: a) Beware that in part 2. you definitely do not glue $-\infty$ to $+\infty$.
On the contrary, the points $O_T=(T)\in U_0=\operatorname{Spec}(k[T])$ and $O_S=(S)\in U_1=\operatorname{Spec}(k[S])$ are the only points which are not glued to anything !
One of those unglued points, say $O_S$ is then sent to a point called $\infty$ in the glued scheme $\mathbb P_k^1$.
The other unglued point $O_T$ is sent to a corresponding point in $\mathbb P_k^1$ which one might call $O\in  \mathbb P_k^1$  
b) Above all, forget about circles and infinity points $+\infty, -\infty$ with signs preceding them: these are red herrings coming from the case $k=\mathbb R$ and are confusing concepts  even in that case. 
c) In the other gluing process the points $O_S$ and $O_T$ are also sent to different points $O_1$, $O_2$ in the affine point with origin doubled $\mathbb A^+_k$ (I just  made up the notation: there is no standard one).
However the algebraic structure is different: $\mathbb P_k^1$   is a so-called separatrd scheme, whereas $\mathbb A^+_k$ is not separated.
d) As to your  "My next question is, why does the gluing work as described above?", the easiest way to answer it is to notice   that the points $O_S$ and $O_T$ must be sent somewhere into the glued scheme, whatever the way you decide to do the gluing.
So that it is out of the question that you obtain one or two lines without the origin.
