topology question about cartesian product I have a question about a proof I'm reading. It says: 
Suppose $A$ is an open set in the topology of the Cartesian product $X\times Y$, then you can write $A$ as the $\bigcup (U_\alpha\times V_\alpha)$ for $U_\alpha$ open in $X$ and for $V_\alpha$ open in $Y$. Why is this?
(I get that the basis of the product topology of $X \times Y$ is the collection of all sets of the form $U \times V$, where $U$ is an open subset of $X$ and $V$ is an open subset of $Y$, I just don't know why we can take this random union and say that it equals $A$.) 
 A: I think you problem might be a confusion about the concept of a basis for a topological space.  There are at least two common and equivalent definitions, which I will presently give:
Definition 1: A family $\mathcal{B}$ of open subsets of a topological space $X$ is called a basis for $X$ if for each $x \in X$ and every open neighbourhood $U$ of $x$ there is a $V \in \mathcal{B}$ with $x \in V \subseteq U$.
Definition 2: A family $\mathcal{B}$ of open subsets of a topological space $X$ is called a basis for $X$ if for every open $U \subseteq X$ there is a subfamily $\{ V_i : i \in I \} \subseteq \mathcal{B}$ such that $U = \bigcup_{i \in I} V_i$.
I suspect it is the first definition that you have been presented with.  From the second definition it is absolutely transparent that every open set is a union of some subfamily of the basis.  To show that every basis in the sense of Definition 1 is also a basis in the sense of Definition 2 we argue as follows:

Suppose $U \subseteq X$ is open (and nonempty).  As $U$ is then an open neighbourhood of each of its elements, by Definition 1 for each $x \in U$ there is a $V_x \in \mathcal{B}$ with $x \in V_x \subseteq U$.  But then $\{ V_x : x \in U \}$ is a subfamily of $\mathcal{B}$, and $$U = \bigcup_{x \in U} \{ x \} \subseteq \bigcup_{x \in U} V_x \subseteq U.$$

A: I’m going to give you an answer strictly from the point of view of Definition 1 in Arthur Fischer’s answer. Let $$\mathscr{B}=\{U\times V:U\text{ is open in }X\text{ and }V\text{ is open in }Y\}\;;$$ as you said, $\mathscr{B}$ is a base for the product topology on $X\times Y$. Let $A$ be open in $X\times Y$. Then for each $a\in A$ there must by a basic open set $B_a\in\mathscr{B}$ such that $a\in B_a\subseteq A$. By definition $B_a=U_a\times V_a$ for some open sets $U_a$ in $X$ and $V_a$ in $Y$, so $a\in U_a\times V_a\subseteq A$. I claim that 
$$A=\bigcup_{a\in A}(U_a\times V_a)\;.$$
We already know that $U_a\times V_a\subseteq A$ for each $a\in A$, so
$$\bigcup_{a\in A}(U_a\times V_a)\subseteq A\;.$$
On the other hand, for each $a_0\in A$ we have $$a_0\in U_{a_0}\times V_{a_0}\subseteq\bigcup_{a\in A}(U_a\times V_a)\;,$$ so 
$$A\subseteq\bigcup_{a\in A}(U_a\times V_a)\;.$$
Thus, $$A=\bigcup_{a\in A}(U_a\times V_a)\;,$$ as claimed.
A: It isn't a random union, it is the union for all open $U,V$ such that $U\times V$ is contained in $A$.  As a result we immediately have half of the containment, that the union is a subset of $A$.
To see why $A$ is contained in the union, consider a point $(x,y)$ in $A$.  Since $A$ is open, there must be a basic open set of the product topology that contains the point and is a subset of $A$.  But this is precisely a product $U\times V$ of open sets $U,V$ from $X,Y$ respectively.
QED
A: You need to be careful and choose those $U_{\alpha}$ and $V_{\alpha}$ for which $U_{\alpha} \times V_{\alpha} \subset A$.
A: This is because the sets of type $U\times V$ ($U$ open in $X$, $V$ open in $Y$) form a basis of the product topology on $X\times Y$.
In general, if you have any arbitrary product of topological spaces $\times_{\alpha\in I}X_\alpha$, let the projection on $X_\alpha$ be denoted by $\pi_\alpha$. Then a subbasis for the product topology is given by $\{\pi^{-1}_\alpha(U_\alpha)|\alpha\in I,\ U_\alpha\ \mathrm{is\ open\ in\ }X_\alpha\}$ (this is actually the definition of the product topology; notice that the projection maps are continuous wrt this topology). Now, take $U$ open in $X$, $V$ open in $Y$. Then $U\times V = \pi_X^{-1}(U)\cap\pi_Y^{-1}(V)$.
