I am trying to understand a passage in Mumford's Red Book (Section II. 5, page 146 in the old version). Let $X$ be a scheme, $Q$ is a subsheaf of $O_X$ such that for all $U$, $Q(U)$ is an ideal in $O_X(U)$, (I assume he means open $U$ here) and we call such an object an $O_X$- ideal.
The part I am trying to understand is the following: We claim that $Q$ determines the closed subschemes up to canonical isomorphisms. For first of all, $Y = \{ x \in X : Q_x \neq O_X \}$, the sequence
$$
0 \to Q_x \to O_{x,X} \to O_{x, Y} \to 0
$$
is exact, and secondly $O_Y$ extended by zero is canonically isomorphic to the cokernel of $Q \to O_X$. Thus a closed subscheme is really just an $O_X$-ideal.
I am struggling to see how this explains $Q$ determines closed subschemes. I have been trying to understand parts of this so I have asked couple related question, but it seems that I am getting more confused... I would greatly appreciate clarification about this. Thank you very much!
Let $X$ be a scheme, and let $\mathcal{I}$ be a quasi-coherent sheaf of ideals on $X$. Let $Z$ be the support of the quotient $\mathcal{O}_X / \mathcal{I}$, that is $$ Z=\{x \in X \ | \ (\mathcal{O}_X/\mathcal{I})_x \neq 0 \}.$$ The set $(Z,\mathcal{O}_X/\mathcal{I})$ is a sub-ringed space of $X$. Let $U\subset X$ be a open subset such that $(U,\mathcal{O}_X|_U)\simeq (Spec A,\widetilde{A})$ is affine. Hence $\mathcal{I}|_U$ has the form $\widetilde{I}$, that is it is associated to an ideal $I$ of $A$. Then $(Z\cap U,\mathcal{O}_X/\mathcal{I}|_U) \simeq (Spec (A/I), \widetilde{A/I})$.
Note that the inclusion map $i : (Z,\mathcal{O}_X/\mathcal{I}) \to (X,\mathcal{O}_X)$ is a closed immersion, as the map $\mathcal{O}_X \to i_*(\mathcal{O}_X/\mathcal{I})$ is surjective (on a point $p\in Spec(A)$ it is given by $A_p \to (A/I)_p$).