Cartesian Product

Let $A$ and $B$ be two sets, the Cartesian Product of $A$ and $B$ is

$$ A \times B \triangleq \{(a, b): a \in A, b \in B\}

$$

$$ |A \times B| = m \times n $$

$$ \begin{aligned} A_1 \times A_2 \times ... \times A_k &\triangleq \{(a_1, a_2, ..., a_k): a_1 \in A_2, ...\}, \\ A^k &\triangleq \overbrace{A \times A \times ... \times A}^{k}

\end{aligned} $$

Relation

A subset of $A \times B$ is called a relation from $A$ to $B$

A subset of $A \times A$ is called a binary relation on $A$

If $|A| = m$ and $|B| = n$, then there are

$$ 2^{mn} $$

relations from $A$ to $B$

Functions