Prove that $[(A\times B)\cup (B\times A) =(A\cup B)\times (A\cup B)] \iff A=B$ Prove that $$[(A\times B)\cup (B\times A) =(A\cup B)\times (A\cup B)] \iff A=B$$
$$\Leftarrow$$
Assume $A=B$
$\therefore (A \times B) \cup (B \times A) = (A \times A) \cup (A \times A) =A^2$
and $(A \cup B) \times (A \cup B) = ( A \cup A) \times (A \cup A) = A \times A = A^2  (1)$
i have proved that if $A=B$ is to be true then the other part is also true
now i want to prove the opposite
$$\Rightarrow$$
Assume $(A\times B)\cup (B\times A) = (A\cup B)\times (A\cup B)$
Let $p$ be an arbitrary element 
$p \in (A \cup B) \times (A \cup B) \iff \exists x \exists y(x \in (A \cup B) \land y \in (A \cup B) \land p=(x,y))$
$ \iff \exists x\exists y((x\in A\lor x\in B) \land (y \in A \lor y\in B)\land p=(x,y))$
and i'm stuck right here
i think that i have to prove that $A \subseteq B$ and $ B \subseteq A$ then $ A=B$ using my assumption
so any ideas that might help me ?
 A: Keep in mind that you are trying to show that $A=B$.
So we show $A\subseteq B$ and $B\subseteq A$.
So let $a\in A$. We have to show that $a\in B$.
Assume $a\notin B$. Then is $(a,a)\notin (A\times B)\cup (A\times B)$. But $(a,a)\in (A\cup B)\times (A\cup B)$. Which is a contradiction to the equality of sets.
$B\subseteq A$ is prooven exactly the same.
A: For $\implies$: Let $a \in A$. Then $(a,a) \in (A\cup B) \times (A \cup B)$. By assumption this implies $(a,a) \in (A\times B) \cup  (B \times A)$. So $(a,a) $ belongs to either $(A\times B)$ or  $ (B \times A)$. In either case we get $a \in B$. Hence $A \subseteq B$. Similarly, $B \subseteq A$. 
A: The "$\Leftarrow$"-part should be clear (if $A = B$, then $A \times B = A \times A = B \times A$ and $A \cup B = A$. You could prove the $\Rightarrow$-part via contraposition, i.e. assume that there is an $x \in A$ with $x \not\in B$, then $x$ is an element of $A \cup B$ which means that $(x,x) \in (A\cup B)\times(A\cup B)$, but since $x$ is not in $B$, $(x,x)$ cannot be in either $A \times B$ or $B \times A$.
A: 1)$\Leftarrow$ is obvious.
2) Let $X:=A\cup B$;
We have 
$(A×B)\cup(B×A)=X×X$
Let $a \in A$ and consider
$(a,a) \in X×X;$ then
$(a,a) \in A×B$ or $(a,a) \in B×A.$
In both cases  we get $a \in B$, hence $A \subset B$.
Let $b \in B$ and consider
$(b,b) \in X×X$.
Can you finish?
