- Source: Binary relation
In mathematics, a binary relation associates elements of one set called the domain with elements of another set called the codomain. Precisely, a binary relation over sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
is a set of ordered pairs
(
x
,
y
)
{\displaystyle (x,y)}
where
x
{\displaystyle x}
is in
X
{\displaystyle X}
and
y
{\displaystyle y}
is in
Y
{\displaystyle Y}
. It encodes the common concept of relation: an element
x
{\displaystyle x}
is related to an element
y
{\displaystyle y}
, if and only if the pair
(
x
,
y
)
{\displaystyle (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
P
{\displaystyle \mathbb {P} }
and the set of integers
Z
{\displaystyle \mathbb {Z} }
, in which each prime
p
{\displaystyle p}
is related to each integer
z
{\displaystyle z}
that is a multiple of
p
{\displaystyle p}
, but not to an integer that is not a multiple of
p
{\displaystyle p}
. In this relation, for instance, the prime number
2
{\displaystyle 2}
is related to numbers such as
−
4
{\displaystyle -4}
,
0
{\displaystyle 0}
,
6
{\displaystyle 6}
,
10
{\displaystyle 10}
, but not to
1
{\displaystyle 1}
or
9
{\displaystyle 9}
, just as the prime number
3
{\displaystyle 3}
is related to
0
{\displaystyle 0}
,
6
{\displaystyle 6}
, and
9
{\displaystyle 9}
, but not to
4
{\displaystyle 4}
or
13
{\displaystyle 13}
.
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
{\displaystyle X}
and
Y
{\displaystyle Y}
is an element of the power set of
X
×
Y
.
{\displaystyle X\times Y.}
Since the latter set is ordered by inclusion (
⊆
{\displaystyle \subseteq }
), each relation has a place in the lattice of subsets of
X
×
Y
.
{\displaystyle X\times Y.}
A binary relation is called a homogeneous relation when
X
=
Y
{\displaystyle X=Y}
. A binary relation is also called a heterogeneous relation when it is not necessary that
X
=
Y
{\displaystyle X=Y}
.
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, Clarence Lewis, and Gunther Schmidt. 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
n
=
2
{\displaystyle n=2}
of an
n
{\displaystyle n}
-ary relation over sets
X
1
,
…
,
X
n
{\displaystyle X_{1},\dots ,X_{n}}
, which is a subset of the Cartesian product
X
1
×
⋯
×
X
n
.
{\displaystyle X_{1}\times \cdots \times X_{n}.}
Definition
Given sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
, the Cartesian product
X
×
Y
{\displaystyle X\times Y}
is defined as
{
(
x
,
y
)
∣
x
∈
X
and
y
∈
Y
}
,
{\displaystyle \{(x,y)\mid x\in X{\text{ and }}y\in Y\},}
and its elements are called ordered pairs.
A binary relation
R
{\displaystyle R}
over sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
is a subset of
X
×
Y
.
{\displaystyle X\times Y.}
The set
X
{\displaystyle X}
is called the domain or set of departure of
R
{\displaystyle R}
, and the set
Y
{\displaystyle Y}
the codomain or set of destination of
R
{\displaystyle R}
. In order to specify the choices of the sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
, some authors define a binary relation or correspondence as an ordered triple
(
X
,
Y
,
G
)
{\displaystyle (X,Y,G)}
, where
G
{\displaystyle G}
is a subset of
X
×
Y
{\displaystyle X\times Y}
called the graph of the binary relation. The statement
(
x
,
y
)
∈
R
{\displaystyle (x,y)\in R}
reads "
x
{\displaystyle x}
is
R
{\displaystyle R}
-related to
y
{\displaystyle y}
" and is denoted by
x
R
y
{\displaystyle xRy}
. The domain of definition or active domain of
R
{\displaystyle R}
is the set of all
x
{\displaystyle x}
such that
x
R
y
{\displaystyle xRy}
for at least one
y
{\displaystyle y}
. The codomain of definition, active codomain, image or range of
R
{\displaystyle R}
is the set of all
y
{\displaystyle y}
such that
x
R
y
{\displaystyle xRy}
for at least one
x
{\displaystyle x}
. The field of
R
{\displaystyle R}
is the union of its domain of definition and its codomain of definition.
When
X
=
Y
,
{\displaystyle X=Y,}
a binary relation is called a homogeneous relation (or endorelation). To emphasize the fact that
X
{\displaystyle X}
and
Y
{\displaystyle 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
.
{\displaystyle 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
{\displaystyle X\times Y}
without reference to
X
{\displaystyle X}
and
Y
{\displaystyle Y}
, and reserve the term "correspondence" for a binary relation with reference to
X
{\displaystyle X}
and
Y
{\displaystyle Y}
.
In a binary relation, the order of the elements is important; if
x
≠
y
{\displaystyle x\neq y}
then
y
R
x
{\displaystyle yRx}
can be true or false independently of
x
R
y
{\displaystyle xRy}
. For example,
3
{\displaystyle 3}
divides
9
{\displaystyle 9}
, but
9
{\displaystyle 9}
does not divide
3
{\displaystyle 3}
.
Operations
= Union
=If
R
{\displaystyle R}
and
S
{\displaystyle S}
are binary relations over sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
then
R
∪
S
=
{
(
x
,
y
)
∣
x
R
y
or
x
S
y
}
{\displaystyle R\cup S=\{(x,y)\mid xRy{\text{ or }}xSy\}}
is the union relation of
R
{\displaystyle R}
and
S
{\displaystyle S}
over
X
{\displaystyle X}
and
Y
{\displaystyle Y}
.
The identity element is the empty relation. For example,
≤
{\displaystyle \leq }
is the union of < and =, and
≥
{\displaystyle \geq }
is the union of > and =.
= Intersection
=If
R
{\displaystyle R}
and
S
{\displaystyle S}
are binary relations over sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
then
R
∩
S
=
{
(
x
,
y
)
∣
x
R
y
and
x
S
y
}
{\displaystyle R\cap S=\{(x,y)\mid xRy{\text{ and }}xSy\}}
is the intersection relation of
R
{\displaystyle R}
and
S
{\displaystyle S}
over
X
{\displaystyle X}
and
Y
{\displaystyle Y}
.
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".
= Composition
=If
R
{\displaystyle R}
is a binary relation over sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
, and
S
{\displaystyle S}
is a binary relation over sets
Y
{\displaystyle Y}
and
Z
{\displaystyle Z}
then
S
∘
R
=
{
(
x
,
z
)
∣
there exists
y
∈
Y
such that
x
R
y
and
y
S
z
}
{\displaystyle S\circ R=\{(x,z)\mid {\text{ there exists }}y\in Y{\text{ such that }}xRy{\text{ and }}ySz\}}
(also denoted by
R
;
S
{\displaystyle R;S}
) is the composition relation of
R
{\displaystyle R}
and
S
{\displaystyle S}
over
X
{\displaystyle X}
and
Z
{\displaystyle Z}
.
The identity element is the identity relation. The order of
R
{\displaystyle R}
and
S
{\displaystyle S}
in the notation
S
∘
R
,
{\displaystyle S\circ R,}
used here agrees with the standard notational order for composition of functions. For example, the composition (is parent of)
∘
{\displaystyle \circ }
(is mother of) yields (is maternal grandparent of), while the composition (is mother of)
∘
{\displaystyle \circ }
(is parent of) yields (is grandmother of). For the former case, if
x
{\displaystyle x}
is the parent of
y
{\displaystyle y}
and
y
{\displaystyle y}
is the mother of
z
{\displaystyle z}
, then
x
{\displaystyle x}
is the maternal grandparent of
z
{\displaystyle z}
.
= Converse
=If
R
{\displaystyle R}
is a binary relation over sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
then
R
T
=
{
(
y
,
x
)
∣
x
R
y
}
{\displaystyle R^{\textsf {T}}=\{(y,x)\mid xRy\}}
is the converse relation, also called inverse relation, of
R
{\displaystyle R}
over
Y
{\displaystyle Y}
and
X
{\displaystyle X}
.
For example,
=
{\displaystyle =}
is the converse of itself, as is
≠
{\displaystyle \neq }
, and
<
{\displaystyle <}
and
>
{\displaystyle >}
are each other's converse, as are
≤
{\displaystyle \leq }
and
≥
{\displaystyle \geq }
. A binary relation is equal to its converse if and only if it is symmetric.
= Complement
=If
R
{\displaystyle R}
is a binary relation over sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
then
R
¯
=
{
(
x
,
y
)
∣
¬
x
R
y
}
{\displaystyle {\bar {R}}=\{(x,y)\mid \neg xRy\}}
(also denoted by
¬
R
{\displaystyle \neg R}
) is the complementary relation of
R
{\displaystyle R}
over
X
{\displaystyle X}
and
Y
{\displaystyle Y}
.
For example,
=
{\displaystyle =}
and
≠
{\displaystyle \neq }
are each other's complement, as are
⊆
{\displaystyle \subseteq }
and
⊈
{\displaystyle \not \subseteq }
,
⊇
{\displaystyle \supseteq }
and
⊉
{\displaystyle \not \supseteq }
,
∈
{\displaystyle \in }
and
∉
{\displaystyle \not \in }
, and for total orders also
<
{\displaystyle <}
and
≥
{\displaystyle \geq }
, and
>
{\displaystyle >}
and
≤
{\displaystyle \leq }
.
The complement of the converse relation
R
T
{\displaystyle R^{\textsf {T}}}
is the converse of the complement:
R
T
¯
=
R
¯
T
.
{\displaystyle {\overline {R^{\mathsf {T}}}}={\bar {R}}^{\mathsf {T}}.}
If
X
=
Y
,
{\displaystyle X=Y,}
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.
= Restriction
=If
R
{\displaystyle R}
is a binary homogeneous relation over a set
X
{\displaystyle X}
and
S
{\displaystyle S}
is a subset of
X
{\displaystyle X}
then
R
|
S
=
{
(
x
,
y
)
∣
x
R
y
and
x
∈
S
and
y
∈
S
}
{\displaystyle R_{\vert S}=\{(x,y)\mid xRy{\text{ and }}x\in S{\text{ and }}y\in S\}}
is the restriction relation of
R
{\displaystyle R}
to
S
{\displaystyle S}
over
X
{\displaystyle X}
.
If
R
{\displaystyle R}
is a binary relation over sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
and if
S
{\displaystyle S}
is a subset of
X
{\displaystyle X}
then
R
|
S
=
{
(
x
,
y
)
∣
x
R
y
and
x
∈
S
}
{\displaystyle R_{\vert S}=\{(x,y)\mid xRy{\text{ and }}x\in S\}}
is the left-restriction relation of
R
{\displaystyle R}
to
S
{\displaystyle S}
over
X
{\displaystyle X}
and
Y
{\displaystyle Y}
.
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 "
x
{\displaystyle x}
is parent of
y
{\displaystyle y}
" to females yields the relation "
x
{\displaystyle x}
is mother of the woman
y
{\displaystyle y}
"; 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
≤
{\displaystyle \leq }
is that every non-empty subset
S
⊆
R
{\displaystyle S\subseteq \mathbb {R} }
with an upper bound in
R
{\displaystyle \mathbb {R} }
has a least upper bound (also called supremum) in
R
.
{\displaystyle \mathbb {R} .}
However, for the rational numbers this supremum is not necessarily rational, so the same property does not hold on the restriction of the relation
≤
{\displaystyle \leq }
to the rational numbers.
A binary relation
R
{\displaystyle R}
over sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
is said to be contained in a relation
S
{\displaystyle S}
over
X
{\displaystyle X}
and
Y
{\displaystyle Y}
, written
R
⊆
S
,
{\displaystyle R\subseteq S,}
if
R
{\displaystyle R}
is a subset of
S
{\displaystyle S}
, that is, for all
x
∈
X
{\displaystyle x\in X}
and
y
∈
Y
,
{\displaystyle y\in Y,}
if
x
R
y
{\displaystyle xRy}
, then
x
S
y
{\displaystyle xSy}
. If
R
{\displaystyle R}
is contained in
S
{\displaystyle S}
and
S
{\displaystyle S}
is contained in
R
{\displaystyle R}
, then
R
{\displaystyle R}
and
S
{\displaystyle S}
are called equal written
R
=
S
{\displaystyle R=S}
. If
R
{\displaystyle R}
is contained in
S
{\displaystyle S}
but
S
{\displaystyle S}
is not contained in
R
{\displaystyle R}
, then
R
{\displaystyle R}
is said to be smaller than
S
{\displaystyle S}
, written
R
⊊
S
.
{\displaystyle R\subsetneq S.}
For example, on the rational numbers, the relation
>
{\displaystyle >}
is smaller than
≥
{\displaystyle \geq }
, and equal to the composition
>
∘
>
{\displaystyle >\circ >}
.
= Matrix representation
=Binary relations over sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
can be represented algebraically by logical matrices indexed by
X
{\displaystyle X}
and
Y
{\displaystyle Y}
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
X
{\displaystyle X}
and
Y
{\displaystyle Y}
and a relation over
Y
{\displaystyle Y}
and
Z
{\displaystyle Z}
), 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
X
=
Y
{\displaystyle X=Y}
) form a matrix semiring (indeed, a matrix semialgebra over the Boolean semiring) where the identity matrix corresponds to the identity relation.
Examples
Types of binary relations
Some important types of binary relations
R
{\displaystyle R}
over sets
X
{\displaystyle X}
and
Y
{\displaystyle Y}
are listed below.
Uniqueness properties:
Injective (also called left-unique): for all
x
,
y
∈
X
{\displaystyle x,y\in X}
and all
z
∈
Y
,
{\displaystyle z\in Y,}
if
x
R
z
{\displaystyle xRz}
and
y
R
z
{\displaystyle yRz}
then
x
=
y
{\displaystyle x=y}
. In other words, every element of the codomain has at most one preimage element. For such a relation,
Y
{\displaystyle Y}
is called a primary key of
R
{\displaystyle R}
. For example, the green and blue binary relations in the diagram are injective, but the red one is not (as it relates both
−
1
{\displaystyle -1}
and
1
{\displaystyle 1}
to
1
{\displaystyle 1}
), nor the black one (as it relates both
−
1
{\displaystyle -1}
and
1
{\displaystyle 1}
to
0
{\displaystyle 0}
).
Functional (also called right-unique or univalent): for all
x
∈
X
{\displaystyle x\in X}
and all
y
,
z
∈
Y
,
{\displaystyle y,z\in Y,}
if
x
R
y
{\displaystyle xRy}
and
x
R
z
{\displaystyle xRz}
then
y
=
z
{\displaystyle y=z}
. In other words, every element of the domain has at most one image element. Such a binary relation is called a partial function or partial mapping. For such a relation,
{
X
}
{\displaystyle \{X\}}
is called a primary key of
R
{\displaystyle R}
. For example, the red and green binary relations in the diagram are functional, but the blue one is not (as it relates
1
{\displaystyle 1}
to both
1
{\displaystyle 1}
and
−
1
{\displaystyle -1}
), nor the black one (as it relates
0
{\displaystyle 0}
to both
−
1
{\displaystyle -1}
and
1
{\displaystyle 1}
).
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
X
{\displaystyle X}
and codomain
Y
{\displaystyle Y}
are specified):
Total (also called left-total): for all
x
∈
X
{\displaystyle x\in X}
there exists a
y
∈
Y
{\displaystyle y\in Y}
such that
x
R
y
{\displaystyle xRy}
. In other words, every element of the domain has at least one image element. In other words, the domain of definition of
R
{\displaystyle R}
is equal to
X
{\displaystyle X}
. This property, is different from the definition of connected (also called total by some authors) in Properties. Such a binary relation is called a multivalued function. For example, the red and green binary relations in the diagram are total, but the blue one is not (as it does not relate
−
1
{\displaystyle -1}
to any real number), nor the black one (as it does not relate
2
{\displaystyle 2}
to any real number). As another example,
>
{\displaystyle >}
is a total relation over the integers. But it is not a total relation over the positive integers, because there is no
y
{\displaystyle y}
in the positive integers such that
1
>
y
{\displaystyle 1>y}
. However,
<
{\displaystyle <}
is a total relation over the positive integers, the rational numbers and the real numbers. Every reflexive relation is total: for a given
x
{\displaystyle x}
, choose
y
=
x
{\displaystyle y=x}
.
Surjective (also called right-total): for all
y
∈
Y
{\displaystyle y\in Y}
, there exists an
x
∈
X
{\displaystyle x\in X}
such that
x
R
y
{\displaystyle xRy}
. In other words, every element of the codomain has at least one preimage element. In other words, the codomain of definition of
R
{\displaystyle R}
is equal to
Y
{\displaystyle Y}
. 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
−
1
{\displaystyle -1}
), nor the black one (as it does not relate any real number to
2
{\displaystyle 2}
).
Uniqueness and totality properties (only definable if the domain
X
{\displaystyle X}
and codomain
Y
{\displaystyle Y}
are specified):
A function (also called mapping): 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.
If relations over proper classes are allowed:
Set-like (also called local): for all
x
∈
X
{\displaystyle x\in X}
, the class of all
y
∈
Y
{\displaystyle y\in Y}
such that
y
R
x
{\displaystyle yRx}
, i.e.
{
y
∈
Y
,
y
R
x
}
{\displaystyle \{y\in Y,yRx\}}
, is a set. For example, the relation
∈
{\displaystyle \in }
is set-like, and every relation on two sets is set-like. The usual ordering < over the class of ordinal numbers is a set-like relation, while its inverse > is not.
Sets versus classes
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
=
{\displaystyle =}
, 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
A
{\displaystyle A}
, that contains all the objects of interest, and work with the restriction
=
A
{\displaystyle =_{A}}
instead of
=
{\displaystyle =}
. Similarly, the "subset of" relation
⊆
{\displaystyle \subseteq }
needs to be restricted to have domain and codomain
P
(
A
)
{\displaystyle P(A)}
(the power set of a specific set
A
{\displaystyle A}
): the resulting set relation can be denoted by
⊆
A
.
{\displaystyle \subseteq _{A}.}
Also, the "member of" relation needs to be restricted to have domain
A
{\displaystyle A}
and codomain
P
(
A
)
{\displaystyle P(A)}
to obtain a binary relation
∈
A
{\displaystyle \in _{A}}
that is a set. Bertrand Russell has shown that assuming
∈
{\displaystyle \in }
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
(
X
,
Y
,
G
)
{\displaystyle (X,Y,G)}
, 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.) With this definition one can for instance define a binary relation over every set and its power set.
Homogeneous relation
A homogeneous relation over a set
X
{\displaystyle X}
is a binary relation over
X
{\displaystyle X}
and itself, i.e. it is a subset of the Cartesian product
X
×
X
.
{\displaystyle X\times X.}
It is also simply called a (binary) relation over
X
{\displaystyle X}
.
A homogeneous relation
R
{\displaystyle R}
over a set
X
{\displaystyle X}
may be identified with a directed simple graph permitting loops, where
X
{\displaystyle X}
is the vertex set and
R
{\displaystyle R}
is the edge set (there is an edge from a vertex
x
{\displaystyle x}
to a vertex
y
{\displaystyle y}
if and only if
x
R
y
{\displaystyle xRy}
).
The set of all homogeneous relations
B
(
X
)
{\displaystyle {\mathcal {B}}(X)}
over a set
X
{\displaystyle X}
is the power set
2
X
×
X
{\displaystyle 2^{X\times X}}
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
B
(
X
)
{\displaystyle {\mathcal {B}}(X)}
, it forms a semigroup with involution.
Some important properties that a homogeneous relation
R
{\displaystyle R}
over a set
X
{\displaystyle X}
may have are:
Reflexive: for all
x
∈
X
,
{\displaystyle x\in X,}
x
R
x
{\displaystyle xRx}
. For example,
≥
{\displaystyle \geq }
is a reflexive relation but > is not.
Irreflexive: for all
x
∈
X
,
{\displaystyle x\in X,}
not
x
R
x
{\displaystyle xRx}
. For example,
>
{\displaystyle >}
is an irreflexive relation, but
≥
{\displaystyle \geq }
is not.
Symmetric: for all
x
,
y
∈
X
,
{\displaystyle x,y\in X,}
if
x
R
y
{\displaystyle xRy}
then
y
R
x
{\displaystyle yRx}
. For example, "is a blood relative of" is a symmetric relation.
Antisymmetric: for all
x
,
y
∈
X
,
{\displaystyle x,y\in X,}
if
x
R
y
{\displaystyle xRy}
and
y
R
x
{\displaystyle yRx}
then
x
=
y
.
{\displaystyle x=y.}
For example,
≥
{\displaystyle \geq }
is an antisymmetric relation.
Asymmetric: for all
x
,
y
∈
X
,
{\displaystyle x,y\in X,}
if
x
R
y
{\displaystyle xRy}
then not
y
R
x
{\displaystyle yRx}
. A relation is asymmetric if and only if it is both antisymmetric and irreflexive. For example, > is an asymmetric relation, but
≥
{\displaystyle \geq }
is not.
Transitive: for all
x
,
y
,
z
∈
X
,
{\displaystyle x,y,z\in X,}
if
x
R
y
{\displaystyle xRy}
and
y
R
z
{\displaystyle yRz}
then
x
R
z
{\displaystyle xRz}
. A transitive relation is irreflexive if and only if it is asymmetric. For example, "is ancestor of" is a transitive relation, while "is parent of" is not.
Connected: for all
x
,
y
∈
X
,
{\displaystyle x,y\in X,}
if
x
≠
y
{\displaystyle x\neq y}
then
x
R
y
{\displaystyle xRy}
or
y
R
x
{\displaystyle yRx}
.
Strongly connected: for all
x
,
y
∈
X
,
{\displaystyle x,y\in X,}
x
R
y
{\displaystyle xRy}
or
y
R
x
{\displaystyle yRx}
.
Dense: for all
x
,
y
∈
X
,
{\displaystyle x,y\in X,}
if
x
R
y
,
{\displaystyle xRy,}
then some
z
∈
X
{\displaystyle z\in X}
exists such that
x
R
z
{\displaystyle xRz}
and
z
R
y
{\displaystyle zRy}
.
A partial order is a relation that is reflexive, antisymmetric, and transitive. A strict partial order is a relation that is irreflexive, asymmetric, and transitive. A total order is a relation that is reflexive, antisymmetric, transitive and connected. A strict total order is a relation that is irreflexive, asymmetric, transitive and connected.
An equivalence relation is a relation that is reflexive, symmetric, and transitive.
For example, "
x
{\displaystyle x}
divides
y
{\displaystyle y}
" is a partial, but not a total order on natural numbers
N
,
{\displaystyle \mathbb {N} ,}
"
x
<
y
{\displaystyle x
" is a strict total order on
N
,
{\displaystyle \mathbb {N} ,}
and "
x
{\displaystyle x}
is parallel to
y
{\displaystyle y}
" is an equivalence relation on the set of all lines in the Euclidean plane.
All operations defined in section § Operations also apply to homogeneous relations.
Beyond that, a homogeneous relation over a set
X
{\displaystyle X}
may be subjected to closure operations like:
Reflexive closure
the smallest reflexive relation over
X
{\displaystyle X}
containing
R
{\displaystyle R}
,
Transitive closure
the smallest transitive relation over
X
{\displaystyle X}
containing
R
{\displaystyle R}
,
Equivalence closure
the smallest equivalence relation over
X
{\displaystyle X}
containing
R
{\displaystyle R}
.
Calculus of relations
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
R
⊆
S
,
{\displaystyle R\subseteq S,}
meaning that
a
R
b
{\displaystyle aRb}
implies
a
S
b
{\displaystyle aSb}
, sets the scene in a lattice of relations. But since
P
⊆
Q
≡
(
P
∩
Q
¯
=
∅
)
≡
(
P
∩
Q
=
P
)
,
{\displaystyle P\subseteq Q\equiv (P\cap {\bar {Q}}=\varnothing )\equiv (P\cap Q=P),}
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
A
×
B
.
{\displaystyle A\times B.}
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 objects of the category Rel are sets, and the relation-morphisms compose as required in a category.
Induced concept lattice
Binary relations have been described through their induced concept lattices:
A concept
C
⊂
R
{\displaystyle C\subset R}
satisfies two properties:
The logical matrix of
C
{\displaystyle C}
is the outer product of logical vectors
C
i
j
=
u
i
v
j
,
u
,
v
{\displaystyle C_{ij}=u_{i}v_{j},\quad u,v}
logical vectors.
C
{\displaystyle C}
is maximal, not contained in any other outer product. Thus
C
{\displaystyle C}
is described as a non-enlargeable rectangle.
For a given relation
R
⊆
X
×
Y
,
{\displaystyle R\subseteq X\times Y,}
the set of concepts, enlarged by their joins and meets, forms an "induced lattice of concepts", with inclusion
⊑
{\displaystyle \sqsubseteq }
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". The decomposition is
R
=
f
E
g
T
{\displaystyle R=fEg^{\textsf {T}}}
, where
f
{\displaystyle f}
and
g
{\displaystyle g}
are functions, called mappings or left-total, functional relations in this context. The "induced concept lattice is isomorphic to the cut completion of the partial order
E
{\displaystyle E}
that belongs to the minimal decomposition
(
f
,
g
,
E
)
{\displaystyle (f,g,E)}
of the relation
R
{\displaystyle R}
."
Particular cases are considered below:
E
{\displaystyle E}
total order corresponds to Ferrers type, and
E
{\displaystyle E}
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. Structural analysis of relations with concepts provides an approach for data mining.
Particular relations
Proposition: If
R
{\displaystyle R}
is a surjective relation and
R
T
{\displaystyle R^{\mathsf {T}}}
is its transpose, then
I
⊆
R
T
R
{\displaystyle I\subseteq R^{\textsf {T}}R}
where
I
{\displaystyle I}
is the
m
×
m
{\displaystyle m\times m}
identity relation.
Proposition: If
R
{\displaystyle R}
is a serial relation, then
I
⊆
R
R
T
{\displaystyle I\subseteq RR^{\textsf {T}}}
where
I
{\displaystyle I}
is the
n
×
n
{\displaystyle n\times n}
identity relation.
= Difunctional
=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
Z
=
{
x
,
y
,
z
,
…
}
{\displaystyle Z=\{x,y,z,\ldots \}}
of indicators. The partitioning relation
R
=
F
G
T
{\displaystyle R=FG^{\textsf {T}}}
is a composition of relations using functional relations
F
⊆
A
×
Z
and
G
⊆
B
×
Z
.
{\displaystyle F\subseteq A\times Z{\text{ and }}G\subseteq B\times Z.}
Jacques Riguet named these relations difunctional since the composition
F
G
T
{\displaystyle FG^{\mathsf {T}}}
involves functional relations, commonly called partial functions.
In 1950 Riguet showed that such relations satisfy the inclusion:
R
R
T
R
⊆
R
{\displaystyle RR^{\textsf {T}}R\subseteq R}
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. More formally, a relation
R
{\displaystyle R}
on
X
×
Y
{\displaystyle X\times Y}
is difunctional if and only if it can be written as the union of Cartesian products
A
i
×
B
i
{\displaystyle A_{i}\times B_{i}}
, where the
A
i
{\displaystyle A_{i}}
are a partition of a subset of
X
{\displaystyle X}
and the
B
i
{\displaystyle B_{i}}
likewise a partition of a subset of
Y
{\displaystyle Y}
.
Using the notation
{
y
∣
x
R
y
}
=
x
R
{\displaystyle \{y\mid xRy\}=xR}
, a difunctional relation can also be characterized as a relation
R
{\displaystyle R}
such that wherever
x
1
R
{\displaystyle x_{1}R}
and
x
2
R
{\displaystyle x_{2}R}
have a non-empty intersection, then these two sets coincide; formally
x
1
∩
x
2
≠
∅
{\displaystyle x_{1}\cap x_{2}\neq \varnothing }
implies
x
1
R
=
x
2
R
.
{\displaystyle x_{1}R=x_{2}R.}
In 1997 researchers found "utility of binary decomposition based on difunctional dependencies in database management." Furthermore, difunctional relations are fundamental in the study of bisimulations.
In the context of homogeneous relations, a partial equivalence relation is difunctional.
= Ferrers type
=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.
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
R
R
¯
T
R
⊆
R
.
{\displaystyle R{\bar {R}}^{\textsf {T}}R\subseteq R.}
If any one of the relations
R
,
R
¯
,
R
T
{\displaystyle R,{\bar {R}},R^{\textsf {T}}}
is of Ferrers type, then all of them are.
= Contact
=Suppose
B
{\displaystyle B}
is the power set of
A
{\displaystyle A}
, the set of all subsets of
A
{\displaystyle A}
. Then a relation
g
{\displaystyle g}
is a contact relation if it satisfies three properties:
for all
x
∈
A
,
Y
=
{
x
}
implies
x
g
Y
.
{\displaystyle {\text{for all }}x\in A,Y=\{x\}{\text{ implies }}xgY.}
Y
⊆
Z
and
x
g
Y
implies
x
g
Z
.
{\displaystyle Y\subseteq Z{\text{ and }}xgY{\text{ implies }}xgZ.}
for all
y
∈
Y
,
y
g
Z
and
x
g
Y
implies
x
g
Z
.
{\displaystyle {\text{for all }}y\in Y,ygZ{\text{ and }}xgY{\text{ implies }}xgZ.}
The set membership relation,
ϵ
=
{\displaystyle \epsilon =}
"is an element of", satisfies these properties so
ϵ
{\displaystyle \epsilon }
is a contact relation. The notion of a general contact relation was introduced by Georg Aumann in 1970.
In terms of the calculus of relations, sufficient conditions for a contact relation include
C
T
C
¯
⊆∋
C
¯
≡
C
∋
C
¯
¯
⊆
C
,
{\displaystyle C^{\textsf {T}}{\bar {C}}\subseteq \ni {\bar {C}}\equiv C{\overline {\ni {\bar {C}}}}\subseteq C,}
where
∋
{\displaystyle \ni }
is the converse of set membership (
∈
{\displaystyle \in }
).: 280
Preorder R\R
Every relation
R
{\displaystyle R}
generates a preorder
R
∖
R
{\displaystyle R\backslash R}
which is the left residual. In terms of converse and complements,
R
∖
R
≡
R
T
R
¯
¯
.
{\displaystyle R\backslash R\equiv {\overline {R^{\textsf {T}}{\bar {R}}}}.}
Forming the diagonal of
R
T
R
¯
{\displaystyle R^{\textsf {T}}{\bar {R}}}
, the corresponding row of
R
T
{\displaystyle R^{\textsf {T}}}
and column of
R
¯
{\displaystyle {\bar {R}}}
will be of opposite logical values, so the diagonal is all zeros. Then
R
T
R
¯
⊆
I
¯
⟹
I
⊆
R
T
R
¯
¯
=
R
∖
R
{\displaystyle R^{\textsf {T}}{\bar {R}}\subseteq {\bar {I}}\implies I\subseteq {\overline {R^{\textsf {T}}{\bar {R}}}}=R\backslash R}
, so that
R
∖
R
{\displaystyle R\backslash R}
is a reflexive relation.
To show transitivity, one requires that
(
R
∖
R
)
(
R
∖
R
)
⊆
R
∖
R
.
{\displaystyle (R\backslash R)(R\backslash R)\subseteq R\backslash R.}
Recall that
X
=
R
∖
R
{\displaystyle X=R\backslash R}
is the largest relation such that
R
X
⊆
R
.
{\displaystyle RX\subseteq R.}
Then
R
(
R
∖
R
)
⊆
R
{\displaystyle R(R\backslash R)\subseteq R}
R
(
R
∖
R
)
(
R
∖
R
)
⊆
R
{\displaystyle R(R\backslash R)(R\backslash R)\subseteq R}
(repeat)
≡
R
T
R
¯
⊆
(
R
∖
R
)
(
R
∖
R
)
¯
{\displaystyle \equiv R^{\textsf {T}}{\bar {R}}\subseteq {\overline {(R\backslash R)(R\backslash R)}}}
(Schröder's rule)
≡
(
R
∖
R
)
(
R
∖
R
)
⊆
R
T
R
¯
¯
{\displaystyle \equiv (R\backslash R)(R\backslash R)\subseteq {\overline {R^{\textsf {T}}{\bar {R}}}}}
(complementation)
≡
(
R
∖
R
)
(
R
∖
R
)
⊆
R
∖
R
.
{\displaystyle \equiv (R\backslash R)(R\backslash R)\subseteq R\backslash R.}
(definition)
The inclusion relation Ω on the power set of
U
{\displaystyle U}
can be obtained in this way from the membership relation
∈
{\displaystyle \in }
on subsets of
U
{\displaystyle U}
:
Ω
=
∋
∈
¯
¯
=∈
∖
∈
.
{\displaystyle \Omega ={\overline {\ni {\bar {\in }}}}=\in \backslash \in .}
: 283
Fringe of a relation
Given a relation
R
{\displaystyle R}
, its fringe is the sub-relation defined as
fringe
(
R
)
=
R
∩
R
R
¯
T
R
¯
.
{\displaystyle \operatorname {fringe} (R)=R\cap {\overline {R{\bar {R}}^{\textsf {T}}R}}.}
When
R
{\displaystyle R}
is a partial identity relation, difunctional, or a block diagonal relation, then
fringe
(
R
)
=
R
{\displaystyle \operatorname {fringe} (R)=R}
. Otherwise the
fringe
{\displaystyle \operatorname {fringe} }
operator selects a boundary sub-relation described in terms of its logical matrix:
fringe
(
R
)
{\displaystyle \operatorname {fringe} (R)}
is the side diagonal if
R
{\displaystyle R}
is an upper right triangular linear order or strict order.
fringe
(
R
)
{\displaystyle \operatorname {fringe} (R)}
is the block fringe if
R
{\displaystyle R}
is irreflexive (
R
⊆
I
¯
{\displaystyle R\subseteq {\bar {I}}}
) or upper right block triangular.
fringe
(
R
)
{\displaystyle \operatorname {fringe} (R)}
is a sequence of boundary rectangles when
R
{\displaystyle R}
is of Ferrers type.
On the other hand,
fringe
(
R
)
=
∅
{\displaystyle \operatorname {fringe} (R)=\emptyset }
when
R
{\displaystyle R}
is a dense, linear, strict order.
Mathematical heaps
Given two sets
A
{\displaystyle A}
and
B
{\displaystyle B}
, the set of binary relations between them
B
(
A
,
B
)
{\displaystyle {\mathcal {B}}(A,B)}
can be equipped with a ternary operation
[
a
,
b
,
c
]
=
a
b
T
c
{\displaystyle [a,b,c]=ab^{\textsf {T}}c}
where
b
T
{\displaystyle b^{\mathsf {T}}}
denotes the converse relation of
b
{\displaystyle b}
. In 1953 Viktor Wagner used properties of this ternary operation to define semiheaps, heaps, and generalized heaps. The contrast of heterogeneous and homogeneous relations is highlighted by these definitions:
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
A
{\displaystyle A}
and
B
{\displaystyle B}
, while the various types of semigroups appear in the case where
A
=
B
{\displaystyle A=B}
.
See also
Notes
References
Bibliography
Schmidt, Gunther (2010). Relational Mathematics. Berlin: Cambridge University Press. ISBN 9780511778810.
Schmidt, Gunther; Ströhlein, Thomas (2012). "Chapter 3: Heterogeneous relations". Relations and Graphs: Discrete Mathematics for Computer Scientists. Springer Science & Business Media. ISBN 978-3-642-77968-8.
Ernst Schröder (1895) Algebra der Logik, Band III, via Internet Archive
Codd, Edgar Frank (1990). The Relational Model for Database Management: Version 2 (PDF). Boston: Addison-Wesley. ISBN 978-0201141924. Archived (PDF) from the original on 2022-10-09.
Enderton, Herbert (1977). Elements of Set Theory. Boston: Academic Press. ISBN 978-0-12-238440-0.
Kilp, Mati; Knauer, Ulrich; Mikhalev, Alexander (2000). Monoids, Acts and Categories: with Applications to Wreath Products and Graphs. Berlin: De Gruyter. ISBN 978-3-11-015248-7.
Van Gasteren, Antonetta (1990). On the Shape of Mathematical Arguments. Berlin: Springer. ISBN 9783540528494.
Peirce, Charles Sanders (1873). "Description of a Notation for the Logic of Relatives, Resulting from an Amplification of the Conceptions of Boole's Calculus of Logic". Memoirs of the American Academy of Arts and Sciences. 9 (2): 317–178. Bibcode:1873MAAAS...9..317P. doi:10.2307/25058006. hdl:2027/hvd.32044019561034. JSTOR 25058006. Retrieved 2020-05-05.
Schmidt, Gunther (2010). Relational Mathematics. Cambridge: Cambridge University Press. ISBN 978-0-521-76268-7.
External links
"Binary relation", Encyclopedia of Mathematics, EMS Press, 2001 [1994]
Kata Kunci Pencarian:
- Albert Einstein
- Logam alkali
- Himpunan kabur
- Laju cahaya
- Bintang
- Gender
- Daftar algoritme
- Interseks
- Daftar bintang terbesar
- Daftar lubang hitam paling masif
- Binary relation
- Homogeneous relation
- Reflexive relation
- Relation
- Symmetric relation
- Equivalence relation
- Binary
- Antisymmetric relation
- Transitive relation
- Closure (mathematics)