Proof by contradiction attempt involving the cartesian product of two non-empty sets

elementary-set-theorysolution-verification

I was wondering if the way I have tried to prove by contradiction the following claim is correct:

Given two nonempty sets $A$ and $B$, show that
if $(A \times B) \cup (B \times A) = A \times A$, then $A \subseteq B$.

My proof by contradiction attempt:

Assume that $(A \times B) \cup (B \times A) = A \times A$, then $A \nsubseteq B$.
Now suppose that $(x, y) \in(A \times B) \cup (B \times A)$.

$\Rightarrow$ ($x \in A$ and $y \in B$) or ($x \in B$ and $y\in A$)

In both cases, we get a contradiction since both $x \in A$ and $x \in B$, or $y \in B$ and $y \in A$, which implies that sets $A$ and $B$ share at least one common element. Well, that is a contradiction since we assumed that $A \nsubseteq B$ (which means that set $A$ and $B$ share no common elemens).
$\square$

Is this sufficient to prove this claim by contradiction?

Best Answer

To do a proof by contradiction rather than a direct proof you must use the assumption $A\not \subset B$ which you didn't. $A$ and $B$ having a common element doesn't contradict $A$ not being a subset. Consider $A = \{$ all even numbers $\}$ and $B = \{$ all perfect squares$\}$. They share all even squares but neither is a subset of the other.

The negation of $A\subset B$ is that there is a $a\in A$ but $a \not \in B$.

If so note that $(a,a) \in A\times A$ so if $(A\times B)\cup (B\times A)=A\times A$ then $(a,a)\in (A\times B)\cup (B\times A)$ so either $(a,a) \in A\times B$ and $a \in B$, a contradiction. Of $(a,a)\in B\times A$ and $a \in B$, a contradiction.

Related Question