# Example of a function on a locally noetherian $X$, one of the irreducible components of whose support is the union of more than one associated point

Let $X$ be a locally noetherian scheme. Ravi Vakil points out on page 167 of FOAG that

Each of the irreducible components of the support of any function on a locally Noetherian scheme is the union of the closures of some subset of the associated points.

I am having a hard time coming up with a non-trivial example where the union does not consist of only one associated point. If $X$ were just the spectrum of a ring $A$, then no irreducible component of the support of any function could be written as the union of the closures of more than one associated point. This follows because if $C$ is an irreducible component of Supp $f$ then $C$ cannot be written as a finite union of proper closed subsets, and $A$ has only finitely many irreducible components.

On the other hand, for a locally Noetherian scheme $X$, the associated points are those points $p ∈ X$ such that, on any affine open set Spec $A$ containing $p, p$ corresponds to an associated prime of $A$. This allows indeed for an irreducible component $C$ of the support of a function to be the union of the closure of more than one associated prime, since $C$ can extend pass any affine open (more precisely, there could be no affine open that contains $C$).

To come up with an example, I first thought of projective space. But then, $\Gamma(\Bbb P^n_k,\mathcal O_{\Bbb P^n_k}) =k$ so the only thing I get is the empty set or the whole space as the support of any function. None of them would be the union of the closures of more than one associated prime, since the closure of a chart $\Bbb A^n_k$ is the whole projective space. My trivial example that works would be the union of two projective spaces.

On the other hand, if Vakil used "functions" to mean not only section of the global, but also of smaller open sets (could anyone tell me?), then, maybe, it would be possible to produce non-reduced behaviour at the origin (much in the spirit of $k[x,y]/(y^2,xy)$) and at another point somewhere at infinity and pick function that has support on both points. But I have no idea of how to do this, and I think that it's probably wrong.

You mentioned the example of $\mathrm{Spec}\; k[x,y]/(y^2,xy)$. Here the support of a (global) function like $f = 2$ (assuming $\mathrm{char}k \neq 2)$ is the entire space, which is the union of $\overline{[(y)]}$ and $\overline{[(x,y)]}$. But maybe this is not the example you want?
Instead consider the union of the axes in $\mathbb{A}_k^2$ along with an embedded point, say given by the ideal $I = (xy) (x-1,y) = (x^2y-xy, xy^2)$ in $k[x,y]$. The associated points of $X = \mathrm{Spec} (k[x,y]/I)$ are $[(x)], [(y)]$ and $[(x-1,y)]$.
The function $g= y-1$ has support $\mathrm{supp}(g) = \overline{[(y)]} \cup \overline{[(x-1,y)]} = \overline{[(y)]}$, which is an irreducible component of $X$.
To be clear, this is basically all that can happen. Any irreducible component of a scheme is the union of the closures of some associated points, one of which is the generic point of the component. That is, if $a_1,\dots,a_n$ are associated points of a scheme such that the union $\bigcup \overline{a_i}$ of the closures is an irreducible component, then for some $j$ we have $\overline{a_j} = \bigcup \overline{a_i}$, so the other points are embedded points.