# Definition of tensor product of rings

Let $$X=\operatorname{Spec} A,Y=\operatorname{Spec}B$$ and $$Z=\operatorname{Spec}C$$ be affine schemes, with $$A,B,C$$ commutative rings. According to Wikipedia, the following holds:

$$X \times_Y Z\cong \operatorname{Spec}\left( A\otimes_B C \right)$$.

Question: What is the tensor products of rings? Do we view $$A$$ and $$C$$ as $$B$$-algebras in some kind of way?

$$A\otimes_B C$$ does have a structure of $$B-$$algebra. The ring structure on $$A\otimes_B C$$ is defined by $$(a\otimes c)\cdot(a'\otimes c')=(aa'\otimes cc').$$ This has the structure of a $$B-$$algebra by $$b(a\otimes c)=(ba\otimes c)=(a\otimes bc)$$ where we used the definition of the tensor product. In particular, there is a structure map $$\operatorname{Spec}(A\otimes_B C)\to \operatorname{Spec}(B)$$ fitting into the diagram $$\require{AMScd}$$ $$\begin{CD} \operatorname{Spec}(A\otimes_B C) @>{}>> \operatorname{Spec}(C)\\ @VVV @VVV\\ \operatorname{Spec}(A) @>{}>> \operatorname{Spec}(B). \end{CD}$$
Edit: Following the request below, I will just add the following comment: you should notice that the morphism $$\operatorname{Spec}(A)\to \operatorname{Spec}(B)$$ corresponds to a morphism of rings $$f:B\to A$$ (using the antiequivalence of categories between commutative unital rings and affine schemes), so that $$A$$ has the structure of a $$B-$$algebra. This lets us define $$b\cdot a$$ for $$a\in A$$ by $$f(b)a=b\cdot a$$. The same thing applies for $$\operatorname{Spec}(C)\to \operatorname{Spec}(B)$$ so that $$C$$ has a $$B-$$algebra structure.
• Thanks but how are $ba$ and $bc$ defined? This would assume that we are treating $A$ and $C$ as $B$-algebras, wouldn't it? – test123 Aug 12 at 14:52
• Yes, but in the context of your question, if you have morphisms $X\to Y$ and $Z\to Y$, e.g. morphisms $\operatorname{Spec}(A)\to \operatorname{Spec}(B)$, then there is a ring map $B\to A$ in the category of rings, which is equivalent to $A$ having a $B-$algebra structure. So, I am using this $B-$algebra structure to define $ba$ for $b\in B$ and $a\in A$, and similarly for $bc$. – Alekos Robotis Aug 12 at 14:54
• @AlekosRobotis I think your comment about how you define the $B$-algebra structure on $A$ and $C$ via the maps $B\to A$ and $B\to C$ would be a good addition to your answer. – KReiser Aug 12 at 19:16