Definition:Relation

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

A relation on $S \times T$ is an ordered triple:
 * $\mathcal R = \left({S, T, R}\right)$

where $R \subseteq S \times T$.

What this means is that a relation relates (certain) elements of one set or class $S$ with (certain) elements of another, $T$.

Not all elements of $S$ need to be related to every (or even any) element of $T$ (but see Trivial Relation).

When $\left({s, t}\right) \in 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 R$, we can write: $s \not \mathrel{\mathcal R} t$, that is, by drawing a line through the relation symbol.

See Complement of Relation.

Notation
By abuse of notation, the usual technique for denoting a relation $\mathcal R$ on $S \times T$ is:
 * $\mathcal R \subseteq S \times T$

thereby endorsing the approach of defining a relation as a subset of a Cartesian product.

Similarly, it is equally common to denote the expression $s \mathrel {\mathcal R} t$ as:
 * $\left({s, t}\right) \in \mathcal R$

While this approach conflates the relation with its truth set, it is sufficiently convenient and widespread as to be endorsed by.

We have not been able to find more mathematically rigorous notations for this that are at the same time not overly unwieldy.

Also known as
In this context, technically speaking, what has been defined can actually be referred to as a binary relation.

In the field of predicate logic, a relation can be seen referred to as a relational property.

Some sources, for example, use the term correspondence for what is defined here as relation, reserving the term relation for what on is defined as endorelation, that is, a relation on $S \times S$ for some set $S$.

As this can cause confusion with the usage of correspondence to mean a relation which is both left-total and right-total, it is recommended that this is not used.

Some sources prefer the term relation between $S$ and $T$ as it can be argued that this provides better emphasis on the existence of the domain and codomain.

refers to a correspondence between $S$ and $T$.

Also see

 * Definition:Endorelation
 * Definition:Correspondence


 * Definition:Mapping


 * Definition:Relational Structure


 * Definition:Domain of Relation
 * Definition:Codomain of Relation
 * Definition:Range


 * Definition:Entourage


 * Definition:Complement of Relation


 * Definition:Characteristic Function of Relation


 * Definition:Trivial Relation, the relation on $S \times T$ in which every element of $S$ is related to every element of $T$.

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