Non associativity of Cartesian product I am trying to prove that if
$$(A \times B) \times C = A \times (B \times C)$$
Then either $A = \emptyset, B = \emptyset$ or $C = \emptyset$.
So far I start of by assuming the equivalence and that $A \neq \emptyset, B \neq \emptyset$ and $C \neq \emptyset$. This gives $a \in A, b \in B, c \in C$ such that $((a,b), c) \in (A \times B) \times C $ and $((a,b), c)\in A \times (B \times C)$, whence $(a, b) \in A \times B$ and $(a, b) \in A$ and $c \in C$ and $c \in B \times C$, so that $A \times B = A$ and $B \times C = C$.
I understand on an intuitive level that $A \times B \neq A$, unless they are both empty (and likewise for $B \times C = C$, but what rules it out formally (in particular, what axiom or chain of reasoning in ZFC would rule it out)?
 A: You're right that it boils down to showing that if $A, B$ are sets, then $A = A\times B$ only if $A$ is empty. This holds without choice. Suppose $A = A\times B$ where $A$ is nonemoty.
We will construct an infinite sequence which contradicts a consequence of the axiom of regularity and pairing mentioned on Wikipedia.
For each $a$ in $A$, there exists a unique $a' \in A, b \in B$ such that $a = (a', b)$. Moreover $(a', b) = \{\{a'\}, \{a', b\} \}$. So we have that $\{a'\} \in a$.
Then, fixing $a\in A$ consider the infinite sequence $a(1),...$ given by
\begin{align}
a(1) &= a\\
a(2) &= \{a'\}\\
a(3) &= a'\\
a(4) &= \{(a')'\} \\
a(5) & = (a') '\\
&... 
\end{align}
This sequence satisfies $a(n+1) \in a(n)$ for each $n \in \mathbb{N} $. This is a contradiction.
A: To complement David Perrella's answer, let me point out that the axiom of regularity is crucial for this statement.  Without regularity, it is possible to have a set $A$ such that $A=\{A\}$.  This set then satisfies $(A,A)=\{\{A\},\{A,A\}\}=\{\{A\}\}=\{A\}=A$ and so $A\times A=\{A\}=A$ and thus $(A\times A)\times A=A=A\times (A\times A)$.  So, the axiom of regularity is the only axiom of ZFC that really rules out some sort of coincidence in the structures of the sets of $A, B,$ and $C$ that would result in $A\times (B\times C)=(A\times B)\times C$.
