# Clarify Cartesian Products and Binary Operations

So tell me if I'm saying this write.

A Cartesian Product is a function f:X x Y --> Z , where some unknown structural operation on the sets X and Y produces a set Z as its codomain, and Z is a set of ordered pairs (x,y) where x is an element of X and y of Y for all possible values of x and y. And by codomain, while kind of arbitrarily defined, is generally the set of all possible values output by f, the set of ordered pairs (x,y).

Good, so far?

Now, tell me if I'm describing binary operations right.

Now a binary operation, it seems, is a cartesian product f: Y x Y --> Y, where f, an unknown structural operation, operates on the sets Y and Y (which are for all purposes identical) and produces a set Y (identical to the first two) as its codomain. Codomain has the same definition has earlier.

Okay, here's where I get really confused regarding binary operations. From the first definition, it seems that a Cartesian Product is always a set of ordered pairs, but a binary operation is not producing ordered pairs of elements, but single elements that are also members of the set from which the two elements being operated on are members.

Could anyone help me make sense of, help me bridge this--how do I say?--cognitive dissonance?

Thanks.

• How about thinking about it in terms of elements, rather than terms of functions? At least for a start. When you get comfortable enough, you can try and make the switch to talking about functions and whatnot. – Asaf Karagila Aug 28 '14 at 7:38
• Your definition "A Cartesian Product is a function f:X x Y --> Z , where..." is not a meaningfull definition of the cartesian product because it is circular. You define the cartesian prodcut by using the cartesian productof X and Y – miracle173 Aug 28 '14 at 16:57
• from where do you have this definition? – miracle173 Aug 28 '14 at 16:58
• @miracle173 Oh, yeah, you're totally right. Whoops, I goofed! I guess I meant that was the notation. Anyways, I got a really good explanation in my other question: math.stackexchange.com/questions/911697/… – Colin Michael Flaherty Aug 29 '14 at 18:16

## 1 Answer

The cartesian product of two sets : $X,Y$ is a set $Z$ defined as :

$Z = \{ (x,y) \, | \, x \in X \, \text {and} \, y \in Y \}$

where $(x,y)$ is the ordered pair having $x$ as first component and $y$ as second component.

Thus, the cartesian product $X \times Y$ is the set of all ordered pairs with first component in $X$ and second component in $Y$.

A relation $R$ with domain in $X$ and range in $Y$ is a subset of the cartesian product $X \times Y$, i.e. :

$R \subseteq X \times Y$.

Thus, a relation is a set of ordered pairs.

A function $F$ is a relation satisfying the ("functionality") condition :

if $(x_1,y_1) \in F$ and $(x_1,y_2) \in F$, then $y_1=y_2$.

A binary operation $f : Y \times Y \to Y$ is a function from the cartesian product $Y \times Y$ to the set Y, i.e. a subset of $(Y \times Y) \times Y$, because it "maps" an ordered pair $(y_1,y_2)$ into an element $y_3$, with $y_i \in Y$.

You can try to clarify the definitions with some simple examples.

Let $\mathbb N = \{ 0, 1, 2, ... \}$ the set of natural numbers.

Consider the cartesian product $\mathbb N \times \mathbb N$ and :

• the relation $<$ ("Less then"), i.e. $(n,m) \in L$ iff $n < m$,

• the function $s$ ("Successor"), i.e. $(n,m) \in S$ iff $m=s(n)$

• the (binary) operation $+$ ("Plus"), i.e. $((x,y),z) \in P$ iff $z=x+y$.