DEFINITION1: Let and
be two sets. Any subset of the cartesian product
is called a relation with domain
and codomain
. While some sources are giving the definition of relation, they assume
and it’s said the emptyset being a subset of
isn’t a relation. However, the assumption “the emptyset is a relation” is not a problem for any branch of the mathematics. On the contrary, the assumption “the emptyset is a relation” plays an important role in some branch of the mathematics.
If and
are two sets with
and
elements respectively, then the cartesian product
has
elements. Since a relation with domain
and codomain
is an element of the power set
and the number of the elements of the power set of a set with
elements is
, then the number of all the relations with domain
and codomain
is
. If
and at least one of
and
is infinite set, then the number of all the relations with domain
and codomain
is also infinity.
Let be a relation not being the emptyset. The statement
is read “x is R-related to y” and is denoted by
or
.
EXAMPLE1: Let and
. Since
has 3 elements and
has 2 elements, the number of all the relations with domain
and codomain
is
. We can give some of these
relations:
,
,
,
.
EXAMPLE2: Let and
. Since
, then
. Let’s show all the elements of this relation on the cartesian coordinate plane:
DEFINITION2: Let ,
be two sets and
. The relation defined as
is called the inverse or converse relation of . If
, then the inverse of
is defined by
.
EXAMPLE3: Find the inverses of the relations in Example1:
,
,
,
.
DEFINITION3: Let be three sets and
,
be two relations. The relation defined as
is called the composition of the relations and
.
EXAMPLE4: ,
,
,
,
,
and
. Hence:
,
,
,
.
DEFINITION4: Let be a set and
. (Note that the domain and the codomain of the relation
are equal. The following definitions can be given for the relations over a set
. It can’t be given for the relations between two difference sets)
a) If for all
, then the relation
is called “reflexive”.
b) If it holds “” for
, then the relation
is called “symmetric”.
c) If it holds “” for
, then the relation
is called “antisymmetric”.
d) If it holds “” for
, then the relation
is called “transitive”.
DEFINITION5: Let be a set and
. If the relation
is reflexive, antisymmetric and transitive, then the relation
is called a “partial order relation” and denoted by
in general. If “
” is a partial order relation over a set
, then
is called “partially ordered set” or shortly “poset”.
DEFINITION6: Let be a set and
. If the relation
is reflexive, symmetric and transitive, then the relation
is called an “equivalence relation” and denoted by
in general.

