Scheme: Countable union of affine lines Let $X$ be a countable union of $A_n$ ($n \in \Bbb{N}$), where $A_i$ are affine lines, i.e.,  $A_i=\operatorname{Spec}k[x]$, with $k$ algebraically closed field, such that $A_i$ meets $A_{i+1}$ in the point $0$ for $A_i$, and $1$ for  $A_{i+1}$ for all $i \in \Bbb{N}$. How to show that $X$ is a scheme?
 A: $\newcommand{\Spec}{\text{Spec }}$
Karl Schwede wrote an interesting article as an undergrad here:
http://math.stanford.edu/~vakil/files/schwede03.pdf
which you might find relevant.
Near the end he proves that if $X$ and $Y$ are schemes, and $Z$ is a closed subscheme of $X$ and $Y$, then you can glue $X$ and $Y$ along $Z$ to get a scheme. He shows that in the affine case, say $X = \Spec A$, $Y = \Spec B$, and $Z$ is the closed subscheme given by $\Spec C$, where $C \cong A/I \cong B/J$, then the gluing of $X,Y$ along $Z$ is just $\Spec A\times_C B$, where this is the fiber product of rings, given by the natural maps $A\twoheadrightarrow C \cong A/I$, and $B\twoheadrightarrow C\cong B/J$.
Intuitively, you want the functions on the gluing of $X,Y$ along $Z$ to be a function on $X$ and a function on $Y$ that agree along $Z$. This is exactly what the fiber product of rings gives you.
Category theoretically, this is because the fibered product (pullback) of rings becomes a fibered coproduct (pushout) in the category of affine schemes (since the category of rings is contravariantly equivalent to the category of affine schemes), and really any kind of glueing is just a pushout (or equivalently finite direct limit).
The infinite version of fibered coproducts or pushouts or gluings are direct limits. Since the category of rings is complete (arbitrary (inverse) limits of rings are rings), using the contravariant equivalence you get that arbitrary direct limits (ie, glueing) of affine schemes are affine schemes. In particular, they are schemes.
TLDR: You can glue arbitrarily many affine schemes (even uncountably many!) along closed subschemes and get an affine scheme.
A: Being a scheme is a local property.  Let us show that $X$ is a scheme at every point  $x_i\in A_i$.
1) If $x_i$ corresponds to an element $q\neq 0,1\in k$ or to the generic point $\eta_i$ of $A_i$ then $x_i$ has as an open affine neighbourhood $$X\setminus (A_0\cup\cdots \cup \hat A_i\cup\cdots)$$ which is isomorphic to $\operatorname {Spec}k[x_i,\frac 1 {x_i},\frac 1 {x_i-1}]$.
2) If $x_i$ is the intersection of $A_i$ and $A_{i+1}$ then $x$ has  as an open affine neighbourhood $$X\setminus (A_0\cup\cdots \cup  A_{i-1}\cup\hat A_i\cup \hat A_{i+1}\cup A_{i+2}\cup\cdots)$$ which is isomorphic to $\operatorname {Spec}k[x_i,x_{i+1},\frac 1 {x_i},\frac 1 {x_{i+1}-1}/\langle x_i\cdot (x_{i+1}-1)\rangle$.
