Definition:Relation

Definition
Let $S \times T$ be the cartesian product of two sets $S$ and $T$.

A relation (in this context, technically speaking, a binary relation) on $S \times T$ is an arbitrary subset $\mathcal R \subseteq S \times T$.

What this means is that a binary relation relates (certain) elements of one set with (certain) elements of another.

Not all elements in $S$ need to be related to every relation in $T$ (but see Trivial Relation, which is a relation in which they are).

When $\left({s, t}\right) \in \mathcal R$, we can write:
 * $s \mathrel {\mathcal R} t$

or:
 * $\mathcal R \left({s, t}\right)$.

and can say $s$ bears $\mathcal R$ to $t$.

If $\left({s, t}\right) \notin \mathcal R$, we can write: $s \mathrel{\not \mathcal R} t$, that is, by drawing a line through the relation symbol. See Complement of Relation.

Note
It is not formally correct to consider a relation as consisting of merely the set $\mathcal R$, as this renders the concept of codomain ill-defined.

Formally, when considering a relation as the ordered pair $\left({S \times T, \mathcal R}\right)$, the concept of codomain is, in general, still ill-defined for the same reason. In the case that $S$ is empty, it follows that $S \times T$ is empty, but $T$ is not uniquely determined.

The interpretation of a relation as the ordered triple $\left({S, T, \mathcal R}\right)$ removes this issue.

In can also be noted that the term "relation on $S \times T$" does not, in general, specify either the domain or the codomain of the relation.

On the other hand, the alternative term "relation between $S$ and $T$" does. In addition, it removes the potential ambiguity of the phrase "relation on $S \times T$", which can refer to either a subset of $S \times T$ or a subset of $\left({S \times T}\right) \times \left({S \times T}\right)$, as the word "relation" is often substituted for "endorelation". Arguably, the former use renders the term "relation" superfluous, as (in that case) the phrase "relation on" is (by definition) synonymous with "subset of".

Also see

 * Mapping


 * Relational Structure


 * Domain
 * Range


 * Entourage


 * Complement of Relation


 * Characteristic Function of a Relation

Linguistic Note
In natural language what we have defined as a relation is usually understood as a relationship.

Technical Note
The expression:


 * $s \mathrel{\mathcal R} t$

is produced by the following $\LaTeX$ code:

s \mathrel{\mathcal R} t