Presentation is loading. Please wait.

Presentation is loading. Please wait.

5.1 Functions.

Similar presentations


Presentation on theme: "5.1 Functions."— Presentation transcript:

1 5.1 Functions

2 Relations are in a Domain, Range format
A function is a relationship between two sets of numbers. A function maps a number in one set to a number in another set. Notice that a function maps values to one and only one value. Two Domain values in one set could map to the same Range value. One Domain value must never map to two Range values….that would be a relation, not a function. DOMAIN RANGE f is a function of A to B Domain A = {-1, 1, 7, 5} Range B = {1,49,25} Relations are in a Domain, Range format f = {(-1, 1),(1,1),(7,49),(5,25)} -1 1 7 .5 1 49 25

3 Relation S = {(1,x),(1,y),(2,z),(3,y)} R S
Domain A = {1, 2, 3} Range B = {x, y, z} Relation R = {(1,x),(2,x)} Relation S = {(1,x),(1,y),(2,z),(3,y)} R S R is a function S is not a function because 1(Domain) is related to x (Range) and y (Range). 1 2 3 x y z 1 2 3 x y z

4 Special Types of Functions
A function can be any or all of the following: One to one Onto Everywhere defined -A function is one to one if a unique element of A is a function with a unique element of B -A function is onto if each element of A is a function with each element of B -A function is everywhere defined if each element of A is a function with any element of B

5 A = {a1, a2,a3} B = {b1,b2,b3} C = {c1, c2 } D = {d1, d2, d3, d4 } f1 ={(a1,b2),(a2,b3),(a3,b1)} everywhere defined, one to one, onto f2={(a1,d2),(a2,d3),(a3,d4)} Not onto, everywhere defined, one to one f3={(b1,c2),(b2,c2),(b3,c1)} Not one to one, onto, everywhere defined f4={(d1,b1),(d2,b2),(d3,b1)} Not everywhere defined, not onto, not one to one…still a function….its just not special

6 Composition of two functions:
Function f is A to B f : A B Function g is B to C g: B C The composition of f and g is denoted g f and is a relation and a function. Theorem 6 of section 4.7 (g f)(a) = g(f(a)) The composition of f and g of a is equal to the function g of function f of a.

7 Example A= B = Z C is the set of even integers
The function of f is A to B f: A B The function g is B to C g: B C The function f of a = a f(a) = a + 1 The function g of b = 2b g(b) = 2b Find g f (find the composition of f and g) (g f)(a) = g(f(a)) (formula) = g(a + 1) = 2(a + 1) We are substituting the formula for f(a + 1) into the formula for g(2b) where b becomes a + 1.

8 Finding the inverse of a one to one function:
The function must be a one to one function in order to find the inverse. Replace f(x) by y in the equation for f(x) Interchange x and y. Solve for y Replace y by f -1 (x) (The inverse of f of x)

9 Example: Find the inverse of f(x) = 7x-5 Replace f(x) with y y = 7x-5
2. Interchange x and y x = 7y (This is the inverse function) 3. Solve for y x + 5 = 7y (result of adding 5 to both sides) x + 5/7 = y (result of dividing both sides by 7) Replace y by f -1 (x) f -1 (x) = x + 5/7

10 The function of x f(x) = 7x – 5
f(x) = changes x by multiplying by 7 and subtracting 5. The inverse function changes x by adding 5 and dividing by 7. f -1 (x) = x + 5/7 The process can be checked by showing that f(f -1 (x)) = x and f -1 (f(x)) = x

11 f(f -1 (x)) = x f(x) = 7x – 5 Replace x with inverse x + 5/7

12 f -1 (f(x)) = x f -1 (x) = x + 5/7 Replace x with 7x – 5 7x – 5 + 5/7 = x 7x/7 = x x = x

13 In your homework If you are given g(b) = 2b (the function g of b = 2b) Find g g (the composition of g and g) The answer is 4b and If you are given g(b) = b2 (the function of g of b = b2 and asked to solve (g g) (the composition of g and g) The answer is b4

14 One to one functions are used in cryptology
One to one functions are used in cryptology. Many secret codes are simple substitution. In this example the alphabet is rearranged on the bottom row using the keyword Destiny. Using the top to bottom approach, the phrase “THE TRUCK ARRIVES TONIGHT” is encoded by finding T on the top row and using the letter on the bottom row that corresponds to the t, in this case Q. DESTINY is the keyword A B C D E F G H I J K L M N O P Q R S T U V W X Y Z D E S T I N Y A B C F G H J K L M O P Q R U V W X Z THE TRUCK ARRIVES TONIGHT QAI QORSF DOOBUIP QKJBYAQ

15 f(D) = T f(A) = D f -1 (A) = H f(B) = E f -1 (B) = I f(R) = O f(C) = S f -1 (C) = J The inverse function is used by using the table from bottom to top. The code CKAJADPDGKJYEIDOT is constructed from the bottom row and is decoded using corresponding top row letters. This is showing one to one because you can encode and decode using the same arrangements of letters. JOHN HAS A LONG BEARD CKAJ ADP D GKJY EIDOT


Download ppt "5.1 Functions."

Similar presentations


Ads by Google