Prove that $A = B = C = D$ $A, B, C, D$ are sets, where $A \not = \emptyset$ and $B \not = \emptyset$. Equation $(A \times B) \cup (B \times A) = C \times D$ is true.
Prove that $A = B = C = D$.
I tried to find $A, B, C, D$ separately, but that didn't get me anywhere. Any ideas how to solve it?
 A: Draw a diagram!

Here, the shaded area is the set $(A \times B) \cup (B \times A)$.  It should be fairly intuitive from looking at this why the shaded area can only be equal to $C\times D$ if $A=B=C=D$.  Now you need to translate that intuition into formal language.
A: Some hints: 
Consider the first coordinate of each of the items in $A \times B$; that set of first-coordinates is all of $A$. 
What are all the first coordinates of all the items in $(A \times B) \cup (B \times A)$? (i.e., what is the set of first coordinates?)
(By "first coordinate" of an ordered pair $(x, y)$, I mean $x$, by the way). 
What are the second coordinates of the items in the same set? What about those on the right-hand side? 
Where did you use the assumption that $A$ and $B$ are nonempty? 
A: Here's my attempt at reasoning through it, with massive help from the other two answers. I'm not very strong with set-theory, so everyone please let me know if I've made any mistakes. Thanks.
$A=\{a_1,a_2,a_3,\ldots,a_i,\ldots\}$ and $B=\{b_1,b_2,b_3,\ldots,b_i,\ldots\}$. Then we have that $(A\times B)\cup(B\times A)=\{(a_1,b_1),\ldots,(a_i,b_i),(b_1,a_1),\ldots\}$. In other words, the set $(A\times B)\cup(B\times A)$ contains pairs, where every element from $A$ and $B$ appears a first co-ordinate, but also as a second co-ordinate. So if this set equals $C\times D$ then $C$ is the set of all first co-ordinates, namely $C=\{a_1,a_2,\ldots,b_1,\ldots\}=A\cup B$. But we could say the same about $D$, with the second co-ordinates, so $D=C=A\cup B$. So then $(A\times B)\cup (B\times A)=C\times C$ but the set $C\times C$ would contain the pair $(a_1,a_1)$ and all other $(a_i,a_i)$. These pairs weren't in our original formulation of $(A\times B)\cup (B\times A)$ but they must have come from either $A\times B$ or $B\times A$. Without loss of generality, let's assume that $(a_i,a_i)\in A\times B$. This might suggest that there are no $a_i$ and that $A$ is empty. Can you finish it from here?
A: Let $a \in A$ and $b \in B$.  Then $(a,b) \in A\times B \subset C\times D$.  So $(a,b) \in C\times D$ and $a \in C$ and $b\in D$ and $A\subset C$ and $B\subset D$.
And we also know $(b,a) \in B\times A \subset C\times D$ so $b \in C$ and $a \in D$ and so $B\subset C$ and $A\subset D$.
So $A\cup B \subseteq C$ and $A\cup B \subseteq D$.
Now suppose $A\cup B \subsetneq C$.
Let $c \in C\setminus (A\cup B)$ then $c \not\in A$ and $c\not \in B$ so $(c,a)\not \in A \times B$ nor $(c,a) \not \in B \times A$ so $(c,a) \not \in C\times D = (A\times B)\cup (B\times A)$.  But $a \in A \subset D$ so $(c,a) \in C\times D$.  That's a contradiction so $A\cup B \not \subsetneq C$ so $A\cup B = C$.
Similarly $A\cup B$ but the exact same argument must be equal to $D$.
So $C = D = A\cup B = B\cup A$.
Now we know that $a\in D = C = A\cup B$ so $(a,a) \in C \times D$.  So eithere $(a,a) \in A \times B$ and $a \in B$.  Or $(a,a) \in B\times A$ and $a \in B$.  So $a \in B$ and $A \subset B$.
Likewise $(b,b) \in C \times D$ so either $(b,b) \in A\times B$ or $(b,b) \in B\times A$.  either way $b \in A$ and $B \subset A$.
So $A = B$ and $C=D = A\cup B = A=B$.
A: I am sure that this is correct:
$A=\{a_1,a_2,a_3,\ldots,a_i,\ldots\}$ and $B=\{b_1,b_2,b_3,\ldots,b_i,\ldots\}$. Then we have that $(A\times B)\cup(B\times A)=\{(a_1,b_1),\ldots,(a_i,b_i),(b_1,a_1),\ldots\}$. In other words, the set $(A\times B)\cup(B\times A)$ contains pairs, where every element from $A$ and $B$ appears a first co-ordinate, but also as a second co-ordinate. 
Don't know how to continue though.
