is the set of all ordered pairs (a,b) with
and
.
A subset of the cartesian product is
called a relation or binary relation on the two
sets.
It follows that if
is a relation defined over the sets Aand B,
then for any given ordered pair
,
that
ordered pair will or will not belong to
.
If (a,b) does belong to
,
that is
,
then we write
a
b. This notation is used to stress the fact
that when
,
a relationship exists between a and
b. If the sets A and B are the same, then a
relation
is a subset of
and we say that
is a relation on A.
As an example of a relation, suppose that John knows PASCAL, Lee knows FORTRAN, Barbara knows C and Pauline knows COBOL. If we let Pdenote the set of people, so that
contains 16ordered pairs and that K is a subset containing four of those
pairs.
The following are all examples of relations on the set of
integers
.