Lemma 25.6.5. The category of affine schemes is equivalent to the opposite of the category of rings. The equivalence is given by the functor that associates to an affine scheme the global sections of its structure sheaf.

Proof. This is now clear from Definition 25.5.5 and Lemma 25.6.4. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).