In mathematics, a binary relation associates some elements of one set called the domain with some elements of another set (possibly the same) called the codomain. Precisely, a binary relation over sets X and Y is a set of ordered pairs (x,y), where x is an element of X and y is an element of Y. It encodes the common concept of relation: an element x is related to an element y if and only if the pair (x,y) belongs to the set of ordered pairs that defines the binary relation. An example of a binary relation is the "divides" relation over the set of prime numbers ℙ and the set of integers ℤ, in which each prime p is related to each integer z that is a multiple of p, but not to an integer that is not a multiple of p. In this relation, for instance, the prime number 2 is related to numbers such as −4, 0, 6, 10, but not to 1 or 9, just as the prime number 3 is related to 0, 6, and 9, but not to 4 or 13. A binary relation is called a homogeneous relation when X=Y. A binary relation is also called a heterogeneous relation when it is not necessary that X=Y. Binary relations, and especially homogeneous relations, are used in many branches of mathematics to model a wide variety of concepts. These include, among others:
the "is greater than", "is equal to", and "divides" relations in arithmetic; the "is congruent to" relation in geometry; the "is adjacent to" relation in graph theory; the "is orthogonal to" relation in linear algebra. A function may be defined as a binary relation that meets additional constraints. Binary relations are also heavily used in computer science. A binary relation over sets X and Y can be identified with an element of the power set of the Cartesian product X×Y. Since a powerset is a lattice for set inclusion (⊆), relations can be manipulated using set operations (union, intersection, and complementation) and algebra of sets. In some systems of axiomatic set theory, relations are extended to classes, which are generalizations of sets. This extension is needed for, among other things, modeling the concepts of "is an element of" or "is a subset of" in set theory, without running into logical inconsistencies such as Russell's paradox. A binary relation is the most studied special case n=2 of an n-ary relation over sets X1,…,Xn, which is a subset of the Cartesian product X1×⋯×Xn.
Definition Given sets X and Y, the Cartesian product X×Y is defined as {(x,y)∣x∈X and y∈Y}, and its elements are called ordered pairs. A binary relation R over sets X and Y is a subset of X×Y. The set X is called the domain or set of departure of R, and the set Y the codomain or set of destination of R. In order to specify the choices of the sets X and Y, some authors define a binary relation or correspondence as an ordered triple (X,Y,G), where G is a subset of X×Y called the graph of the binary relation. The statement (x,y)∈R reads "x is R-related to y" and is denoted by xRy. The domain of definition or active domain of R is the set of all x such that xRy for at least one y. The codomain of definition, active codomain, image or range of R is the set of all y such that xRy for at least one x. The field of R is the union of its domain of definition and its codomain of definition. When X=Y, a binary relation is called a homogeneous relation (or endorelation). To emphasize the fact that X and Y are allowed to be different, a binary relation is also called a heterogeneous relation. The prefix hetero is from the Greek ἕτερος (heteros, "other, another, different"). A heterogeneous relation has been called a rectangular relation, suggesting that it does not have the square-like symmetry of a homogeneous relation on a set where A=B. Commenting on the development of binary relations beyond homogeneous relations, researchers wrote, "... a variant of the theory has evolved that treats relations from the very beginning as heterogeneous or rectangular, i.e. as relations where the normal case is that they are relations between different sets." The terms correspondence, dyadic relation and two-place relation are synonyms for binary relation, though some authors use the term "binary relation" for any subset of a Cartesian product X×Y without reference to X and Y, and reserve the term "correspondence" for a binary relation with reference to X and Y. In a binary relation, the order of the elements is important; if x≠y then yRx can be true or false independently of xRy. For example, 3 divides 9, but 9 does not divide 3.
Operations
Union If R and S are binary relations over sets X and Y then R∪S={(x,y)∣xRy or xSy} is the union relation of R and S over X and Y. The identity element is the empty relation, in which no x is related to any y. For example, ≤ is the union of < and =, and ≥ is the union of > and =.
Intersection If R and S are binary relations over sets X and Y then R∩S={(x,y)∣xRy and xSy} is the intersection relation of R and S over X and Y. The identity element is the universal relation, in which every x is related to every y. For example, the relation "is divisible by 6" is the intersection of the relations "is divisible by 3" and "is divisible by 2".
Composition
If R is a binary relation over sets X and Y, and S is a binary relation over sets Y and Z then S∘R={(x,z)∣ there exists y∈Y such that xRy and ySz} (also denoted by R;S) is the composition relation of R and S over X and Z. If X=Y=Z, the identity element w.r.t. composition is the identity relation on X, in which x∈X is related only to itself. The order of R and S in the notation S∘R used here agrees with the standard notational order for composition of functions. For example, the composition (is parent of)∘(is mother of) yields (is grandmother of), while the composition (is mother of)∘(is parent of) yields (is maternal grandparent of). For the latter case, if x is the parent of y and y is the mother of z, then x is the maternal grandparent of z.
Converse
If R is a binary relation over sets X and Y then R𝖳={(y,x)∣xRy} is the converse relation, also called inverse relation, of R over Y and X. For example, = is the converse of itself, as is ≠, and < and > are each other's converse, as are ≤ and ≥. A binary relation is equal to its converse if and only if it is symmetric.
Complement
… excerpt ends here. Continue reading the full article.




