# Union of Cartesian squares

I am trying to find sufficient and necessary conditions for a relation to be representable as a union of Cartesian squares: $\bigcup_{i\in I}(X_i\times X_i)$ for some family $X_i$ of sets.

One necessary condition is that the relation is symmetric.

-

The relation will necessarily be reflexive and symmetric (except it doesn't need to be reflexive on elements that are not related to anything).

On the other hand, if $R\subseteq A\times A$ is a reflexive symmetric relation, you can take $I=R$ and $X_i=\{a,b\}$ for all $i=(a,b)\in R$.

-
If I take $X_i=\{a,b\}$ then $X_i\times X_i = \{ (a,a), (a,b), (b,a), (b,b) \}$ and thus I see no any reason for $X_i\times X_i \subseteq R$. –  porton Mar 6 '14 at 14:18
@porton: Since $R$ is assumed to be be reflexive it contains $(a,a)$ and $(b,b)$. It contains $(a,b)$ by assumption (since $(a,b)\in I=R$), and therefore $(b,a)$ because it is assumed to be symmetric. –  Henning Makholm Mar 6 '14 at 14:20