Let $k$ be an algebraically closed field and $X, Y$ be quasi-projective $k$-scheme.
Let $X\_1, X\_2$ be two irreducible components of $X$ and $f\_i:X\_i \to Y$ be morphims such that $f\_1|\_{X\_1 \cap X\_2}=f\_2|\_{X\_1 \cap X\_2}$. Then, does the morphisms $f\_1$ and $f\_2$ glue to a morphism $f:X \to Y$ such that its restriction to $X\_i$ is $f\_i$?



Glue morphism of schemes defined over irreducible components
This is true in a suitable sense: if the closed subscheme $X\_i$ is given by the ideal $\mathcal I\_i$, then $X\_1 \cap X\_2$ is given by $\mathcal I\_1 + \mathcal I\_2$. In this case, it is true that
$$Y = X\_1 \underset{X\_1 \cap X\_2}\amalg X\_2,$$
where $Y \subseteq X$ is the closed subscheme given by $\mathcal I\_1 \cap \mathcal I\_2 \subseteq \mathcal O\_X$. Your assumptions imply that $|Y| = |X|$, but the scheme structures may be different. However, everything is ok as long as $\mathcal I\_1 \cap \mathcal I\_2 = 0$. See for example [Sch05, Thm. 3.4, Thm. 3.5, Cor. 3.9].


Here is an example to show what can go wrong:


**Example.** Let $X = \operatorname{Spec} k[x,y]/(x^2y^2)$, and let $I\_1 = (x)$ and $I\_2 = (y)$. This is the naive thing to do, because $I\_1$ and $I\_2$ are the minimal primes of $X$. However, $I\_1 \cap I\_2 = (xy) \neq 0 \subseteq k[x,y]/(x^2y^2)$, showing that
$$X\_1 \underset{X\_1 \cap X\_2}\amalg X\_2 \cong \operatorname{Spec} k[x,y]/(xy).$$
The natural maps $X\_1 \to X\_1 \amalg\_{X\_1 \cap X\_2} X\_2 \leftarrow X\_2$ agree on the point $X\_1 \cap X\_2 = \operatorname{Spec} k$, but they cannot come from a map $X \to X\_1 \amalg\_{X\_1 \cap X\_2} X\_2$. Indeed, suppose $\phi \colon k[x,y]/(xy) \to k[x,y]/(x^2y^2)$ is a ring map whose compositions with $k[x,y]/(x^2y^2) \to k[x], k[y]$ are the projections. Then $\phi(x)$ is congruent to $x$ modulo $y$ and to $0$ modulo $x$. Therefore,
$$\phi(x)-x \in (x) \cap (y) = (xy) \subseteq k[x,y]/(x^2y^2),$$
and similarly for $\phi(y)-y$. If $\phi(x) = x + fxy$ and $\phi(y) = y + gxy$, we need
$$(x+fxy)(y+gxy) = 0 \in k[x,y]/(x^2y^2).$$
But the $xy$ term is visibly nonzero, so $\phi$ does not exist.




---


**References.**


[Sch05] Schwede, Karl, *Gluing schemes and a scheme without closed points*. In: Kachi, Yasuyuki (ed.) et al., Recent progress in arithmetic and algebraic geometry. Proceedings of the 31st annual Barrett lecture series conference, Knoxville, TN, USA, April 25--27, 2002. Providence, RI: American Mathematical Society (AMS) (ISBN 0-8218-3401-0/pbk). Contemporary Mathematics 386, 157-172 (2005). [ZBL1216.14003](https://zbmath.org/?q=an:1216.14003). [Online version](http://www.math.utah.edu/%7Eschwede/Papers/SchemeWithoutPoints.pdf).


