# Gluing two points in an affine algebraic variety

Let $$k$$ be an algebraically closed field, $$A$$ a finitely generated $$k$$-algebra. Let $$x,y$$ be two distinct closed points of $$\mathrm{Spec}(A)$$. Is there an affine $$k$$-scheme of finite type obtained from $$\mathrm{Spec}(A)$$ by "gluing $$x$$ and $$y$$"? More precisely: let $$\mathfrak{m}_x$$ and $$\mathfrak{m}_y$$ be the maximal ideals of $$A$$ corresponding to $$x$$ and $$y$$, and $$I=\mathfrak{m}_x\cap \mathfrak{m}_y$$. Define $$B$$ to be the $$k$$-subalgebra of $$A$$ generated by $$k$$ and the elements of $$I$$. Is $$B$$ a finitely generated algebra over $$k$$?

In Serre's book "Algebraic groups and class fields" he carries out the construction for smooth curves (i.e. $$A$$ normal and of dimension 1) but I don't see how to generalize this to higher dimension.

• For more general varieties, I guess this follows from the affine case if any two points lie in an affine subset (e.g., quasi-projective varieties). However otherwise it might fail; possibly some people here know counterexamples (or even it might hold that if two points belong to a common affine open subset then gluing the points does not yield a variety?). – YCor Oct 18 '19 at 20:45
• A fairly general procedure of gluing schemes along subschemes is studied in a paper of Karl Schwede: math.utah.edu/~schwede/Papers/SchemeWithoutPoints.pdf – Sándor Kovács Oct 18 '19 at 21:12
• Can you explain why Spec$B$ is obtained by gluing $x$ and $y$ on Spec$A$? I don't understand... – Sssss Nov 13 '19 at 14:04

$$B$$ is finitely generated. First notice that $$B\subset A$$ is an integral extension, since if $$f\in A$$, then $$(f-f(x))(f-f(y))\in I$$, giving you an integral equation. Then, it is easy to find a finitely generated algebra $$C\subset B$$ such that $$C\subset A$$ is integral. Then, $$A$$ is a finite $$C$$-module and thus so is $$B$$. Then, $$B$$ is finitely generated.