Binary relation

Revision as of 20:17, 22 May 2025 by imported>JayBeeEll (Restored revision 1291346643 by Jochen Burghardt (talk): This is silly, no one reading this could be confused about whether these are the same)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description {{#invoke:Hatnote|hatnote}} Template:Binary relations

File:Illustration of a binary relationship R.svg
An example of a binary relation R between two finite sets of natural numbers, A and B. Note that R is a subset of the Cartesian product, A × B. In this example, R = {(a, b) ∈ A × B: a < b}

In mathematics, a binary relation associates some elements of one set called the domain with some elements of another set called the codomain.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Precisely, a binary relation over sets <math>X</math> and <math>Y</math> is a set of ordered pairs <math>(x, y)</math>, where <math>x</math> is an element of <math>X</math> and <math>y</math> is an element of <math>Y</math>.<ref name="Codd1970">Template:Cite journal</ref> It encodes the common concept of relation: an element <math>x</math> is related to an element <math>y</math>, if and only if the pair <math>(x, y)</math> 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 <math>\mathbb{P}</math> and the set of integers <math>\mathbb{Z}</math>, in which each prime <math>p</math> is related to each integer <math>z</math> that is a multiple of <math>p</math>, but not to an integer that is not a multiple of <math>p</math>. In this relation, for instance, the prime number <math>2</math> is related to numbers such as <math>-4</math>, <math>0</math>, <math>6</math>, <math>10</math>, but not to <math>1</math> or <math>9</math>, just as the prime number <math>3</math> is related to <math>0</math>, <math>6</math>, and <math>9</math>, but not to <math>4</math> or <math>13</math>.

Binary relations, and especially homogeneous relations, are used in many branches of mathematics to model a wide variety of concepts. These include, among others:

A function may be defined as a binary relation that meets additional constraints.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> Binary relations are also heavily used in computer science.

A binary relation over sets <math>X</math> and <math>Y</math> is an element of the power set of <math>X \times Y.</math> Since the latter set is ordered by inclusion (<math>\subseteq</math>), each relation has a place in the lattice of subsets of <math>X \times Y.</math> A binary relation is called a homogeneous relation when <math>X = Y</math>. A binary relation is also called a heterogeneous relation when it is not necessary that <math>X = Y</math>.

Since relations are sets, they can be manipulated using set operations, including union, intersection, and complementation, and satisfying the laws of an algebra of sets. Beyond that, operations like the converse of a relation and the composition of relations are available, satisfying the laws of a calculus of relations, for which there are textbooks by Ernst Schröder,<ref name="Schroder.1895">Ernst Schröder (1895) Algebra und Logic der Relative, via Internet Archive</ref> Clarence Lewis,<ref name="Lewis.1918">C. I. Lewis (1918) A Survey of Symbolic Logic, pages 269–279, via internet Archive</ref> and Gunther Schmidt.<ref name=gs>Gunther Schmidt, 2010. Relational Mathematics. Cambridge University Press, Template:ISBN, Chapt. 5</ref> A deeper analysis of relations involves decomposing them into subsets called concepts, and placing them in a complete lattice.

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 <math>n = 2</math> of an <math>n</math>-ary relation over sets <math>X_1, \dots, X_n</math>, which is a subset of the Cartesian product <math>X_1 \times \cdots \times X_n.</math><ref name="Codd1970"/>

DefinitionEdit

Given sets <math>X</math> and <math>Y</math>, the Cartesian product <math>X \times Y</math> is defined as <math>\{ (x, y) \mid x \in X \text{ and } y \in Y \},</math> and its elements are called ordered pairs.

A Template:Em <math>R</math> over sets <math>X</math> and <math>Y</math> is a subset of <math>X \times Y.</math><ref name="Codd1970" /><ref>Template:Harvnb</ref> The set <math>X</math> is called the Template:Em<ref name="Codd1970" /> or Template:Em of <math>R</math>, and the set <math>Y</math> the Template:Em or Template:Em of <math>R</math>. In order to specify the choices of the sets <math>X</math> and <math>Y</math>, some authors define a Template:Em or Template:Em as an ordered triple <math>(X, Y, G)</math>, where <math>G</math> is a subset of <math>X \times Y</math> called the Template:Em of the binary relation. The statement <math>(x, y) \in R</math> reads "<math>x</math> is <math>R</math>-related to <math>y</math>" and is denoted by <math>xRy</math>.<ref name="Schroder.1895"/><ref name="Lewis.1918"/><ref name=gs/><ref group="note">Authors who deal with binary relations only as a special case of <math>n</math>-ary relations for arbitrary <math>n</math> usually write <math>Rxy</math> as a special case of <math>Rx_1\dots x_n</math> (prefix notation).<ref>Template:Cite book Sect.II.§1.1.4</ref></ref> The Template:Em or Template:Em<ref name="Codd1970" /> of <math>R</math> is the set of all <math>x</math> such that <math>xRy</math> for at least one <math>y</math>. The codomain of definition, Template:Em,<ref name="Codd1970" /> Template:Em or Template:Em of <math>R</math> is the set of all <math>y</math> such that <math>xRy</math> for at least one <math>x</math>. The Template:Em of <math>R</math> is the union of its domain of definition and its codomain of definition.<ref name="suppes"> Template:Cite book </ref><ref name="smullyan"> Template:Cite book </ref><ref name="levy"> Template:Cite book </ref>

When <math>X = Y,</math> a binary relation is called a Template:Em (or Template:Em). To emphasize the fact that <math>X</math> and <math>Y</math> are allowed to be different, a binary relation is also called a heterogeneous relation.<ref name="Schmidt">Template:Cite book</ref><ref name="FloudasPardalos2008">Template:Cite book</ref><ref name="Winter2007">Template:Cite book</ref> The prefix hetero is from the Greek ἕτερος (heteros, "other, another, different").

A heterogeneous relation has been called a rectangular relation,<ref name="Winter2007"/> suggesting that it does not have the square-like symmetry of a homogeneous relation on a set where <math>A = B.</math> 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 Template:Em or Template:Em, i.e. as relations where the normal case is that they are relations between different sets."<ref>G. Schmidt, Claudia Haltensperger, and Michael Winter (1997) "Heterogeneous relation algebra", chapter 3 (pages 37 to 53) in Relational Methods in Computer Science, Advances in Computer Science, Springer books Template:ISBN</ref>

The terms correspondence,<ref>Jacobson, Nathan (2009), Basic Algebra II (2nd ed.) § 2.1.</ref> 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 <math>X \times Y</math> without reference to <math>X</math> and <math>Y</math>, and reserve the term "correspondence" for a binary relation with reference to <math>X</math> and <math>Y</math>.Template:Citation needed

In a binary relation, the order of the elements is important; if <math>x \neq y</math> then <math>yRx</math> can be true or false independently of <math>xRy</math>. For example, <math>3</math> divides <math>9</math>, but <math>9</math> does not divide <math>3</math>.

OperationsEdit

UnionEdit

If <math>R</math> and <math>S</math> are binary relations over sets <math>X</math> and <math>Y</math> then <math>R \cup S = \{ (x, y) \mid xRy \text{ or } xSy \}</math> is the Template:Em of <math>R</math> and <math>S</math> over <math>X</math> and <math>Y</math>.

The identity element is the empty relation. For example, <math>\leq</math> is the union of < and =, and <math>\geq</math> is the union of > and =.

IntersectionEdit

If <math>R</math> and <math>S</math> are binary relations over sets <math>X</math> and <math>Y</math> then <math>R \cap S = \{ (x, y) \mid xRy \text{ and } xSy \}</math> is the Template:Em of <math>R</math> and <math>S</math> over <math>X</math> and <math>Y</math>.

The identity element is the universal relation. For example, the relation "is divisible by 6" is the intersection of the relations "is divisible by 3" and "is divisible by 2".

CompositionEdit

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}} If <math>R</math> is a binary relation over sets <math>X</math> and <math>Y</math>, and <math>S</math> is a binary relation over sets <math>Y</math> and <math>Z</math> then <math>S \circ R = \{ (x, z) \mid \text{ there exists } y \in Y \text{ such that } xRy \text{ and } ySz \}</math> (also denoted by <math>R; S</math>) is the Template:Em of <math>R</math> and <math>S</math> over <math>X</math> and <math>Z</math>.

The identity element is the identity relation. The order of <math>R</math> and <math>S</math> in the notation <math>S \circ R,</math> used here agrees with the standard notational order for composition of functions. For example, the composition (is parent of)<math>\circ</math>(is mother of) yields (is maternal grandparent of), while the composition (is mother of)<math>\circ</math>(is parent of) yields (is grandmother of). For the former case, if <math>x</math> is the parent of <math>y</math> and <math>y</math> is the mother of <math>z</math>, then <math>x</math> is the maternal grandparent of <math>z</math>.

ConverseEdit

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}} Template:See also If <math>R</math> is a binary relation over sets <math>X</math> and <math>Y</math> then <math>R^\textsf{T} = \{ (y, x) \mid xRy \}</math> is the Template:Em,<ref>Garrett Birkhoff & Thomas Bartee (1970) Modern Applied Algebra, page 35, McGraw-Hill</ref> also called Template:Em,<ref>Mary P. Dolciani (1962) Modern Algebra: Structure and Method, Book 2, page 339, Houghton Mifflin</ref> of <math>R</math> over <math>Y</math> and <math>X</math>.

For example, <math>=</math> is the converse of itself, as is <math>\neq</math>, and <math><</math> and <math>></math> are each other's converse, as are <math>\leq</math> and <math>\geq.</math> A binary relation is equal to its converse if and only if it is symmetric.

ComplementEdit

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}} If <math>R</math> is a binary relation over sets <math>X</math> and <math>Y</math> then <math>\bar{R} = \{ (x, y) \mid \neg xRy \}</math> (also denoted by <math>\neg R</math>) is the Template:Em of <math>R</math> over <math>X</math> and <math>Y</math>.

For example, <math>=</math> and <math>\neq</math> are each other's complement, as are <math>\subseteq</math> and <math>\not \subseteq</math>, <math>\supseteq</math> and <math>\not \supseteq</math>, <math>\in</math> and <math>\not \in</math>, and for total orders also <math><</math> and <math>\geq</math>, and <math>></math> and <math>\leq</math>.

The complement of the converse relation <math>R^\textsf{T}</math> is the converse of the complement: <math>\overline{R^\mathsf{T}} = \bar{R}^\mathsf{T}.</math>

If <math>X = Y,</math> the complement has the following properties:

  • If a relation is symmetric, then so is the complement.
  • The complement of a reflexive relation is irreflexive—and vice versa.
  • The complement of a strict weak order is a total preorder—and vice versa.

RestrictionEdit

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}} If <math>R</math> is a binary homogeneous relation over a set <math>X</math> and <math>S</math> is a subset of <math>X</math> then <math>R_{\vert S} = \{ (x, y) \mid xRy \text{ and } x \in S \text{ and } y \in S \}</math> is the Template:Em of <math>R</math> to <math>S</math> over <math>X</math>.

If <math>R</math> is a binary relation over sets <math>X</math> and <math>Y</math> and if <math>S</math> is a subset of <math>X</math> then <math>R_{\vert S} = \{ (x, y) \mid xRy \text{ and } x \in S \}</math> is the Template:Em of <math>R</math> to <math>S</math> over <math>X</math> and <math>Y</math>.Template:Clarify

If a relation is reflexive, irreflexive, symmetric, antisymmetric, asymmetric, transitive, total, trichotomous, a partial order, total order, strict weak order, total preorder (weak order), or an equivalence relation, then so too are its restrictions.

However, the transitive closure of a restriction is a subset of the restriction of the transitive closure, i.e., in general not equal. For example, restricting the relation "<math>x</math> is parent of <math>y</math>" to females yields the relation "<math>x</math> is mother of the woman <math>y</math>"; its transitive closure does not relate a woman with her paternal grandmother. On the other hand, the transitive closure of "is parent of" is "is ancestor of"; its restriction to females does relate a woman with her paternal grandmother.

Also, the various concepts of completeness (not to be confused with being "total") do not carry over to restrictions. For example, over the real numbers a property of the relation <math>\leq</math> is that every non-empty subset <math>S \subseteq \R</math> with an upper bound in <math>\R</math> has a least upper bound (also called supremum) in <math>\R.</math> However, for the rational numbers this supremum is not necessarily rational, so the same property does not hold on the restriction of the relation <math>\leq</math> to the rational numbers.

A binary relation <math>R</math> over sets <math>X</math> and <math>Y</math> is said to be Template:Em a relation <math>S</math> over <math>X</math> and <math>Y</math>, written <math>R \subseteq S,</math> if <math>R</math> is a subset of <math>S</math>, that is, for all <math>x \in X</math> and <math>y \in Y,</math> if <math>xRy</math>, then <math>xSy</math>. If <math>R</math> is contained in <math>S</math> and <math>S</math> is contained in <math>R</math>, then <math>R</math> and <math>S</math> are called Template:Em written <math>R = S</math>. If <math>R</math> is contained in <math>S</math> but <math>S</math> is not contained in <math>R</math>, then <math>R</math> is said to be Template:Em than <math>S</math>, written <math>R \subsetneq S.</math> For example, on the rational numbers, the relation <math>></math> is smaller than <math>\geq</math>, and equal to the composition <math>> \circ ></math>.

Matrix representationEdit

Binary relations over sets <math>X</math> and <math>Y</math> can be represented algebraically by logical matrices indexed by <math>X</math> and <math>Y</math> with entries in the Boolean semiring (addition corresponds to OR and multiplication to AND) where matrix addition corresponds to union of relations, matrix multiplication corresponds to composition of relations (of a relation over <math>X</math> and <math>Y</math> and a relation over <math>Y</math> and <math>Z</math>),<ref>Template:Cite newsgroup</ref> the Hadamard product corresponds to intersection of relations, the zero matrix corresponds to the empty relation, and the matrix of ones corresponds to the universal relation. Homogeneous relations (when <math>X = Y</math>) form a matrix semiring (indeed, a matrix semialgebra over the Boolean semiring) where the identity matrix corresponds to the identity relation.<ref name="droste">Droste, M., & Kuich, W. (2009). Semirings and Formal Power Series. Handbook of Weighted Automata, 3–28. {{#invoke:doi|main}}, pp. 7-10</ref>

ExamplesEdit

2nd example relation
Template:Diagonal split header ball car doll cup
John +
Mary +
Venus +
1st example relation
Template:Diagonal split header ball car doll cup
John +
Mary +
Ian
Venus +

Template:Olist

Types of binary relationsEdit

File:The four types of binary relations.png
Examples of four types of binary relations over the real numbers: one-to-one (in green), one-to-many (in blue), many-to-one (in red), many-to-many (in black).

Some important types of binary relations <math>R</math> over sets <math>X</math> and <math>Y</math> are listed below.

Uniqueness properties:

  • Injective<ref name="vangasteren1990">Van Gasteren 1990, p. 45.</ref> (also called left-unique<ref name="kilp2000">Kilp, Knauer, Mikhalev 2000, p. 3.</ref>): for all <math>x, y \in X</math> and all <math>z \in Y,</math> if <math>xRz</math> and <math>yRz</math> then <math>x = y</math>. In other words, every element of the codomain has at most one preimage element. For such a relation, <math>Y</math> is called a primary key of <math>R</math>.<ref name="Codd1970" /> For example, the green and blue binary relations in the diagram are injective, but the red one is not (as it relates both <math>-1</math> and <math>1</math> to <math>1</math>), nor the black one (as it relates both <math>-1</math> and <math>1</math> to <math>0</math>).
  • Functional<ref name="vangasteren1990" /><ref>{{#invoke:citation/CS1|citation

|CitationClass=web }}</ref><ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> (also called right-unique<ref name="kilp2000" /> or univalent<ref>Schmidt 2010, p. 49.</ref>): for all <math>x \in X</math> and all <math>y, z \in Y,</math> if <math>xRy</math> and <math>xRz</math> then <math>y = z</math>. In other words, every element of the domain has at most one image element. Such a binary relation is called a Template:Em or Template:Em.<ref>Kilp, Knauer, Mikhalev 2000, p. 4.</ref> For such a relation, <math>\{ X \}</math> is called Template:Em of <math>R</math>.<ref name="Codd1970" /> For example, the red and green binary relations in the diagram are functional, but the blue one is not (as it relates <math>1</math> to both <math>1</math> and <math>-1</math>), nor the black one (as it relates <math>0</math> to both <math>-1</math> and <math>1</math>).

  • One-to-one: injective and functional. For example, the green binary relation in the diagram is one-to-one, but the red, blue and black ones are not.
  • One-to-many: injective and not functional. For example, the blue binary relation in the diagram is one-to-many, but the red, green and black ones are not.
  • Many-to-one: functional and not injective. For example, the red binary relation in the diagram is many-to-one, but the green, blue and black ones are not.
  • Many-to-many: not injective nor functional. For example, the black binary relation in the diagram is many-to-many, but the red, green and blue ones are not.

Totality properties (only definable if the domain <math>X</math> and codomain <math>Y</math> are specified):

  • Total<ref name="vangasteren1990" /> (also called left-total<ref name="kilp2000" />): for all <math>x \in X</math> there exists a <math>y \in Y</math> such that <math>xRy</math>. In other words, every element of the domain has at least one image element. In other words, the domain of definition of <math>R</math> is equal to <math>X</math>. This property, is different from the definition of Template:Em (also called Template:Em by some authors)Template:Citation needed in Properties. Such a binary relation is called a Template:Em. For example, the red and green binary relations in the diagram are total, but the blue one is not (as it does not relate <math>-1</math> to any real number), nor the black one (as it does not relate <math>2</math> to any real number). As another example, <math>></math> is a total relation over the integers. But it is not a total relation over the positive integers, because there is no <math>y</math> in the positive integers such that <math>1 > y</math>.<ref>Template:Cite journal.</ref> However, <math><</math> is a total relation over the positive integers, the rational numbers and the real numbers. Every reflexive relation is total: for a given <math>x</math>, choose <math>y = x</math>.
  • Surjective<ref name="vangasteren1990" /> (also called right-total<ref name="kilp2000" />): for all <math>y \in Y</math>, there exists an <math>x \in X</math> such that <math>xRy</math>. In other words, every element of the codomain has at least one preimage element. In other words, the codomain of definition of <math>R</math> is equal to <math>Y</math>. For example, the green and blue binary relations in the diagram are surjective, but the red one is not (as it does not relate any real number to <math>-1</math>), nor the black one (as it does not relate any real number to <math>2</math>).

Uniqueness and totality properties (only definable if the domain <math>X</math> and codomain <math>Y</math> are specified):

  • A function (also called mapping<ref name="kilp2000" />): a binary relation that is functional and total. In other words, every element of the domain has exactly one image element. For example, the red and green binary relations in the diagram are functions, but the blue and black ones are not.
  • An injection: a function that is injective. For example, the green relation in the diagram is an injection, but the red one is not; the black and the blue relation is not even a function.
  • A surjection: a function that is surjective. For example, the green relation in the diagram is a surjection, but the red one is not.
  • A bijection: a function that is injective and surjective. In other words, every element of the domain has exactly one image element and every element of the codomain has exactly one preimage element. For example, the green binary relation in the diagram is a bijection, but the red one is not.

Template:AnchorIf relations over proper classes are allowed:

  • Set-like (also called local): for all <math>x \in X</math>, the class of all <math>y \in Y</math> such that <math>yRx</math>, i.e. <math>\{y \in Y, yRx\}</math>, is a set. For example, the relation <math>\in</math> is set-like, and every relation on two sets is set-like.<ref>Template:Cite book</ref> The usual ordering < over the class of ordinal numbers is a set-like relation, while its inverse > is not.Template:Citation needed

Sets versus classesEdit

Certain mathematical "relations", such as "equal to", "subset of", and "member of", cannot be understood to be binary relations as defined above, because their domains and codomains cannot be taken to be sets in the usual systems of axiomatic set theory. For example, to model the general concept of "equality" as a binary relation <math>=</math>, take the domain and codomain to be the "class of all sets", which is not a set in the usual set theory.

In most mathematical contexts, references to the relations of equality, membership and subset are harmless because they can be understood implicitly to be restricted to some set in the context. The usual work-around to this problem is to select a "large enough" set <math>A</math>, that contains all the objects of interest, and work with the restriction <math>=_A</math> instead of <math>=</math>. Similarly, the "subset of" relation <math>\subseteq</math> needs to be restricted to have domain and codomain <math>P(A)</math> (the power set of a specific set <math>A</math>): the resulting set relation can be denoted by <math>\subseteq_A.</math> Also, the "member of" relation needs to be restricted to have domain <math>A</math> and codomain <math>P(A)</math> to obtain a binary relation <math>\in_A</math> that is a set. Bertrand Russell has shown that assuming <math>\in</math> to be defined over all sets leads to a contradiction in naive set theory, see Russell's paradox.

Another solution to this problem is to use a set theory with proper classes, such as NBG or Morse–Kelley set theory, and allow the domain and codomain (and so the graph) to be proper classes: in such a theory, equality, membership, and subset are binary relations without special comment. (A minor modification needs to be made to the concept of the ordered triple <math>(X, Y, G)</math>, as normally a proper class cannot be a member of an ordered tuple; or of course one can identify the binary relation with its graph in this context.)<ref>Template:Cite book</ref> With this definition one can for instance define a binary relation over every set and its power set.

Homogeneous relationEdit

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}} A homogeneous relation over a set <math>X</math> is a binary relation over <math>X</math> and itself, i.e. it is a subset of the Cartesian product <math>X \times X.</math><ref name="Winter2007"/><ref name="Müller2012">Template:Cite book</ref><ref name="PahlDamrath2001-p496">Template:Cite book</ref> It is also simply called a (binary) relation over <math>X</math>.

A homogeneous relation <math>R</math> over a set <math>X</math> may be identified with a directed simple graph permitting loops, where <math>X</math> is the vertex set and <math>R</math> is the edge set (there is an edge from a vertex <math>x</math> to a vertex <math>y</math> if and only if <math>xRy</math>). The set of all homogeneous relations <math>\mathcal{B}(X)</math> over a set <math>X</math> is the power set <math>2^{X \times X}</math> which is a Boolean algebra augmented with the involution of mapping of a relation to its converse relation. Considering composition of relations as a binary operation on <math>\mathcal{B}(X)</math>, it forms a semigroup with involution.

Some important properties that a homogeneous relation <math>R</math> over a set <math>X</math> may have are:

  • Template:Em: for all <math>x \in X,</math> <math>xRx</math>. For example, <math>\geq</math> is a reflexive relation but > is not.
  • Template:Em: for all <math>x \in X,</math> not <math>xRx</math>. For example, <math>></math> is an irreflexive relation, but <math>\geq</math> is not.
  • Template:Em: for all <math>x, y \in X,</math> if <math>xRy</math> then <math>yRx</math>. For example, "is a blood relative of" is a symmetric relation.
  • Template:Em: for all <math>x, y \in X,</math> if <math>xRy</math> and <math>yRx</math> then <math>x = y.</math> For example, <math>\geq</math> is an antisymmetric relation.<ref>Template:Citation</ref>
  • Template:Em: for all <math>x, y \in X,</math> if <math>xRy</math> then not <math>yRx</math>. A relation is asymmetric if and only if it is both antisymmetric and irreflexive.<ref>Template:Citation.</ref> For example, > is an asymmetric relation, but <math>\geq</math> is not.
  • Template:Em: for all <math>x, y, z \in X,</math> if <math>xRy</math> and <math>yRz</math> then <math>xRz</math>. A transitive relation is irreflexive if and only if it is asymmetric.<ref>Template:Cite book Lemma 1.1 (iv). This source refers to asymmetric relations as "strictly antisymmetric".</ref> For example, "is ancestor of" is a transitive relation, while "is parent of" is not.
  • Template:Em: for all <math>x, y \in X,</math> if <math>x \neq y</math> then <math>xRy</math> or <math>yRx</math>.
  • Template:Em: for all <math>x, y \in X,</math> <math>xRy</math> or <math>yRx</math>.
  • Template:Em: for all <math>x, y \in X,</math> if <math>xRy ,</math> then some <math>z \in X</math> exists such that <math>xRz</math> and <math>zRy</math>.

A Template:Em is a relation that is reflexive, antisymmetric, and transitive. A Template:Em is a relation that is irreflexive, asymmetric, and transitive. A Template:Em is a relation that is reflexive, antisymmetric, transitive and connected.<ref>Joseph G. Rosenstein, Linear orderings, Academic Press, 1982, Template:ISBN, p. 4</ref> A Template:Em is a relation that is irreflexive, asymmetric, transitive and connected. An Template:Em is a relation that is reflexive, symmetric, and transitive. For example, "<math>x</math> divides <math>y</math>" is a partial, but not a total order on natural numbers <math>\N,</math> "<math>x < y</math>" is a strict total order on <math>\N,</math> and "<math>x</math> is parallel to <math>y</math>" is an equivalence relation on the set of all lines in the Euclidean plane.

All operations defined in section Template:Slink also apply to homogeneous relations. Beyond that, a homogeneous relation over a set <math>X</math> may be subjected to closure operations like:

Template:Em
the smallest reflexive relation over <math>X</math> containing <math>R</math>,
Template:Em
the smallest transitive relation over <math>X</math> containing <math>R</math>,
Template:Em
the smallest equivalence relation over <math>X</math> containing <math>R</math>.

Calculus of relationsEdit

Developments in algebraic logic have facilitated usage of binary relations. The calculus of relations includes the algebra of sets, extended by composition of relations and the use of converse relations. The inclusion <math>R \subseteq S,</math> meaning that <math>aRb</math> implies <math>aSb</math>, sets the scene in a lattice of relations. But since <math>P \subseteq Q \equiv (P \cap \bar{Q} = \varnothing ) \equiv (P \cap Q = P),</math> the inclusion symbol is superfluous. Nevertheless, composition of relations and manipulation of the operators according to Schröder rules, provides a calculus to work in the power set of <math>A \times B.</math>

In contrast to homogeneous relations, the composition of relations operation is only a partial function. The necessity of matching target to source of composed relations has led to the suggestion that the study of heterogeneous relations is a chapter of category theory as in the category of sets, except that the morphisms of this category are relations. The Template:Em of the category Rel are sets, and the relation-morphisms compose as required in a category.Template:Citation needed

Induced concept latticeEdit

Binary relations have been described through their induced concept lattices: A concept <math>C \subset R</math> satisfies two properties:

For a given relation <math>R \subseteq X \times Y,</math> the set of concepts, enlarged by their joins and meets, forms an "induced lattice of concepts", with inclusion <math>\sqsubseteq</math> forming a preorder.

The MacNeille completion theorem (1937) (that any partial order may be embedded in a complete lattice) is cited in a 2013 survey article "Decomposition of relations on concept lattices".<ref>R. Berghammer & M. Winter (2013) "Decomposition of relations on concept lattices", Fundamenta Informaticae 126(1): 37–82 {{#invoke:doi|main}}</ref> The decomposition is

<math>R = f E g^\textsf{T}</math>, where <math>f</math> and <math>g</math> are functions, called Template:Em or left-total, functional relations in this context. The "induced concept lattice is isomorphic to the cut completion of the partial order <math>E</math> that belongs to the minimal decomposition <math>(f, g, E)</math> of the relation <math>R</math>."

Particular cases are considered below: <math>E</math> total order corresponds to Ferrers type, and <math>E</math> identity corresponds to difunctional, a generalization of equivalence relation on a set.

Relations may be ranked by the Schein rank which counts the number of concepts necessary to cover a relation.<ref>Ki-Hang Kim (1982) Boolean Matrix Theory and Applications, page 37, Marcel Dekker Template:ISBN</ref> Structural analysis of relations with concepts provides an approach for data mining.<ref>Ali Jaoua, Rehab Duwairi, Samir Elloumi, and Sadok Ben Yahia (2009) "Data mining, reasoning and incremental information retrieval through non enlargeable rectangular relation coverage", pages 199 to 210 in Relations and Kleene algebras in computer science, Lecture Notes in Computer Science 5827, Springer Template:Mr</ref>

Particular relationsEdit

  • Proposition: If <math>R</math> is a surjective relation and <math>R^\mathsf{T}</math> is its transpose, then <math>I \subseteq R^\textsf{T} R</math> where <math>I</math> is the <math>m \times m</math> identity relation.
  • Proposition: If <math>R</math> is a serial relation, then <math>I \subseteq R R^\textsf{T}</math> where <math>I</math> is the <math>n \times n</math> identity relation.

DifunctionalEdit

Template:Anchor The idea of a difunctional relation is to partition objects by distinguishing attributes, as a generalization of the concept of an equivalence relation. One way this can be done is with an intervening set <math>Z = \{ x, y, z, \ldots \}</math> of indicators. The partitioning relation <math>R = F G^\textsf{T}</math> is a composition of relations using Template:Em relations <math>F \subseteq A \times Z \text{ and } G \subseteq B \times Z.</math> Jacques Riguet named these relations difunctional since the composition <math>F G^\mathsf{T}</math> involves functional relations, commonly called partial functions.

In 1950 Riguet showed that such relations satisfy the inclusion:<ref>Template:Cite journal</ref>

<math display=block>R R^\textsf{T} R \subseteq R</math>

In automata theory, the term rectangular relation has also been used to denote a difunctional relation. This terminology recalls the fact that, when represented as a logical matrix, the columns and rows of a difunctional relation can be arranged as a block matrix with rectangular blocks of ones on the (asymmetric) main diagonal.<ref name="Büchi1989">Template:Cite book</ref> More formally, a relation <math>R</math> on <math>X \times Y</math> is difunctional if and only if it can be written as the union of Cartesian products <math>A_i \times B_i</math>, where the <math>A_i</math> are a partition of a subset of <math>X</math> and the <math>B_i</math> likewise a partition of a subset of <math>Y</math>.<ref>Template:Cite journal</ref>

Using the notation <math>\{y \mid xRy\} = xR</math>, a difunctional relation can also be characterized as a relation <math>R</math> such that wherever <math>x_1 R</math> and <math>x_2 R</math> have a non-empty intersection, then these two sets coincide; formally <math>x_1 \cap x_2 \neq \varnothing</math> implies <math>x_1 R = x_2 R.</math><ref name="BrinkKahl1997">Template:Cite book</ref>

In 1997 researchers found "utility of binary decomposition based on difunctional dependencies in database management."<ref>Ali Jaoua, Nadin Belkhiter, Habib Ounalli, and Theodore Moukam (1997) "Databases", pages 197–210 in Relational Methods in Computer Science, edited by Chris Brink, Wolfram Kahl, and Gunther Schmidt, Springer Science & Business Media Template:Isbn</ref> Furthermore, difunctional relations are fundamental in the study of bisimulations.<ref>Template:Cite book</ref>

In the context of homogeneous relations, a partial equivalence relation is difunctional.

Ferrers typeEdit

A strict order on a set is a homogeneous relation arising in order theory. In 1951 Jacques Riguet adopted the ordering of an integer partition, called a Ferrers diagram, to extend ordering to binary relations in general.<ref>J. Riguet (1951) "Les relations de Ferrers", Comptes Rendus 232: 1729,30</ref>

The corresponding logical matrix of a general binary relation has rows which finish with a sequence of ones. Thus the dots of a Ferrer's diagram are changed to ones and aligned on the right in the matrix.

An algebraic statement required for a Ferrers type relation R is <math display="block">R \bar{R}^\textsf{T} R \subseteq R.</math>

If any one of the relations <math>R, \bar{R}, R^\textsf{T}</math> is of Ferrers type, then all of them are. <ref name="Schmidt p.77">Template:Cite book</ref>

ContactEdit

Suppose <math>B</math> is the power set of <math>A</math>, the set of all subsets of <math>A</math>. Then a relation <math>g</math> is a contact relation if it satisfies three properties:

  1. <math>\text{for all } x \in A, Y = \{ x \} \text{ implies } xgY.</math>
  2. <math>Y \subseteq Z \text{ and } xgY \text{ implies } xgZ.</math>
  3. <math>\text{for all } y \in Y, ygZ \text{ and } xgY \text{ implies } xgZ.</math>

The set membership relation, <math>\epsilon = </math> "is an element of", satisfies these properties so <math>\epsilon</math> is a contact relation. The notion of a general contact relation was introduced by Georg Aumann in 1970.<ref>Template:Cite journal</ref><ref>Anne K. Steiner (1970) Review:Kontakt-Relationen from Mathematical Reviews</ref>

In terms of the calculus of relations, sufficient conditions for a contact relation include <math display="block">C^\textsf{T} \bar{C} \subseteq \ni \bar{C} \equiv C \overline{\ni \bar{C}} \subseteq C,</math> where <math>\ni</math> is the converse of set membership (<math>\in</math>).<ref name=GS11/>Template:Rp

Preorder R\REdit

Every relation <math>R</math> generates a preorder <math>R \backslash R</math> which is the left residual.<ref>In this context, the symbol <math>\backslash</math> does not mean "set difference".</ref> In terms of converse and complements, <math>R \backslash R \equiv \overline{R^\textsf{T} \bar{R}}.</math> Forming the diagonal of <math>R^\textsf{T} \bar{R}</math>, the corresponding row of <math>R^{\textsf{T}}</math> and column of <math>\bar{R}</math> will be of opposite logical values, so the diagonal is all zeros. Then

<math>R^\textsf{T} \bar{R} \subseteq \bar{I} \implies I \subseteq \overline{R^\textsf{T} \bar{R}} = R \backslash R</math>, so that <math>R \backslash R</math> is a reflexive relation.

To show transitivity, one requires that <math>(R\backslash R)(R\backslash R) \subseteq R \backslash R.</math> Recall that <math>X = R \backslash R</math> is the largest relation such that <math>R X \subseteq R.</math> Then

<math>R(R\backslash R) \subseteq R</math>
<math>R(R\backslash R) (R\backslash R )\subseteq R</math> (repeat)
<math>\equiv R^\textsf{T} \bar{R} \subseteq \overline{(R \backslash R)(R \backslash R)}</math> (Schröder's rule)
<math>\equiv (R \backslash R)(R \backslash R) \subseteq \overline{R^\textsf{T} \bar{R}}</math> (complementation)
<math>\equiv (R \backslash R)(R \backslash R) \subseteq R \backslash R.</math> (definition)

The inclusion relation Ω on the power set of <math>U</math> can be obtained in this way from the membership relation <math>\in</math> on subsets of <math>U</math>:

<math>\Omega = \overline{\ni \bar{\in}} = \in \backslash \in .</math><ref name=GS11/>Template:Rp

Fringe of a relationEdit

Given a relation <math>R</math>, its fringe is the sub-relation defined as <math display="block">\operatorname{fringe}(R) = R \cap \overline{R \bar{R}^\textsf{T} R}.</math>

When <math>R</math> is a partial identity relation, difunctional, or a block diagonal relation, then <math>\operatorname{fringe}(R) = R</math>. Otherwise the <math>\operatorname{fringe}</math> operator selects a boundary sub-relation described in terms of its logical matrix: <math>\operatorname{fringe}(R)</math> is the side diagonal if <math>R</math> is an upper right triangular linear order or strict order. <math>\operatorname{fringe}(R)</math> is the block fringe if <math>R</math> is irreflexive (<math>R \subseteq \bar{I}</math>) or upper right block triangular. <math>\operatorname{fringe}(R)</math> is a sequence of boundary rectangles when <math>R</math> is of Ferrers type.

On the other hand, <math>\operatorname{fringe}(R) = \emptyset</math> when <math>R</math> is a dense, linear, strict order.<ref name=GS11>Gunther Schmidt (2011) Relational Mathematics, pages 211−15, Cambridge University Press Template:ISBN</ref>

Mathematical heapsEdit

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}} Given two sets <math>A</math> and <math>B</math>, the set of binary relations between them <math>\mathcal{B}(A,B)</math> can be equipped with a ternary operation <math>[a, b, c] = a b^\textsf{T} c</math> where <math>b^\mathsf{T}</math> denotes the converse relation of <math>b</math>. In 1953 Viktor Wagner used properties of this ternary operation to define semiheaps, heaps, and generalized heaps.<ref>Viktor Wagner (1953) "The theory of generalised heaps and generalised groups", Matematicheskii Sbornik 32(74): 545 to 632 Template:Mr</ref><ref>C.D. Hollings & M.V. Lawson (2017) Wagner's Theory of Generalised Heaps, Springer books Template:ISBN Template:Mr</ref> The contrast of heterogeneous and homogeneous relations is highlighted by these definitions:

<templatestyles src="Template:Blockquote/styles.css" />

There is a pleasant symmetry in Wagner's work between heaps, semiheaps, and generalised heaps on the one hand, and groups, semigroups, and generalised groups on the other. Essentially, the various types of semiheaps appear whenever we consider binary relations (and partial one-one mappings) between different sets <math>A</math> and <math>B</math>, while the various types of semigroups appear in the case where <math>A = B</math>.{{#if:Christopher Hollings"Mathematics across the Iron Curtain: a history of the algebraic theory of semigroups"<ref>Christopher Hollings (2014) Mathematics across the Iron Curtain: a history of the algebraic theory of semigroups, page 265, History of Mathematics 41, American Mathematical Society Template:ISBN</ref>|{{#if:|}}

}}

{{#invoke:Check for unknown parameters|check|unknown=Template:Main other|preview=Page using Template:Blockquote with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | 3 | 4 | 5 | author | by | char | character | cite | class | content | multiline | personquoted | publication | quote | quotesource | quotetext | sign | source | style | text | title | ts }}

See alsoEdit

Template:Div col

Template:Colend

NotesEdit

Template:Reflist

ReferencesEdit

Template:Reflist

BibliographyEdit

External linksEdit

Template:Order theory Template:Set theory Template:Functions navbox