TITLE: Does $A_P \otimes_A A_Q$ have a nice description?
QUESTION [5 upvotes]: Let $A$ be a ring and suppose $P$ and $Q$ are distinct maximal ideals. I am trying to understand the ring $A_P \otimes A_Q$. I am wondering if $A_P \otimes A_Q$ is ring isomorphic to something else I can get my hands on. Is there some other ring isomorphic to $A_P \otimes A_Q$ that can help me understand $A_P \otimes A_Q$? Thanks.

REPLY [4 votes]: Here is my claim, which I prove below:

Given multiplicative systems $S_1, S_2 \subseteq A$, we have $$S_1^{-1}A \otimes_A S_2^{-1}A \cong (S_1 S_2)^{-1}A,$$
  where $S_1 S_2 = \{s_1 s_2 \mid s_1 \in S_1, s_2 \in S_2\}$ is the multiplicative system generated by $S_1 \cup S_2$.

It is not hard to see that $(S_1S_2)^{-1}A = \bar S_1^{-1}(S_2^{-1}A)$, where $\bar S_1$ is the image of $S_1$ in $S_2^{-1}A$.

Why is the claim true? Because localization and tensor product both have universal properties.
Let me state the universal property for localization a little differently than usual: If $S \subseteq A$ is a multiplicative system, then $\eta_{S^{-1}A} \colon A \to S^{-1}A$ is an $A$-algebra with the universal property that, given any $A$-algebra $\eta_B \colon A \to B$ such that $\eta_B(S)$ is contained in the units $B^\times$ of $B$, there is a unique $A$-algebra morphism $f \colon S^{-1}A \to B$ (i.e. $f$ is a ring homomorphism with $f \circ \eta_{S^{-1}A} = \eta_B$). Put more concisely, $S^{-1}A$ is the initial object in the category consisting of $A$-algebras in which $S$ maps to units.
Tensor product also has a universal property -- it's the coproduct in the category of $A$-algebras.
Now we prove the claim. For brevity, let $T = S_1^{-1}A \otimes_A S_2^{-1}A$.
We show that $T$ satisfies the universal property of $(S_1S_2)^{-1}A$. So let $\eta_B \colon A \to B$ be any $A$-algebra such that $\eta_B(S_1S_2) \subseteq B^\times$; we must show there is a unique $A$-algebra map $T \to B$. Now $S_i \subseteq S_1 S_2$ implies the existence of unique $A$-algebra map $f_i \colon S_i^{-1}A \to B$. Then since $T$ is a coproduct, there is a unique $A$-algebra map $f \colon T \to B$ such that $f \circ \iota_i = f_i$, where $\iota_i \colon S_i^{-1}A \to S_1^{-1}A \otimes S_2^{-1}A$ are the obvious maps. Now if $g \colon T \to B$ is any other $A$-algebra map, then $g \circ \iota_i = f_i$ by uniqueness of $f_i$, so $g = f$ by uniqueness of $f$.