Ternary relation

Just as a binary relation is formally defined as a set of pairs, i.e. a subset of the Cartesian product A × B of some sets A and B, so a ternary relation is a set of triples, forming a subset of the Cartesian product A × B × C of three sets A, B and C. An example of a ternary relation in elementary geometry can be given on triples of points, where a triple is in the relation if the three points are collinear.

Another geometric example can be obtained by considering triples consisting of two points and a line, where a triple is in the ternary relation if the two points determine (are incident with) the line.

This makes the graph of f a ternary relation between A, B and C, consisting of all triples (a, b, f(a, b)), satisfying a in A, b in B, and f(a, b) in C. Given any set A whose elements are arranged on a circle, one can define a ternary relation R on A, i.e. a subset of A3 = A × A × A, by stipulating that R(a, b, c) holds if and only if the elements a, b and c are pairwise different and when going from a to c in a clockwise direction one passes through b.

The ordinary congruence of arithmetics which holds for three integers a, b, and m if and only if m divides a − b, formally may be considered as a ternary relation.

The mutual equivalences of these forms, constructed from the ternary relation (A, B, C), are called the Schröder rules.