# Associated points of a scheme are contained in an open subset

Recall that we define the set of associated points of a locally Noetherian scheme $X$ as $\operatorname{Ass}(\mathcal{O}_X) = \{ x \in X : \mathfrak{m}_x \in \operatorname{Ass}_{\mathcal{O}_{X,x}}(\mathcal{O}_{X,x})\}$. I am having trouble understanding the proof of the following (Liu, 7.1.9):

Let $U$ be an open subset of $X$ and $i : U \to X$ the inclusion. The morphism $\mathcal{O}_X \to i_\ast(\mathcal{O}_U)$ is injective iff $\operatorname{Ass}(\mathcal{O}_X) \subseteq U$.

Since the property is local, he assumes $X = \operatorname{Spec}(A)$ so that the problem reduces to showing $A \to \Gamma(U, \mathcal{O}_X)$ is injective iff $\operatorname{Ass}(A) \subseteq U$. For the reverse direction, he argues as follows:

Let us suppose now that there exists a $\mathfrak{p} = \operatorname{Ann}(a) \in \operatorname{Ass}(A)$ with $\mathfrak{p} \not\in U$. Then for any point $x \in U$, we have $\operatorname{Ann}(a)\mathcal{O}_{X,x} = \mathfrak{p}\mathcal{O}_{X,x} = \mathcal{O}_{X,x}$; hence $a_x = 0$. Consequently, $a|_U = 0$.

The equality $\mathfrak{p}\mathcal{O}_{X,x} = \mathcal{O}_{X,x}$ is what I don't understand. As far as I understand, $\mathfrak{p}\mathcal{O}_{X,x}$ denotes the image of $\mathfrak{p}$ under the homomorphism $A \to \mathcal{O}_{X,x}$, right?

I also tried to prove $a_x = 0$ directly: we want to show that the image of $a$ vanishes under the homomorphism $A \to \mathcal{O}_{X,x} = A_Q$ (where $Q \subset A$ is the prime ideal corresponding to $x$); i.e. $t \cdot a = 0$ for some $t \not\in Q$. This is equivalent to the set $P \setminus Q$ being nonempty for all $Q \in U$. Assuming $U = D(f)$ ($f \in A$), we want $P \setminus Q$ nonempty for all prime ideals $Q$ not containing $f$ where $f \in P$. It is clear that any such $Q$ must contain $a$ (as $af = 0 \in Q$) but I don't know what to do next.

The notation $\mathfrak{p}\mathcal{O}_{X,x}$ means the ideal generated in $\mathcal{O}_{X,x}$ by the elements $\frac{p}{1}$, where $p\in\mathfrak{p}$.
One important observation: If $U\subseteq \mbox{Spec}(A)$ and $x\in U$, but $\mathfrak{p}\not\in U$, then it follows that $\mathfrak{p}\not\subseteq x$, considered as ideals of $A$. To see this, take $U=\mbox{Spec}(A)\setminus V(I)$ for $I\subseteq A$ and write out the definitions.
This means that there exists $f\in\mathfrak{p}$, such that $f\not\in x$. Then $f$ is a unit in $\mathcal{O}_{X,x}=A_x$, that is $\frac{1}{f}\in\mathcal{O}_{X,x}$. But $\mathfrak{p}\mathcal{O}_{X,x}$ is an ideal in $\mathcal{O}_{X,x}$, and it contains $1 = f\cdot \frac{1}{f}$, so it must be the whole ring.