Why is the affine line with a doubled point not a separated scheme?

Let $X$ be the affine line with the origin doubled. More precisely, if we let $Z = \mathbb A^1$ and $U = \mathbb A^1 \setminus \{0\},$ then $X$ is the union of two copies of $Z$ in which the two copies of $U$ are identified in the obvious way. There are two obvious maps $Z \to X$ (corresponding to the two copies of $Z$ of which $X$ is the union), and they are distinct, but they coincide when restricted to $U$.

These two maps induce a map $Z \to X \times X$, and the above discussion shows that preimage of the diagonal is exactly equal to $U$. Since $U$ is not closed in $Z$, we conclude that the diagonal is not closed in $X\times X$. Thus $X$ is not separated.


Let $X$ be the affine line with a doubled origin. By definition, $X$ is constructed by gluing two schemes $V_1 = \text{Spec }k[t]$, $V_2 = \text{Spec }k[u]$ (which we subsequently identify with open sets of $X$) along the open set $U \subset X$ isomorphic to $\mathbb{A}^1\setminus \{0\}$ via the isomorphism $k[t, 1/t] \cong k[u, 1/u]$ defined by $t \leftrightarrow u$. The fibered product $X\times_k X$ is then covered by the open sets $V_1 \times_k V_1$, $V_2 \times_k V_2$, $V_1\times_k V_2,$ and $V_2\times_k V_1$.

Since $\mathbb{A}^1 \times_k \mathbb{A}^1 \cong \mathbb{A}^2$, we see that each of these open sets $V_i \times_k V_j$ is isomorphic to $\mathbb{A}^2$, and that $X$ is obtained from these sets by gluing appropriately. As a result, to compute the image of $\Delta_X : X \to X\times_k X$, it is enough to compute $\Delta_X(V_1)$ and $\Delta_X(V_2)$. We see that $\Delta_X(V_1)$ contains the origin in $V_1 \times_k V_1$ and $\Delta_X(V_2)$ contains the origin in $V_2 \times_k V_2$, while neither $\Delta_X(V_1)$ nor $\Delta_X(V_2)$ contains the origins in $V_1 \times_k V_2$ or $V_2 \times_k V_1$. (Indeed, by computing these fibered products locally, we see for example that $\Delta_X(V_1) \cap V_1 \times_k V_1$ is isomorphic to $\mathbb{A}^1$ sitting in the diagonal of $\mathbb{A}^1\times_k \mathbb{A}^1$, while $\Delta_X(V_1) \cap V_1 \times_k V_2$ is isomorphic to $\mathbb{A}^1 \setminus \{0\}$ sitting in the diagonal of $\mathbb{A}^1\times_k \mathbb{A}^1$.)

This is what is meant by the comment above stating that $X\times_k X$ has "four origins" while $\Delta_X(X)$ contains only two of them. From here, Matt's answer tells us that the subset $\Delta_X(X) \subset X\times_k X$ containing "two origins" is not closed in $X\times_k X$, and so $X$ is not separated over $k$.