Confusion about coordinate ring of a fiber. I am reading an example given on page 82 in Eisenbud and Harris's The Geometry of Schemes, and I am confused about some terminology. Let $A:=\mathbb{Z}[\sqrt{3}]$, the ring of integers for $\mathbb{Q}(\sqrt{3})$. The natural inclusion $\mathbb{Z}\hookrightarrow A$ induces a map $\operatorname{Spec}A\rightarrow\operatorname{Spec}\mathbb{Z}$. Looking at the fiber of a point $[(p)]\in\operatorname{Spec}\mathbb{Z}$ is equivalent to examining the primes lying above $p$ in $A$. In the case that $p=2$ or $p=3$, we get $2A=(1+\sqrt{3})$ and $3A=(\sqrt{3})^2$, respectively, and the residue fields at the points $(1+\sqrt{3})$ and $(\sqrt{3})$ are $\mathbb{F}_2$ and $\mathbb{F}_3$, respectively.
Now, for these cases, the authors say that for $p = 2$ or $3$, the fiber over $(p)$ is a "single, nonreduced point, with coordinate ring isomorphic to $A/\mathfrak{p}^2$".
My question is, how is the "coordinate ring" here defined? I know when $A$ is a reduced, finitely generated $K$-algebra over a algebraically closed field $K$ that $A$ is itself the coordinate ring. But I'm confused as to what it means here precisely, and can't find any definition given in the book. Can someone explain to me what definition is being used?
 A: In general if $\phi: A \rightarrow B$ is a map of commutative unital rings with
map of spectra
$$ f: X:=Spec(B) \rightarrow Spec(A):=S$$
you may for any prime ideal $\mathfrak{p}\subseteq A$ construct the "residue field"
$$ \kappa(\mathfrak{p}):=A_{\mathfrak{p}}/\mathfrak{p}A_{\mathfrak{p}}.$$
Question: "My question is, how is the "coordinate ring" here defined?"
Answer: The fiber of $f$ at $\mathfrak{p}$ is by definition $f^{-1}(\mathfrak{p}):=Spec(\kappa(\mathfrak{p})\otimes_A B)$.
Note: To understand why this definition is the correct definition, you must do an exercise in Chapter 4 (Ex24) in Atiyah-Macdonald where it is proved that this calculates the fiber of $f$. Since $f^{-1}(\mathfrak{p})$ by definition is an affine scheme it follows the "coordinate ring of the fiber" is the global sections of the structure sheaf:
$$H^0(f^{-1}(\mathfrak{p}) ,\mathcal{O}_{f^{-1}(\mathfrak{p})})=\kappa(\mathfrak{p}) \otimes_A B.$$
Example: Let $S:=Spec(\mathbb{Z}), X:=Spec(A)$. In your case for a prime number $p\in \mathbb{Z}$ you get $\kappa(p):=\mathbb{Z}/p\mathbb{Z}$ hence the fiber
$$f^{-1}((p)):=Spec(\mathbb{Z}/p\mathbb{Z}\otimes_{\mathbb{Z}} A):=Spec(A/(p)A)$$
where $(p)A \subseteq A$ is the ideal generated by $p$. We let $(p)$ denote the ideal generated by $p$ in $\mathbb{Z}$. In the case of the ideal $I:=(2) \subseteq \mathbb{Z}$ you get the factorization $2=(\sqrt{3}-1)(\sqrt{3}+1)$ in $A$ hence the ideal $IA$ is not a prime ideal in $A$. Similarly if $J:=(3) \subseteq \mathbb{Z}$ you get $3=(\sqrt{3})^2$ hence the ideal $JA$ is not a prime ideal.
The ring $A/(2)A$ is not an integral domain and the ring $A/(3)A$ is non-reduced
since $(\sqrt{3})^2=0$.
If $\mathfrak{m}$ is a maximal ideal in $A$ it follows $\kappa(\mathfrak{m})=A/\mathfrak{m}$:
$$ 0 \rightarrow \mathfrak{m}A_{\mathfrak{m}} \rightarrow A_{\mathfrak{m}} \rightarrow (A/\mathfrak{m})_{\mathfrak{m}} \rightarrow 0$$
but $A/\mathfrak{m}$ is a field hence $(A/\mathfrak{m})_{\mathfrak{m}}\cong A/\mathfrak{m}$. Hence in this case we get
$$f^{-1}(\mathfrak{m})\cong Spec(B/\mathfrak{m}B).$$
Note that in the case of the ideal $(2)$ and $(3)$ - these are maximal ideals in $\mathbb{Z}$ hence you do not localize when calculating the fiber.
In general if $K$ is a number field and $\mathcal{O}$ is the ring of integers in $K$ and  $(p)\subseteq \mathbb{Z}$ is a non-zero maximal ideal there is a product decomposition into a product of maximal ideals
$$(p)\mathcal{O}=\mathfrak{m}_1^{l_1}\cdots \mathfrak{m}_j^{l_j}$$
with $\mathfrak{m}_u \neq \mathfrak{m}_v$ for $u \neq v$. Since the ideals in the product are coprime, there is by the chinese remainder theorem an isomorphism of rings
$$ \mathcal{O}/(p)\mathcal{O} \cong \mathcal{O}/\mathfrak{m}_1^{l_1}\oplus \cdots \oplus \mathcal{O}/\mathfrak{m}_j^{l_j}.$$
The fiber is
$$f^{-1}((p))\cong S_1\cup \cdots \cup S_j$$
where $S_i:=Spec(\mathcal{O}/\mathfrak{m}_i^{l_i})$ and where the union is disjoint.
Hence the fiber is a disjoint union of spectras of Artinian rings and the "coordinate ring of the fiber" is the ring
$$\mathbb{Z}/(p)\mathbb{Z}\otimes_{\mathbb{Z}} \mathcal{O} \cong \mathcal{O}/\mathfrak{m}_1^{l_1}\oplus \cdots \oplus \mathcal{O}/\mathfrak{m}_j^{l_j}.$$
Geometrically the map
$$f:Spec(\mathcal{O}) \rightarrow Spec(\mathbb{Z})$$
is a finite map (the ring extension $\mathbb{Z} \subseteq \mathcal{O}$ is an integral extension - by definition) with finite fibers.
A: If $f:X\to Y$ is a morphism of schemes and $y\in Y$ is a point, the fiber over $y$ is $\operatorname{Spec} \kappa(y)\times_Y X$ (see here for a proof that the underlying topological space of this scheme is really the same as the set $f^{-1}(y)$ with the subspace topology). When $X=\operatorname{Spec} A$ and $Y=\operatorname{Spec} R$ are affine, like in your problem, $\operatorname{Spec} \kappa(y)\times_Y X$ is also affine: it's the spectrum of $\kappa(y)\otimes_R A$. The ring $\kappa(y)\otimes_R A$ is the coordinate ring of the fiber.
