Presentation is loading. Please wait.

Presentation is loading. Please wait.

Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.

Similar presentations


Presentation on theme: "Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated."— Presentation transcript:

1

2 Relations and Functions

3 ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated as the first element and the other as the second element. An ordered pair is denoted by (a, b) Two ordered pairs (a, b) and (c, d) are equal if and only if a = c and b = d

4 ORDERED PAIRS AND PRODUCT SETS Example 1: The ordered pairs (2, 3) and (3, 2) are different. Example 2: The set {2, 3} is not an ordered pair since the elements 2 and 3 are not distinguished in a set. Example 3: Ordered pairs can have the same first and second elements such as (1, 1), and (4, 4)

5 ORDERED PAIRS AND PRODUCT SETS The set of all ordered pairs (a, b), where a € A and b € B, is called the Cartesian Product, or simply the product set, of the two sets. Cartesian Product of set A and set B is denoted by

6 ORDERED PAIRS AND PRODUCT SETS Example : Let A = {1, 2, 3} and B = {a, b} The product set is: Example : Let W = {x, y} Then W*W = {(x, x), (x, y), (y, x), (y, y)} Theorem : Let A and B be sets. If |A| = n, and |B| = m, then

7 SOME SPECIAL SETS Ø denotes the “null” or “empty” set Z denotes the set of integers, i.e. Q denotes the rational numbers. The rational numbers are those real numbers that can be expressed as the ratio of two integers. denotes the irrational numbers. A number that is not rational is irrational. N denotes the natural numbers. N = {1, 2, 3, 4, 5,...} R denotes the real numbers. Real numbers are the rational and irrational numbers.

8 DEFINITION OF RELATION A binary relation between sets A and B is a subset of. That is, a binary relation is a collection of ordered pairs from If A and B are equal, we refer to the relation as a relation on the set A.

9 DEFINITION OF RELATION Example : Let A = {1, 2, 3} and B = {a, b} Define some relations between A and B

10 DEFINITION OF RELATION The domain of a relation R is the set of all first elements of the ordered pairs that belong to R. The range of R is the set of second elements of the ordered pairs that belong to R.

11 DEFINITION OF RELATION Example : Let A = {1, 2, 3}, and let R be the relation on A defined by R={(1,3),(2,3),(2,2)} The domain of R is {1, 2} The range of R is {2, 3}

12 REPRESENTING RELATIONS Relations can be represented by listing the elements, or they can be represented graphically, by using pictures, or by using a matrix

13 PICTORIAL REPRESENTATION OF RELATIONS Example : Let R be a relation from A = {1, 2, 3} to B = {a, b} where

14 GRAPHICAL REPRESENTATION OF RELATIONS Another way of picturing a relation when it is from a finite set to itself is to write down the elements of the set and then draw an arrow from an element x to an element y whenever x is related to y. This type of diagram is called a directed graph of the relation.

15 GRAPHICAL REPRESENTATION OF RELATIONS Example :The directed graph of R = {(1, 2), (2, 2), (2, 4), (3, 2), (3, 4), (4, 1), (4,3)} on the set A = {1, 2, 3, 4} is:

16 GRAPHICAL REPRESENTATION OF RELATIONS We will use the following graphical representation to represent a relation. Example :Let A = {1, 2, 3}, and let R be the relation on A defined as R = {(1, 2), (2, 1), (2, 3), (3, 1), (3, 3)}

17 MATRIX REPRESENTATION OF A RELATION The more commonly used representation of relations that is also more convenient for computations is using a matrix to represent a relation. Let A be a set with n elements, and let B be a set with m elements.

18 MATRIX REPRESENTATION OF A RELATION Let R be a relation between A and B. Define the matrix M by for i = 1,..., n and j = 1,..., m. M is called the logical matrix for R.

19 MATRIX REPRESENTATION OF A RELATION Example : Let A be the set, and let B be the set Let R be the relation between A and B R = {(1, 1), (1, 2), (2, 1), (3, 2)} Write the matrix representing R. Since |A| = 3 and |B| = 2, the matrix representing R must have three rows and two columns. In row 2, column 2, for instance, the entry will be false since (2, 2) is not an element of R, i.e.

20 PROPERTIES OF RELATIONS Relations on a set can be classified according to certain properties. Let R be a relation on a set A. We say that R is reflexive if We say that R is symmetric if We say that R is transitive if

21 REFLEXIVE Let R be a subset of. Then R is called a reflexive relation if, Example : The directed graph of every reflexive relation includes an arrow from every point to the point itself, i.e

22 REFLEXIVE Example : Let V = {1, 2, 3, 4} and R = {(1, 1), (2, 4), (3, 3), (4, 1), (4, 4)} Then R is not a reflexive relation since (2, 2) does not belong to R. All ordered pairs (a, a) must belong to R in order for R to be reflexive.

23 SYMMETRIC Let R be a subset of, then R is called a symmetric relation if Example: The reason for the name of the symmetric property can be seen in the matrices below. Notice that each of the matrix representations for the symmetric relations are symmetric with respect to the main diagonal.

24 SYMMETRIC Directed graph representations of symmetric relations are also readily recognized because for every arrow from a to b there must also be an arrow from b to a. Example : Let S = {1, 2, 3, 4}, and let R = {(1, 3), (4, 2), (2, 4), (2, 3), (3, 1)} Then R is not a symmetric relation since but

25 TRANSITIVE A relation R in a set A is called a transitive relation if and Note that it is not easy to determine if a relation is transitive from either the matrix or the graph representation. Example: R= { (1,1),(1,3),(3,2),(1,2)} on S3 is transitive

26 EQUIVALENCE RELATIONS A relation ~ on a set S is called an equivalence relation if it has the following three properties: (1) Reflexive property (2) Symmetric property (3) Transitive property A relation is an equivalence relation if it is reflexive, symmetric, and transitive.

27 ANTISYMMETRIC We say that R is anti-symmetric if for all (a,b) belongs to R and ( b,a) belongs to R then a = b Do not confuse the anti-symmetric property with the absence of the symmetric property either. There are also relations that are neither symmetric nor anti- symmetric. Example: R={(1,1),(1,2),(3,3),(3,2)} on S3 is Antisymmetric.

28 ASYMMETRIC We say that R is asymmetric if for all (a,b ) belongs to R and ( b, a) doesn't belongs to R. Example : R={(1,1),(1,2),(3,3),(3,2)} on S3 is not asymmetric because (1,1) and (3,3) belongs to R Example: R = {(1,2),(2,3),(1,3)} on S3 is asymmetric.

29 IRREFLEXIVE We say that a relation R on a set A is irreflexive if for all ‘a’ belongs to A then (a, a) doesn't belongs to A. Do not confuse the irreflexive property with the absence of the reflexive property. There are relations that are neither reflexive nor irreflexive. Example: R = {(1,2),(1,3),(2,3),(3,1)} on S3 is irreflexive.

30 UNIVERSAL RELATIONS/EMPTY RELATIONS Let A be any set then is known as the universal relation. Let A be any set, then Ø is know as the empty relation

31 INVERSE RELATIONS Every relation R between sets A and B is a subset of We can reverse the roles of A and B to obtain a relation between B and A called the inverse relation of R. The inverse relation of R, denoted, is the relation between B and A given by Example: R = {(1,2),(1,3),(2,3),(3,1)} on S3,then = {(2,1),(3,1),(3,2),(1,3)}.

32 COMPOSITE RELATIONS Let R be a relation between sets A and B, and let S be a relation between B and C. The composition of R and S is the relation between A and C, denoted and is given by: ={(x, z): x € A, z € C ⁆ y € B (x, y)€ R and (y,z)€ S}

33 COMPOSITE RELATIONS Example : Graphically represent a composite relation. One can view the composite relation as a means of linking elements of A to elements of C by using elements of B as intermediate points

34 INTRODUCTION TO FUNCTIONS A function is an association of exactly one object from one set (the range) with each object from another set (the domain). This means there must be at least one arrow leaving each point in the domain. Also that there can be no more than one arrow leaving each point in the domain

35 ELEMENTS OF A FUNCTION We write to indicate that f is a function from A to B. The set A is called the domain of f. The set B is called the co-domain of f. The range of f denoted by f [A], is the set of all images; that is, The pre-image or inverse image of a set B contained in the range of f is denoted by and is the subset of the domain whose members have images in B.

36 INJECTIONS Let be a function. The function f is called an injective function, or an injection, if implies x = y Graphically this means that if two arrows arrive at the same point in B, they must come from the same point in A, and therefore they are the same. An injective function is also called a one-to-one function, or a function

37 INJECTIONS Example : Graphically represent an injective function one-to-one function

38 SURJECTIONS The function f is called a surjective function, or a surjection, if for each Graphically this means there must be an arrow arriving at each point of B. A surjective function is also called an onto function.

39 SURJECTIONS Example : Graphically represent a surjective function onto function

40 BIJECTIONS A function can also be neither 1 -1 nor onto, or it can be both 1 -1 and onto. If a function is both 1 - 1 and onto it is called a bijection or bijective function.

41 BIJECTIONS Example : Graphically represent a bijective function or

42 BIJECTIONS Example : Graphically represent a function that is neither 1 - 1 nor onto or

43 Some Facts.. A graph of a function f is 1 - 1 iff every horizontal line intersects the graph in at most one point. A graph of a function f is onto iff every horizontal line intersects the graph in at least one point. The codomain and the range are equivalent iff the function is onto.

44 COMPOSITE FUNCTIONS As functions are subsets of relations, the composition of a function is the same as for relations.The composition of two functions f and g is denoted by f o g(x). Example : If f(x)=2x +3 and g(x) = x+2 find fog(x).

45 INVERTABLE FUNCTIONS Any function f has an inverse relation, The inverse relation does not need to be a function. If the inverse relation of a function is a function, we say that the function is invertible. Steps to find the inverse of any function y = f(x) 1.Find the value of x in terms of y. 2.Interchange x and y. 3.The result of step 2 will be the inverse of the given function Example: Find the inverse of the function f(x) = 4x – 1

46 The End


Download ppt "Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated."

Similar presentations


Ads by Google