Presentation is loading. Please wait.

Presentation is loading. Please wait.

Relation and function.

Similar presentations


Presentation on theme: "Relation and function."— Presentation transcript:

1 Relation and function

2 RELATION It is any association between or among objects/elements
Binary Relation is any association or relationship existing between elements of one set, set of inputs called domain, and elements of another set, set of outputs called range. In short, it is a set of ordered pairs.

3 Given sets A and B, a binary relation from A to B or A  B, is a set of ordered pairs (a, b) whose entries a ϵ A and b ϵ B. Each ordered pair (a, b) in a relation is a member of the Cartesian set A x B. Hence, a relation from A to B is a subset of A x B.

4 Examples We can take the set A of students and the set B of programs. We can relate the elements of A to the elements of B by defining that an element a of A is related to an element b of B if a takes b. Suppose that A = {Alvin, Bon, Carla, Daniel} and B = {Computer Science, Information Technology, Business Management, Education} Suppose that Alvin takes Computer Science, Bon takes Information Technology, Carla takes Business Management and Daniel takes Education. Rather than writing long sentences, we can make the ordered pair (a, b), if a takes b, where a ϵ A and b ϵ B. Then the relation can be defined as a set of ordered pairs R.

5 Examples Let A = {1, 2, 3, 4} and B = {u, v, w}.
Let R = {(1, u), (2, u), (3, v), (4, w)} Then R is a subset of A x B so R is a relation from A to B. Notice that: 1 R u but 3 R u

6 Examples Let A = {1, 2, 3, 4} and B = {1, 2, 3, 4}, where R is a relation from A to B defined by a|b, “a divides b,” (a, b) ϵ R. We see that R = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,4), (3,3), (4,4)}

7 Examples If A = {1, 2, 3}, then each of the following is a relation in A: R1 = {(a,b) | a < b} = {(1,2), (1,3), (2,3)} R2 = {(a,b) | a = b} = {(1,1), (2,2), (3,3)} R3 = {(a,b) | a > b} = {(2,1), (3,1), (3,2)} R4 = {(a,b) | a + b = 4} = {(1,3), (2,2), (3,1)} R5 = {(a,b) | b = 4a} = ø or { } R6 = {(1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3)} R2 is called the identity relation R5 is called the trivial relation or void/empty relation R6 is called the universal relation. It consists all possible ordered pairs of elements of a set.

8 The Domain and Range of the Relation
The set of all first elements that occur in a relation is the domain of the relation, and the set of all second elements in a relation is the range of the relation. Ex: Find the domain and the range of the relation R = {(-2,-2), (-1,3), (0,5), (1,-6), (2,9), (3,5), (4,11)} Solution: The domain of R is {-2, -1, 0, 1, 2, 3, 4} The range of R is {-6, -2, 3, 5, 9, 11}

9 Arrow Diagram If the sets A and B are finite, then we can draw a visual diagram describing the relation from A into B. the diagram is called arrow diagram. The symbol (called arrow) represents the relation R. Ex: Let A = {1, 2, 3} and B = {6, 7, 8, 9}. We define the relation R by the set of ordered pairs R = {(1,6), (1,7), (2,6), (2,7), (2,9), (3,9)}

10 The Inverse of a Relation
Let R be a relation R from a set A into a set B. The inverse of R, denoted by R-1, is the relation from a set B into a set A, which consists of those ordered pairs that when reversed, belong to R, that is, R-1 = {(b,a) | (a,b) ϵ R}

11 The Inverse of a Relation
Example: Let A = {2, 4, 6} and B = {6, 5, 7, 9}. We define the relation R by the set of ordered pairs R = {(2,6), (2,7), (4,6), (2,5), (4,9), (6,9)} The inverse of R is R-1 = {(6,2), (7,2), (6,4), (5,2), (9,4), (9,6)}

12 FUNCTION It is a relation that has exactly one output for every possible input. It must satisfy two rules: 1) if there is an input, there should be an output and 2) for each input, there is only one output

13 A function f from a set A to a set B is a rule of correspondence that assigns to each element x in the set A exactly one element y in the set B. The set A is the domain of the function f, and the set B contains the range.

14 Examples Let A = {a, b, c} and B = {1, 2, 3, 4, 5}. Which of the following sets of ordered pairs or figures represent a function from set A to set B? {(a,2), (b,3), (c,4)} {(a,1), (b,2)} d. a a b b c c

15 Examples Which of the following equations represent y as a function of x? x2 + y = 1 y2 – x = 1

16 The Domain and Range of a Function
The domain of a function is the set of all values of the independent variable for which the function is defined. If x is in the domain of f, f is defined at x. The range of a function is the set of all values assumed by the dependent variable y.

17 Domain, Codomain, and Range
Domain – What can go into a function is called the domain. It is the set of all possible inputs. Codomain – What may possibly come out of a function is called the codomain. It is the set of all potential outputs. Range – What actually comes out of a function is called the range. It is the set of the actual outputs.

18 Example Given f(x) = 2x + 1 B A Domain: {1, 2, 3, 4} Codomain: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} Range: {3, 5, 7, 9} 1 2 3 4 5 6 7 8 9 10 1 2 3 4

19 Finding the Domain and Range of a Function
Examples: Find the domain and range of the following functions. f: {(-3,4), (-1,8), (0,-4), (1,4), (3,8), (5,11)} g(x) = 1 𝑥+3 h(x) = 9− 𝑥 2 f(x) = x2 – 3x – 4

20 SPECIAL TYPES OF FUNCTION
1 -1 Function (Injective Function/Injection) Onto Function (Surjective Function/Surjection) 1-1 Correspondence (Bijective Function/Bijection)

21 Injective Functions f is called one to one (or injective) if for all a ϵ A, b ϵ B, a ≠ b  f(a) ≠ f(b) or f(a) = f(b)  a = b Example A function f: Z+  Z defined by f(x) = x2

22 Surjective Functions f is called onto (or surjective) if for every b ϵ B there exists at least one a ϵ A such that f(a) = b, that is, the image of f is B. It means that every value in the codomain is an output of the function. Example A function f: R  R+ defined by f(x) = x2

23 Bijective Functions f is called one to one correspondence (or bijective) if f is both one – one and onto. Example A function f: R  R defined by f(x) = x + 1

24 More Examples Determine whether the ff. functions is injective, surjective or bijective. f(x) = 2x + 1 Ans: bijective f(x) = x Ans: surjective Determine whether the function f from A = {1, 2, 3, 4} into B = {a, b, c, d} with f(1) = b, f(2) = d, f(3) = a and f(4) = c is one – one and onto. Determine whether f(x) = x + 4 is one – one and onto.

25 Here are some examples of different types of correspondences.
A f B one – one but not onto A f B not one – one but onto a b c d 1 2 3 1 2 3 4 a b c

26 Here are some examples of different types of correspondences.
A f B neither one – one nor onto A B not a function a b c d 1 2 3 4 1 2 3 4 a b c d

27 Evaluating a Function Examples
Let f(x) = – x2 + 3x – 5 and find the following: f(2) f(-6) f(a) f(x + h)

28 Composition of Two Functions
The composition of the functions f and g is given by: (f o g)(x) = f(g(x)) (g o f)(x) = g(f(x)) Example: Given f(x) = 3x + 1 and g(x) = 4x – 5, find the following: (f o g)(x) (g o f)(x)

29 Operations on Functions
Let f and g be two functions, then Sum: (f + g)(x) = f(x) + g(x) Difference : (f – g)(x) = f(x) – g(x) Product: (f • g)(x) = f(x) • g(x) Quotient: ( f g )(x) = f(x) g(x) , g x ≠0

30 Examples f g Let f(x) = x2 – 1 and g(x) = 2x + 3, find: f + g f – g

31 The Graph of a Relation or Function
The graph of a relation or function consists of all points in the Cartesian plane whose coordinates satisfy the relation or function. If the relation or function is defined by an equation, the graph of the equation is the same as the graph of the function or relation.

32 Example Draw the graph of the function defined by the equation 2x + 3y = 6. Solution: Solve for y, then assign values for x. Let x = -3, -1, 0, 3, 6 x -3 -1 3 6 y 4 2.6 2 -2

33 The Vertical Line Test (VLT)
VERTICAL LINE TEST: test used to decide if a graph is a function. If no vertical line can be drawn so that it intersects the graph more than once, then the graph IS a function. If any vertical line can be drawn so that it intersects the graph at two or more points, then the relation IS NOT a function.

34 Inverse Functions A function f(x), and its inverse f-1(x) (assuming it has an inverse) “UNDO” each other. Note that f-1(x) ≠ 1 f(x) . Ex: Consider f(x) = 3 𝑥 + 1 and g(x) = (x – 1)3 So do all functions have inverse functions? ---NO If a graph of a function passed the Horizontal Line Test (HLT), then it has an inverse function. Ex: Determine if the ff. has an inverse function: a) y = x2 b) f(x) = 2x

35 Inverse Functions If (a,b) is on f(x), then (b,a) is on f-1(x).
domain of f(x) = range of f-1(x) range of f(x) = domain of f-1(x) To get the graph of f-1(x), reflect f(x) about the line y = x.

36 Finding the Inverse of a Function
Replace f(x) with y. Switch x’s and y’s. Solve for y. Replace y with f-1(x). Examples Find the inverse of each function. f(x) = 𝑥+4 – 3 g(x) = 5𝑥−3 2𝑥+1

37 Exercises Find the inverse of each function, if one exists.
f(x) = 8− 𝑥 2 5 g(x) = −5+5𝑥 −3−3𝑥 y = 8−5𝑥 3 h(x) = 8 8𝑥−3 – 1 y = 3x + 5

38 Do Worksheet 7


Download ppt "Relation and function."

Similar presentations


Ads by Google