TITLE: Constructing prime ideal of tensor product from two prime ideals
QUESTION [13 upvotes]: If $M,N$ are $R$-algebras and natural maps $m:M\to M\otimes_RN,n:N\to M\otimes_RN$, is there any way to construct a prime ideal $T$ of $M \otimes_R N$ given two prime ideals $A,B$ of $M,N$ such that $m^{-1}(T)=A,n^{-1}(T)=B$?
Equivalently, is there a way to explicitly construct or describe the map $\mathrm{Spec}(M\otimes_RN)\to\operatorname{Spec}M\times_{\operatorname{Spec}R}\operatorname{Spec}N$?

REPLY [2 votes]: Remy's answer is very nice. And I found it not so immediate without writing down the details, so I write here how the factorization deduces the lemma in Remy's answer:

Given a prime $\xi\subset M\underset{R}{\otimes}N$, and we have the factorization $\psi :M\underset{R}{\otimes}N\overset{\psi_1}{\rightarrow} k(p)\underset{R}{\otimes}k(q) \overset{\psi_2}{\rightarrow} k(\xi)$, we associate $\xi$ with $\psi_2^{-1}(0)$ which is a prime in $k(p)\underset{R}{\otimes}k(q)$.

Consider the map $\psi_1: M \underset{R}{\otimes}N \rightarrow k(p)\underset{R}{\otimes}k(q)$, and we associate a prime $\zeta$ in $k(p)\underset{R}{\otimes}k(q)$ to $\psi_1^{-1}(\zeta).$


We prove these two maps are inverse to each other.

Start from $\xi \subset M\underset{R}{\otimes}N$. By the property of localization and quotient, $\xi = \psi^{-1}(0) = \psi_{1}^{-1}\psi_2^{-2}(\xi). $ This proves one direction.

Start from $\zeta \subset k(p)\underset{R}{\otimes}k(q)$. Since $\psi_1$ s subjective, $\psi_1^{-1}(\zeta) = \psi_1^{-1}\psi_2^{-1}(0) \implies \psi_1\psi_1^{-1}(\zeta) =\psi_1 \psi_1^{-1}\psi_2^{-1}(0)\implies\zeta = \psi_2^{-1}(0).$


This fills the gap.