A ternary relation (or triadic relation) is a relation in three variables (instead of the more common two of a binary relation).
The elementary theory of categories (in the strict sense) may be defined with a single ternary relation (and several axioms) in untyped predicate logic with equality; the relation holds of morphisms , , and if and only if is the composite (in a fixed order) of and .