The standard way of defining a relation R between a set X and a set Y is as some subset of (X x Y). We write aRb if and only if (a,b) is in R. This can also be looked at as a mapping from (X x Y) to 2={0,1}.
Some particularly important kind of relations are MappinGs, EquivalenceRelations, and PartialOrders.