Commutative Algebra – Disjoint Union of Spectra Explained

commutative-algebra

The following it from Atiyah-Macdonald's Introduction to Commutative Algebra, exercise 1.22.
Apparently this should be very easy, my apologies for asking.
I have been stuck for almost 1 day and I cannot figure out what is wrong with my arguments.

Let $A=\prod_{i=1}^n A_i$ be the direct product of rings $A_i$.
Show that $\operatorname{Spec}(A)$ is the disjoint union of open (and closed) subspaces $X_i$, where $X_i$ is canonically homeomorphic with $\operatorname{Spec}(A_i)$.

What I tried so far:
I know that $A=\prod_{i=1}^nA_i$, so I tried to find all the prime ideals in the product.
One of the lemma I showed was that for each prime ideal $\mathfrak{p}\subseteq\prod_{i=1}^nA_i$, it must be of the form:
$A_1\times\dotsb\times\mathfrak{p}_i\times\dotsb\times A_n$,
where $\mathfrak{p}_i$ is a prime ideal in $A_i$.
Hence I concluded that $\operatorname{Spec}(A)=\coprod_{i=1}^nX_i$, where $X_i=A_1\times\dotsb\times \operatorname{Spec}(A_i)\times\dotsb\times A_n$.

If my lemma is right this should cover all cases of prime ideals in $\prod_{i=1}^nA_i$,
but I have trouble when I am checking its properties.

Namely: $X_i\cap X_j$ should be $\emptyset$ for $i\neq j$, since I am looking for disjoint union.
But looking at $X_1\cap X_2$ there seems to be a non-empty intersection at
$(\operatorname{Spec}(A_1),\dots)\cap (A_1,\dots)=(\operatorname{Spec}(A_1),\dots)$.
(Or should $\operatorname{Spec}(A_1)\cap A_1=\emptyset$?)

Intuitively it seems like I may be able to define the following:
$\operatorname{Spec}(A)\cong \operatorname{Spec}(A_1)\times\dotsb\times \operatorname{Spec}(A_n)$
Then letting $X_i=(0,\dots,\operatorname{Spec}(A_i),\dots,0)$ seems to resolve the disjoint union problem.
Also, clearly each $X_i$ is a collection of prime ideals.
However, this looks like I will be missing cases like $A_1\times\dotsb\times \operatorname{Spec}(A_i)\times\dotsb\times A_n$.

Where did I go wrong?
Or am I misinterpreted anything wrongly?
Thanks for reading!

Best Answer

I think you essentially captured the idea of the proof; but the notation is misleading. Indeed, your $X_i$ should be defined as follows: $$ X_i:=\{A_1\times\dots\times\mathfrak p\times\dots\times A_n\,|\,\mathfrak p\in\textrm{Spec }A_i \}\subset\textrm{Spec }A. $$ Then of course $X_i\cong \textrm{Spec }A_i$ and $\textrm{Spec }A\cong\coprod X_i$.

Related Question