The shape of elements of schemes In the book Geometry of Schemes, written by David Eisenbud & Joe Harris, at the start of chapter one in the section Schemes as Sets, the authors introduce elements of $R$ as functions. I can't understand their meanings there! If anyone knows how these functions are defined, please describe what functions that correspond to elements of $R$ are.
 A: If $R$ is a commutative ring one associates to it a set, the spectrum $Spec(R)$ of that ring.
The elements of that spectrum are the prime ideals $\mathfrak p\subset R$.
Now, given an element $r\in R$ one associates to it a function $\hat r $  defined on $Spec(R)$ (the Gel'fand transform of $r$), whose value at $\mathfrak p\subset R$ is the residue class $\hat r(\mathfrak p)=\text {class} (r)\in R/\mathfrak p\subset \kappa (\mathfrak p) =Frac(R/\mathfrak p)$.   
This is an amazing  construction.
 Many  rings are naturally given as   functions  on some structured set: think of continuous functions on a topological space or smooth functions on a manifold or holomorphic finctions on a holomorphic variety or...
The fantastic idea, due to Gel'fand for Banach algebras and to Grothendieck for general rings, is that you can essentially force every ring to be  a ring of functions on some set, namely $Spec(R)$, extracted from $R$ itself.
Of course there are technical problems: the association  $r\mapsto \hat r$ is not always injective , so that the ring $R$ is not always exactly a ring of functions,  but  this idea of trying   to consider any ring as a ring of functions is really extraordinary and extremely useful.
A: In the book Geometry of Schemes, written by David Eisenbud and Joe Harris, at the start of chapter one in the section Schemes as Sets, the authors introduce elements of R  as functions. we will describe what functions that correspond to elements of R  are.
Let us recall some Theorems from fundamental Algebras
Theorem: Assume $R$ is a commutative ring with an identity element, then "$P$ is a prime ideal of $R$ $\Longleftrightarrow$ $\frac{R}{P}$ be an integral domain".("Algebra" written by Dr. Mohammadi Hasan Abadi)
having identity element was needed for $\frac{R}{P}$ will be an integral domain, because we defined a ring $R$ is an integral domain if it will be commutative with identity element and has no non-zero zero divisor. But if you look at the proof of this theorem it is not needed to implies from $P$ is a prime ideal of $R$ that $\frac{R}{P}$ has no non-zero zero divisor and its convert.
Theorem: Assume $R$ is a commutative ring with at least two elements and has no non-zero zero divisors. Then the relation $\thicksim$ on $\{(a,b)\in R\times R\:|\:b\neq 0\}$ with definition "$(a,b)\thicksim(c,d)\Longleftrightarrow ad=bc$" is an equivalence relation on the set of quotients of $R$.("Algebra" written by Dr. Mohammadi Hasan Abadi, page 299)
Theorem: The set of equivalence classes introduced in previous theorem with operations $+$ and $\cdot$ that are defined below is a field.("Algebra" written by Dr. Mohammadi Hasan Abadi, page 301)
$\{        +:F\times F\longrightarrow F \\
        (a,b)+(c,d)=(ad+bc,bd)$
$ \{\begin{array}{c}
        \cdot:F\times F\longrightarrow F \\
        (a,b)\cdot(c,d)=(ac,bd)
      \end{array}$
Theorem: Assume $R$ is a commutative ring with at least two elements and has no non-zero zero divisor and let $F$ be its quotients field. Then R is embeddable in $F$.("Algebra" written by Dr. Mohammadi Hasan Abadi, page 302)
Note that the identity of quotient field is equivalence class contains $(a,a)$ that $a\in R-\{0\}$ is arbitrary. And note that, embedding function that is mentioned is 
$\{\begin{array}{c}
         f:R\longrightarrow F \\
         f(a)=[(ab,b)]_{\thicksim}\quad ;b\in R-\{0\}
       \end{array}$
Be care that by definition of $\thicksim$, $[(ab,b)]_{\thicksim}$ is independent from $b$ and only depends on $a$.
Now if $R$ be commutative ring for every prime ideal of $R$ like $P$ we have $\frac{R}{P}$ is commutative ring with no non-zero zero divisors, so by mentioned theorems, $F_{P}$ the set of equivalence classes of relation $\thicksim$ on $\{(a+P,b+P)\in \frac{R}{P}\times \frac{R}{P}\:|\:b+P\neq P\}$ with mentioned operators $+$ and $\cdot$ will be a field that $\frac{R}{P}$ will be embedded in it with following function.
$\{\begin{array}{c}
         f_{P}:\frac{R}{P}\longrightarrow F_{P} \\
         f_{P}(r+P)=\frac{(r+P)(s+P)}{s+P}\quad ;s+P\in \frac{R}{P}-\{P\}
       \end{array}$
Now the main concept of those authors will be shined as below:
For every $r\in R$ define;
$\{\begin{array}{c}
         f_{r}:Spec(R)\longrightarrow \bigcup_{P\in Spec(R)}F_{P} \\
         f_{r}(P)=\big(f_{P}o\pi_{P}\big)(r)=\frac{(r+P)(s+P)}{s+P}\quad ; s\in P
       \end{array}$
$\{\begin{array}{c}
         \pi_{P}:R\longrightarrow \frac{R}{P} \\
         \pi_{P}(r)=r+P
       \end{array}$
For every one of elements of $R$ like $r$, $f_{r}$ is a function because if $P_{1},P_{2}\in Spec(R)$ and $P_{1}=P_{2}$ then it is like you are denoting a prime ideal of $R$ with two nomads, so $\frac{R}{P_{1}}=\frac{R}{P_{2}}$ and $F_{P_{1}}=F_{P_{2}}$ and for every $s\notin P_{1}$ we have $s\notin P_{2}$ and conversely and at the end $\frac{(r+P_{1})(s+P_{1})}{s+P_{1}}=\frac{(r+P_{2})(s+P_{2})}{s+P_{2}}$ that means $f_{r}(P_{1})=f_{r}(P_{2})$.
