0% found this document useful (0 votes)
34 views

Relations and Functions

This document discusses relations and functions in mathematics. It begins with an introduction and overview of the topic structure and learning outcomes. It then discusses concepts like Cartesian product sets, relations, mappings and functions. It defines relations as subsets of Cartesian products and provides examples. It also covers properties of relations like reflexive, symmetric, transitive, irreflexive and antisymmetric properties. It gives examples of checking if relations have these properties. It concludes with a discussion of inverse relations and examples of determining the domain and range of given relations.

Uploaded by

Manish Thakuri
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
0% found this document useful (0 votes)
34 views

Relations and Functions

This document discusses relations and functions in mathematics. It begins with an introduction and overview of the topic structure and learning outcomes. It then discusses concepts like Cartesian product sets, relations, mappings and functions. It defines relations as subsets of Cartesian products and provides examples. It also covers properties of relations like reflexive, symmetric, transitive, irreflexive and antisymmetric properties. It gives examples of checking if relations have these properties. It concludes with a discussion of inverse relations and examples of determining the domain and range of given relations.

Uploaded by

Manish Thakuri
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/ 37

Mathematics Concepts For Computing

AQ010-3-1-MCFC

Relations and Functions


Topic & Structure of the lesson

Introduction
Cartesian Product Set
Relations, Mapping & Function
Properties of Relations
Operations on Functions
Invertible Functions

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions Slide  2 (of  18)


Learning Outcomes

On completion of this chapter you


should be able to:

 Identify relations which are functions and


determine the domain and range of a
given relation or function and at the same
time performed mapping.

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions Slide  3 (of  18)


Applications

Explain the connection / relationship


• Between a program and a variable it uses.
• Between a computer language and a valid
statement in the language.
• Between elements of sets are represented
using the structure called a relation.
• Between people, numbers, sets, and many
other entities can be formalized in the idea
of a binary relation.
AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Cartesian Product Set

Ordered pairs
An ordered pair consists of two elements, of
which one is designated as the first element
and the other as the second element.
 It is written as (a, b) where a is the first
element and b is the second element.

Def 1: We use the notation aRb to denote that (a,


b)R, and a is said to be related to b by R if aRb.

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Cartesian Product Set

Consider two arbitrary sets,


the set of all ordered pairs (a,b) where a
A and b B is called the product , or
Cartesian product of A and B.
A short designation of this product is A x
B, which is read “A crosses B”, by
definition
A x B = (a,b)a  A, b  B
A x A can be represented as A 2

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions Slide  6 (of  18)


Cartesian Product Set

 A binary relation between set A and B is a


subset of A × B.
 Example :
Given A={1, 2}, B={p, q}.
If R1={(1, p)},
R2={(2, k)} and R3={(1,q), (2,p)}

R1 and R3 are the relations between A and B,


but R2 is not the relation between A and B.

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Example
Let A be the set {1, 2, 3, 4}. Which ordered
pairs are in the relation R = { (a, b)| a divides b }?
Sol :

1 1
2 2

3 3

4 4

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


(2,2), (2,4),
(3,3),
(4,4) }
AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Example . Consider the following relations on Z.
R1 = { (a, b) | a  b }
R2 = { (a, b) | a > b }
R3 = { (a, b) | a = b or a = b } Which of these relations
R4 = { (a, b) | a = b } contain each of the pairs
R5 = { (a, b) | a = b+1 } (1,1), (1,2), (2,1), (1,1),
R6 = { (a, b) | a + b  3 } and (2,2)?
Sol : (1,1) (1,2) (2,1) (1,1) (2,2)
R1 ● ● ●

R2 ● ●

R3 ● ● ●

R4 ● ●

R5 ●

R6 ● ● ● ●
AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Relation
• A relation is a set of ordered pairs.
• The presence of the ordered pair (a,b) in a
relation is interpreted as indicating a relationship
from a to b.
• Domain of R : Dom(R) is the set of all elements
in A that are related to some element in B.
• Range of R : Ran(R) is the set of all elements in
B that are related to some element in A.

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
• The complement of the relation R is defined
as follows:
R = (A  B) – R
(x,y)  R iff (x,y)  (A  B) – R
• For example:
Given A = {1,2,3} and B = {a,b}
AB {(1,a),(1,b),(2,a), (2,b),(3,a),(3,b)}
R {(1,a),(1,b),(3,b)}
R’{(2,a), (2,b), (3,a)}

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Relations

1
 Inverse Relation of R is denoted as R
 Let R is relation from set A to set B, the
inverse of R will be from set B to A.
 For example,
Given A = {0, 1, 2} and B = {a, b}.
R = {(0, a), (1, b), (2, b)}
R-1 = {(a, 0), (b, 1), (b, 2)}

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Example

Given A = {1, 2, 3, 4} and B = {x, y, z}. Let R be the


following relation from A to B:
R = {(1,y), (1,z), (3,y), (4,x), (4,z)}
(a) Find A x B.
(b) Draw the arrow diagram of R.
(c) Find the inverse relation of R.
(d) Determine the domain and range of R.

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions ‹#›


Properties of Relations

Let R be the a relation on a set A,

- R is reflexive
If (a,a)  R for every element a  A.
- R is symmetric
If (b,a)  R whenever (a,b)  R, for some a,b  A.
- R is transitive
If (a,b)  R and (b,c)  R,
then (a,c)  R , for a, b, c  A.

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Properties of Relations

- R is irreflexive
If (a,a)  R for all a  A
 x  A , xR x
- R is antisymmetric if whenever
(a,b)  R and (b,a)  R only if a = b for a,b  A
(if and only if there are no pairs of distinct
elements a and b with a related to b and b
related to a, the only way to have a related to
b and b related to a is for a and b to be the
same element. )

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Properties of Relations
Are the following relations on {1, 2, 3, 4} reflexive?
R1 = {(1, 1), (1, 2), (2, 3), (3, 3), (4, 4)}
R2 = {(1, 1), (2, 2), (2, 3), (3, 3), (4, 4)}
R3 = {(1, 3), (3, 2), (2, 1)}
Sol: R2

Are the following relations on {1, 2, 3, 4} irreflexive?


R4 = {(1, 3), (3, 2), (2, 1)}
R5 = {(1, 1), (2, 2), (3, 3)}
Sol: R4
AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Properties of Relations

Are the following relations on {1, 2, 3, 4} symmetric,


antisymmetric or both?

R1 = {(1, 1), (1, 2), (2, 1), (3, 3), (4, 4)}
R2 = {(1, 1)}
R3 = {(1, 3), (3, 2), (2, 1)}

R4 = {(4, 4), (3, 3), (1, 4)}

Sol: R1 is symmetric, R2 is symmetric and


antisymmetric, R3 is antisymmetric and R4 is
antisymmetric
AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Properties of Relations

Are the following relations on {1, 2, 3, 4} transitive?

R1 = {(1, 1), (1, 2), (2, 2), (2, 1), (3, 3)}

R2 = {(1, 3), (3, 2), (2, 1)}

R3 = {(2, 4), (4, 3), (2, 3), (4, 1)}

Sol: R1

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Question

Let A = {1,2,3}, give a relation R on A such that


R is both symmetric and antisymmetric, but
not reflexive.

Sol :
R = {(1,1),(2,2)}

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions ‹#›


Example
If R is a relation on Z where (x,y)  R when x = y2
Is R reflexive?
No, (2,2)  R. 2  22.
Is R symmetric?
No, (4,2)  R, but (2,4)  R.

Is R antisymmetric?
Yes, if (x,y)  R and (y,x)  R then x = y2 and y = x2. The only
time this holds true is when x = y (and more specifically when x =
y = 1 or 0).
Is R transitive?
No, (16,4)  R and (4,2)  R, but (16,2)  R.

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions ‹#›


Example
Let R be the relation on a set A = {1, 2, 3, 4}.
Determine the following given relations for reflexive,
irreflexive, symmetric, transitive and antisymmetric.

R1 ={(1,1), (1,2), (2,1), (2,2), (3,4), (4,1), (4,4)}


R2 ={(1,1), (1,2), (2,1)}
R3 ={(1,1), (1,2), (1,4), (2,1), (2,2), (3,3), (4,1), (4,4)}
R4 ={(2,1), (3,1), (3,2), (4,1), (4,2), (4,3)}
R5 ={(1,1), (1,2), (1,3), (1,4), (2,2), (2,3), (2,4), (3,3),
(3,4), (4,4)}

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions ‹#›


Properties of Relations

Solution:

Reflexive = R3 & R5
Symmetric = R2 & R3
Transitive = R4 & R5
Irreflexive = R4
Antisymmetric = R4, R5

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Functions
A function f from a nonempty set A to a nonempty set B
is an assignment of exactly one element of B to each
element of A.

We write the function as f : A  B.


Functions are also called mappings or transformations.

- b = f(a) is called the image of a under f, and


f a is called the object of b.
• •
a b= (a) - A is the domain of f and B is the co-domain
- f(A) = { f(a) | a  A} is called the range of f
A B

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
From Relation to Function
A relation f from A to B is a function if:
• Every element of A is related to some element
of B
• An element of A cannot be related to more
than one element of B.
A B A B

1 a 1 a
2 b 2 b
3 3
c c
4 4

A function (many-to-one) Not a function (one-to-many)

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Example
Determine whether the following relation is a
function.
A B A B

α 1 α 1
β 2 β

γ 2
γ 3

A Not a function B A B
Not a function

α 1 α 1
2
β 2 β
3
γ γ
4
a function a function

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions ‹#›


Example
Let f be the function defined by the rule f(x)= X2
f

0 0
1
1 2
3
2 4

Set X Set Y

X2 = Y is a function from X to Y.
Domain is {0, 1, 2} and Codomain is {0, 1, 2, 3, 4}.

f(a)=b, so f(0)=0, f(1)=1 and f(2)=4


Range is {0,1,4}
AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Operations on Functions
Sum of functions
(f +g)(x) = f(x) + g(x)

Difference of functions
(f – g)(x) = f(x) – g(x)

Product of functions
(fg)(x) = f(x) . g(x)

Quotient of functions
(f/g)(x) = f(x)
g(x)

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Example 1

Given f (x)  x  4, g(x)  x  2 2

Find:
1) (f + g)(x)
2) (f - g)(x)
3) (fg)(x)
4) (f/g)(x)

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Composition Functions

 Let g be a function from the set A to the set B


and let f be a function from set B the set C.
 Find the image of a under f and then find the
image of f(a) under g.
 The composition functions f and g, is defined by
(f o g)(a) = f(g(a))

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Example
Let f: AB and g:BC be defined as given below.

Find
a) g o f (p)
b) g o f (q)
AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions ‹#›
Example

Given f (x)  3x 1, g(x)  4x  3


Find:
1) (f o g)(x)
2) (g o f)(x)

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Inverse Functions
Def: Let f be a one-to-one function from the set A to
the set B. The inverse function of f is the function
that assigns to an element b belonging to B the
unique element a in A such that f(a) = b. The
inverse function of f is denoted as f -1.
Hence, f -1(b) = a when f(a) = b.

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Example

Given that f ( x )  2( x  1) 3
, Find
1
(i) f ( x )
(ii) f  1 (16 )

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions
Quick Review Question

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions Slide  34 (of  18)


Summary of Main Teaching Points

•Cartesian product set


•Relations, Mapping & Function
•Properties of Relations
•Operations on Functions
•Invertible Functions

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions Slide  35 (of  18)


Question and Answer Session

Q&A

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions Slide  36 (of  18)


Next Session

Logic and Boolean Algebra

AQ010‐3‐1 Mathematics Concepts For Computing  Relations & Functions Slide  37 (of  18)

You might also like