# characterization of affine open sets in an affine scheme

Let $R$ be a commutative ring with unity. Consider the affine scheme $\operatorname{Spec} R$. For an ideal $I$ of $R$ show that $D(I)$ is affine iff $I$ generates the unit ideal in $\Gamma (D(I), \widetilde R)$

EDIT:

My approach so far: So consider the cacnonical morphism from $(D(I), \widetilde R)$ to $(Spec$ $S, \widetilde S)$ corresponding to the ring homomorphism $id: S\rightarrow S$ where $S=\Gamma(D(I), \widetilde R)$.

It is easy to see that $D(I) \rightarrow Spec$ $S$ is a homeomorphism because of the condition $I$ generates the unit ideal in $S$ with inverse given by $Spec$ $S \rightarrow D(I)$ where $q \mapsto \phi ^{-1}(q)$ where $\phi : R \rightarrow S$ is the ring homomorphism $res_{Spec R,D(I)}$.

For $p\in Spec$ $S$ we have the commutative diagram $\require{AMScd}$ \begin{CD} S @>id>> S\\ @V V V @VV V\\ S_p @>>> {R_{\phi^{-1}(p)}} \end{CD}

Clearly the morphism $S\rightarrow R_{\phi^{-1}(p)}$ is surjective but I am stuck with injectivity. Any hints?

• Maybe one can use the criteria of affineness given in problem 2.17 chapter 2 of Hartshorne's Algebraic Geometry. – random123 Apr 15 '18 at 11:03
• yes that is a nice observation. I have tried that to some success. – Soumik Ghosh Apr 16 '18 at 12:06

So a scheme $(X, \mathscr O_X)$ is affine iff $\exists$ $f_i$ $i=1(1)n$ such that $X= \cup X_{f_i}$, $X_{f_i}$ is affine $\forall i$ and $f_i's$ generate $\Gamma(X,\mathscr O_{X})$. So we have by the condition $\exists f_1, f_2... f_n \in I$ such that $<f_i|_{D(I)} : i=1(i)n>=\Gamma(D(I),\widetilde R)$. Clearly we have $D(I)_{f_i|_{D(I)}}=D(I)$ $\cap$ $(Spec$ $R)_{f_i}=D(I)\cap D(f_i)=D(f_i)$ which is affine and we are done.