The standard way of defining a relation R on a set X is as some subset of (X x X). We write aRb if and only if (a,b) is in R. Some particularly important kind of relations are MathematicalFunction
?s,
EquivalenceRelations, and partial orders (see
PartialOrderedSet).
A relation can also be thought of as a function R: (X x X) -> {0,1} where R(x,y)=1 if xRy and R(x,y)=0 if not. This defines a BooleanAlgebra for the relations on X in a natural way.