Definition:Relation/General Definition

Definition
Let $\displaystyle \mathbb S = \prod_{i \mathop = 1}^n S_i = S_1 \times S_2 \times \ldots \times S_n$ be the cartesian product of $n$ sets $S_1, S_2, \ldots, S_n$.

An $n$-ary relation on $\Bbb S$ is an ordered $n + 1$-tuple $\mathcal R$ defined as:
 * $\mathcal R = \left({S_1, S_2, \ldots, S_n, R}\right)$

where $R$ is an arbitrary subset $R \subseteq \Bbb S$.

To indicate that $\left({s_1, s_2, \ldots, s_n}\right) \in R$, we write:
 * $\mathcal R \left({s_1, s_2, \ldots, s_n}\right)$