Does $A_P \otimes_A A_Q$ have a nice description? 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.
 A: 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$.
A: I wrote this up but haven't carefully checked the details.  Hope it's right.  Let $W$ be the image of $A - Q$ in $A_P$.  Then $A_P \otimes_A A_Q$ is isomorphic as an $A$-algebra to the localization of $A_P$ at $W$.  
Proof: Consider the ring homomorphism $f: A_P \rightarrow A_P \otimes_A A_Q, x \mapsto x \otimes 1$.  Let $B$ be any ring, and suppose $\phi: A_P \rightarrow B$ is a ring homomorphism which sends elements of $W$ to units in $B$.  We are done if we can show that there exists a unique ring homomorphism $\bar{\phi}: A_P \otimes_A A_Q \rightarrow B$ such that $\bar{\phi} \circ f = \phi$.  
The map $A_P \times A_Q \rightarrow B, (\frac{a}{s}, \frac{y}{z}) \mapsto \phi(\frac{ay}{s}) \phi(\frac{z}{1})^{-1}$ is  well defined and $A$-bilinear, so there exists a unique $A$-linear map defined on generators
$$A_P \otimes_A A_Q \rightarrow B$$ by the same formula.  You can check that it's also a ring homomorphism, and that it satisfies the uniqueness.
Since $A_P \otimes_A A_Q$ satisfies the uniqueness property for localizations, there exists a unique ring isomorphism $\psi:W^{-1}A_P \rightarrow A_P \otimes_A A_Q$ such that $\psi(\frac{\frac{a}{s}}{1}) = \frac{a}{s} \otimes 1$, and this is also clearly $A$-linear, so $\psi$ is an $A$-algebra isomorphism.  $\blacksquare$
For example, if $A$ is an integral domain, and $P,Q$ are height one maximal ideals (e.g. $A$ is a Dedekind domain), then $A_P \otimes_A A_Q$ should just be the quotient field of $A$.
