100% found this document useful (2 votes)
84 views

Relations - Advanced Mathematics

The document discusses relations and types of relations. It defines ordered pairs, Cartesian products, and product sets. It then discusses different types of relations including: equivalence relations which are reflexive, symmetric, and transitive; inverse relations; and directed graphs which can represent relations. Examples are provided to illustrate relations, product sets, and different types of relations.

Uploaded by

Lasitha Fernando
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
84 views

Relations - Advanced Mathematics

The document discusses relations and types of relations. It defines ordered pairs, Cartesian products, and product sets. It then discusses different types of relations including: equivalence relations which are reflexive, symmetric, and transitive; inverse relations; and directed graphs which can represent relations. Examples are provided to illustrate relations, product sets, and different types of relations.

Uploaded by

Lasitha Fernando
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Relations and Types of Relations

Ordered pairs and product set

If X and Y are sets then the Cartesian product or cross


product ,X× Y is also a set. The cross product X× Y is
the set of all ordered pairs (x,y) whose first elements are
drawn from X and second elements are drawn from Y.

Note: Two ordered pairs ( x, y ) and ( x ′, y ′) are said to be


equal if and only if x = x ′ , y = y ′.

Definition

If X and Y are non empty sets then the product set of X


and Y is defined as ,
X × Y = {( x, y ) / x ∈ X , y ∈ Y }
Examples
Find the following product sets.

(1) A×B, B×A and A×A where A={1,2,3} , B = {x,y}.


A×B ={ (1,x),(1,y), (2,x),(2,y), (3,x),(3,y)}
A×A = {(1,1),(1,2), (1,3),(2,1),(2,2),(2,3),(3,1),(3,2,
(3,3)}
(2) V×W where V= { x / x ∈ Z + , x < 5} and
W = {x / x ∈ Z − x > −5} .

V ={1,2,3,4} , W = {-4,-3,-2,-1}

V×W = { (1,-4),(1,-3),(1,-2),(1,-1), (2,-4),(2,-3)


(2,-2),(2,-1), (3,-4),(3,-3),(3,-2),(3,-1),
(4,-4),(4,-3),(4,-2),(4,1)}

1
General Product Sets

If A,B and C are three sets then the product set


A×B×C is defined as
A×B×C = { (a,b,c)/a∈ A,b∈ B,c∈ C}

Example: If A={a,b}, B={1,2,3} and C= {x,y} find


(a) A×B×C (b) B×C ×A

(a) A×B={(a,1),(a,2),(a,3),(b,1),(b,2),(b,3)}

A×B×C={(a,1,x),(a,1,y),(a,2,x),(a,2,y),(a,3,x),(a,3,y),
(b,1,x),(b,1,y),(b,2,x),(b,2,y),(b,3,x),(b,3,y)}

Exercise: Let A be the set of decimal digits , B be the


set of bits and C be the set of octal digits, find the
following:
(a) A×B (b) ( A ∩ B) × C
(c ) (A-B)×C (d) A×(C-B)

Tree Diagrams

This is a graphical representation of a product set. For


instance the tree diagram of the product set A×B×C
obtained above is as follows.
The starting point shown below is called the root or the
starting node. Other points such as a and b and 1,2,3 are
called nodes. The lines joining adjoining nodes are called
branches. The end positions are called leaves.

2
x (a,1,x)
1 y (a,1,y)
x (a,2,x)
a 2 y (a,2,y)
x .
3 y .

O. x .
1 y .
x .
b 2 y .
x (b,3,x)
3 y (b,3,y)

Exercise: Draw trees of


(a) S×S (b) S×R
where S={M,N} and R={1,2,3,4}

Relations

Let A ,B are two sets and a rule R is defined. Then we


combine an element a in A to an element b in B with a
rule and it is denoted by aRb.

The subset of A×B formed by the rule R is said to


form a relation R between A and B is denoted as
R: A → B.

Given an ordered pair (a,b) from A×B , it may or may


not belong to R. If (a,b) belongs to R we could write
(a,b) ∈ R. But aRb is used to indicate the membership.
This means that there is a relationship between A and B.

3
Example: Let A = {-4,-3,-2,-1,0,1,2,3,4}
B={1,2,3,….,10} and the relation R is defined by the
rule R such that a 2 = b. In other words aRb means
a ∈ A, b ∈ and a 2 = b. Find the relation R.

R={(-3,9) ,(-2,4)(-1,1),(2,4),(3,9}.

Example: Find the following relation where D is the set of


decimal digits ,O is the set of octal digits; number in D is
exactly divisible by number in O.
D= {0,1,2,….,9} , O={0,1,2,….,7}

R:D →O
,
R={(1,1),(2,1),(2,2),(3,1),(3,3),(4,1)(4,2),(4,4),(5,1),(5,5),
(6,1),(6,2),(6,3),(6,6),(7,1),(7,7),(8,1),(8,2),(8,4),(9,1),(9,3)}

Exercise:

1. Let S={I B,M} ,K be the set of capital letters in the


English alphabet and the rule gives the letter
preceding a given letter. Write the relation for the set S
with respect to set K for the given rule.

Note: If R: A→B then R ⊆ A × B.

Cardinality of Product Sets

If X and Y are two non empty sets then

Cardinality of X ×Y = Cardinality of x × Cardinality of y

Exercise: For the sets A,B,C below find cardinality of


product sets.

4
(a) A× B ×C (b) A× B

Example: The table gives the record of Exam marks for


a group of students with other particulars of students.
This would then be stored as a relation R ,such that each
entry consists of (Group, Index, Name, Marks).Find sets
for Name, Index Group and Marks and the relation R.

Name Index Group Marks/100


X 1 A 75
Y 5 C 85
Z 7 A 70
K 10 A 65
U 4 C 85
V 6 B 75
T 3 B 60

Name: N={K,T,U,V,X,Y,Z}

Index: I= {1,3,4,5,6,7,10}

Group: G ={A,B,C}

Mark: M={65,70,75,80,b5}

R={(A,1,X,75),(A,7,Z,20),(A,10,K,65),(B,3,T,80),
(B,6 ,v,75),(c,4,U,85),(c,5,Y,85)}

Directed graphs

Directed graph or digraph is a graphical representation


of relations. We represent the elements of the underline
set as points, and two points are joined by a line (straight

5
or curved) with a direction indicated. The points are
called vertices or nodes. Straight lines are called edges.
An edge of the form (a,a) is represented using an arc from
vertex a back to itself. Such an edge is called a loop.

Example:

(1) Let A = {a1 , a 2 }, B = {b1 , b2 , b3 } . Also let


R = {( a1 , b1 ), (a1 , b2 ), (a 2 , b3 )} . Draw directed graph for the
relation R.

a1 b1

a2 b2

b3

(2) Draw directed graph for the relation R where


A={1,2,3,4}; number in A divides another number
in A.

Then
R={(1,1),(1,2),(1,3),(1,4),(2,2),(2,4),(3,3),(4,4)}

1 . .2

4 . .3
Domain and range of relations:
R: A B

6
Domain: The domain of R is the set of all elements in
A that are related by R to at least one element in B.

Dom( R )= {a / a ∈ A, (a, b) ∈ R}

Range: The range of R is the set of all elements in B to


which at least one element in A is related by R.

Ran( R) = {b / b ∈ B, (a, b) ∈ R}

Examples: Identify domain and range of the following


relations,
(a) A={a,b,c}, B = { 1,2,3,4,5}, R = {(a,3),(b,5), (c,3)}
(b) N={ n / n ∈ ∈ Z ,0 < n < 10} ,R: 2K 2K+1; 2 K ∈ N

(b) N={ 1,2,3,…..,9}


R={(2,3),(4,5),(8,9)}
Dom(R ) ={ 2,4,8}
Ran(R ) ={3,5,9}

Different types of relations

!. Inverse relation: Inverse relation R −1 is the set of all


ordered pairs obtained by interchanging the elements
in R.
If R: A B then R −1 : B → A
R −1 = {(b, a) /(a, b) ∈ R}

Example: If A={2,4,6,8,10}, B={1,3,5,7,9}, R: A B


And a>b. Find R and R −1 .

R={ (2,1), (4,1),(4,3),(6,1),(6,3),(6,5),(8,1),(8,3),


(8,5),(8,7),(10,1),(10,3), (10,9)}
Then
R −1 = {(1,2), (1,4), (3,4), (1,6), (3,6), (5,6), (1,8), (3,8), (5,8), (7,8), (1,10), (3,10), (9,10)}

7
Reflexive relation:
R: A B is reflexive implies ∀a ∈ A, (a, a) ∈ R .
Example: Show that the following relations are
reflexive.
(a) If a,b∈ Z and a,b>0, then aRb means a is divisible by
b.
(b) A={1,2,…}, B={1,2,…,10} R: A B and a=b,
a∈ A , b ∈ B .

(a) R={ (1,1),(2,1),(2,2),(3,1),(3,3),……} is reflexive.

Symmetric relation:

R: A B is symmetric means ∀(a, b) ∈ R, (b, a) ∈ R.

Exercise: Find whether the following relations are


symmetric or not.

(a) R={(1,3),(1,4), (3,1),(4,2)}


(b) A={2n/n∈ Z and n>0} , B= {n/n ∈ Z and n>0};
R: A B and a ∈ A, b ∈ B, a ≠ b.
( c) If a,b∈ Z and a,b>0 and a ≠ b.

Transitive Relation :

R: A B is transitive means ∀(a, b) ∈ R., (b, c) ∈ R implies


(a,c)∈ R.

Examples: Examine which of the following relations on


positive integers are,
(a) reflexive (b) Symmetric (c)transitive.

(i) x is a multiple of y (ii) x is a factor of y, but x ≠ . y.

8
(iii) x/y and y/x are both fractions with an odd
numerator.

(iii)R={ (3,5),(3,7),(3,11),(5,3),(7,3),…..}. This

is not reflexive ,not transitive but symmetric .

Example: Find the relations given in the following


directed graphs and determine their types.
(i) 1. .2 (ii) 1. 2.

3. .4 3. 4.

(i) The relation R is,


R={(1,4),(4,1),(2,3),(3,2)} - Symmetric.

(ii) This relation is {(1,2),(2,3),(2,4),(1,4),(3,4)} –


transitive.

Exercise: Draw directed graph for the relation ≤ on the


set of integers {1,2,3}. What type of relation is this?

Equivalence Relation

If a relation satisfies all the conditions on being reflexive,


symmetric and transitive then the relation is said to be an
equivalence relation.

Two elements that are related by an equivalence relation


are called equivalent.

Example: Examine the relation


R={ (2,2),(2,5),(3,3),(3,4),(4,3),(4,4),(5,5) } on A={2,3,4,5}.
This is reflexive but not symmetric and transitive.
Therefore R is not an equivalence relation.

9
Congruence modulo n

If n is a fixed positive integer we define a relation on Z ,


the set of integers by i ≡ j (mod n) if and only if n divides
i-j. Here both the symbol ≡ and the (mod n) are used to
denote the relation. This is an equivalence relation on
integers.

Example: Show that the relation R={(a,b)/a ≡ b(mod m)}


is an equivalence relation on the set of integers.

a-a=0.m ⇒ a ≡ a(mod m) ⇒ (a,a) ∈ R. R is reflexive.


If (a,b) ∈ R then a-b is divisible by m.
That is a-b = km , k is an integer. ⇒ b-a= (-k)m, -k is
an integer. (b,a) ∈ R . R is symmetric.
Let (a,b) ∈ R ,(b,c) ∈ R
That is a-b = km , b-c = lm, k,l ∈ Z
a-c=a-b+b-c= km+lm =(k+l)m, k+l ∈ Z,
(a,c) ∈ R. R is transitive.
Congruence modulo m is an equivalence relation.

Equivalence class: If R is an equivalence relation on a set


A . The set of all elements that are related to an element
a of A is called the equivalence class of a and it is denoted
by [a].

Example: What are the equivalence classes of 0 and 1 for


congruence modulo 4?

The equivalence class of 0 contains all integers a such


that a ≡ 0(mod4).The integers in the class are those
divisible by 4.

10
[0] = {……-8,-4,0,4,8,….}.

The equivalence class of 1 contains all the elements of a


such that a ≡ 1(mod 4) . The integers in this class are
those that have a remainder of 1 when divided by 4.
[1] = { ……-7,-3,1,5,9,…..}

Note: Anti symmetric Relation

A relation R on set A is said to be anti symmetric if,


∀ a,b ∈ A, (a,b) ∈ R and (b,a) ∈ R implies a=b.

In other words R is anti-symmetric if and only if


whenever (a,b) ∈ R then not (b,a) ∈ R when a ≠ b.

A relation is symmetric if and only if a is


related to b implies that b is related to a.
A relation is antisymmetric if and only if
there are no pairs of distinct elements a and b
with a related to b and b is related to a.
A relation can have both properties . The
terms symmetric and antisymmetric are not
opposites. A relation cannot be both
symmetric and antisymmetric if it contains
some pair of the form (a,b) where a ≠ b.
Example: Which of the following relations are symmetric
and which are antisymmetric?
For a,b∈ Z + ,
R1 = {( a, b) / a ≤ b}
R2 = {( a, b) / a > b}
R3 = {(a, b) / a = b}
R4 = {( a, b) / a = b + 1}
R5 = {( a, b) / a + b ≤ 3}

11
Then,
R1 = {(1,1), (1,2),...., (2,2), (2,3),...., (3,3), (3,4),....}
R2 = {( 2,1), (3,1), (3,2), (4,1), (4,2),......}
R3 = {(1,1), (2,2), (3,3),.....}
R4 = {( 2,1), (3,2), (4,3),......}
R5 = {(1,1), (1,2), (2,1)}
R1 , R2 , R4 -
antisymmetric only.
R5 - symmetric only.
R3 - both symmetric and antisymmetric.

Partially Ordered Relation

If a relation is reflexive, anti symmetric and transitive the


relation is described as being partially ordered.
Functions:

The function f:X → Y is a product set X ×Y of ordered


pairs , such that if (x,y) and (x,z) are any ordered pairs
then y=z.

Example: Examine whether the following relations(or


mappings) are also functions?

(a) X Y (b) X Y

x1 y1 x1 y1
x2 y2 x2 y2
x3 y3 x3 y3
y4

( c) f={(1,3),(2,5),(1,5),(2,6)}

(a) ( x1 , y1 ), ( x 2 , y 2 ) are in the relation. Therefore it is not a


function.

12
Graph of a function:

If f is a function from set A to set B . The graph of the


function f is the set of all ordered pairs,
{(a,b)/a ∈ A and f(a)=b}.

Since the graph of f is a subset of A×B, it is a relation


from A to B. Moreover , the graph of a function has the
property that every element of A is the first element of
exactly one ordered pair of the graph.
Some important types of functions

1. Partial and total functions:

Consider the function f: X → Y.


If dom(f) ⊂ X, the function f is a partial function and if
dom(f) = X ,then f is a complete or total function.

Examples: Examine whether the following functions


are partial or total functions.
(a) f: Z → Z, f(n)= 1/n (b). f: Z → Z, f(n)=n/2

(a) dom(f)= Z\{0} ⊂ Z. f is a partial function.


(b) dom(f)=Z . f is a total function.

The Floor function:


The floor function at x assigns the largest integer that is
less than or equal to x to a real number. The value of the
floor function at x is denoted by x.

The Ceiling function:


The ceiling function at x assigns the smallest integer that
is greater than or equal to x to a real number. The value
of the Ceiling function at x is denoted by x.

13
Example: The following are some values of Floor and
Ceiling functions.

1/2 =0 3.1 = 3 7 = 7 -1/2 =-1

1/2 = 1 3.1 =4 7 = 7 -1/2 =0

Example: Data stored on a computer disk are


transmitted over a data network are usually represented
as a string of bytes. Each byte is made up of 8 bits. How
many bytes are required to encode 100 bits of data.

8 bits = 1 byte
100 bits =  100  = 12.5 =13 bytes.
8

Combining Relations:

Since relations from A to B are subsets of A ×B, two


relations from A to B can be combined.

Example: Let A = {1,2,3} and B={1,2,3,4}. The relations


R1 = {(1,1),(2,2),(3,3)} and R2 ={(1,1),(1,2),(1,3),(1,4)}
can be combined to obtain
R1 ∪ R2 = {(1,1), (1,2), (1,3), (1,4), (2,2), (3,3) }
R1 ∩ R2 = {(1,1)}.
R1 − R2 = {( 2,2), (3,3)}
R2 − R1 = {(1,2), (1,3), (1,4)}

Exercises:
1. List the ordered pairs in the relation R from
A={0,1,2,3,4} to B{0,1,2,3} where (a,b)∈ R if and only if
(a) a=b (b) a+b=4 (c) a>b (d) a/b (e) gcd(a,b)=1

14
2. Determine whether the relation on the set of all
integers is reflexive, symmetric, antisymmetric, and/or
transitive where (x,y)∈ R if and only if

(a) x ≠ y (b) xy ≥ 1 (c ) x = y + 1 or x=y-1


(d) x ≡ y (mod 7) (e) x = y 2 (f) x and y are both
negative or both non-negative.

3. Find the inverse relation of the relation R= {(a,b)/a


divides b} on the set of integers greater than zero.
4. Show that the following relation is reflexive, not
symmetric and transitive when x,y∈ Z .
R={(x,y)/ x ≥ y} .

5. Suppose that R is a relation on the set of strings of


English letters such that a R b if and only if l(a)=l(b),
where l(x) is the length of the string x . Show that R is
an equivalence relation.

6. List the ordered pairs in the relations represented by


the following directed graphs.
(a) (b) (c )

(d)

Determine whether these relations are reflexive ,


symmetric and/or transitive.

7. If R1 = {( a, b) / a > b, a, b ∈ R} , R2 = {( a, b) / a > b, a, b ∈ Z } ,
R3 = {( a, b) / a < b, a, b ∈ R} , R4 = {( a, b) / a ≤ b, a, b ∈ R} ,
R5 = {( a, b) / a = b, a, b ∈ Z } , R6 = {(a, b) / a ≠ b, a, b ∈ R}
Find (a) R1 ∪ R4 (b) R1 ∩ R2 (c ) R3 ∪ R6
(d) R3 ∩ R6 (e) R5 ∩ R6

15
8. Consider the relation R={(x,y)/x,y∈ R ,x-y is an integer}.

(a) Show that it is an equivalence relation.


(b) What is the equivalence class of 1 for this
relation?
(c) What is the equivalence class of 1/2 for this
relation?

16

You might also like