Setion 2.3 Funtions Definition: Let n e sets. funtion (mpping, mp) f from to, enote f :, is suset of suh tht x[x y[y < x, y > f ]] n [< x, y 1 > f < x, y 2 > f ] y 1 = y 2 Note: f ssoites with eh x in one n only one y in. If f(x) = y is lle the omin n is lle the oomin. y is lle the imge of x uner f x is lle preimge of y (note there my e more thn one preimge of y ut there is only one imge of x). The rnge of f is the set of ll imges of points in uner f. We enote it y f(). Prepre y: Dvi F. Mllister TP 1 1999, 2007 MGrw-Hill
If S is suset of then Exmple: f(s) = {f(s) s in S}. Z f() = Z the imge of is Z the omin of f is = {,,, } the oomin is = {,, Z} f() = {, Z} the preimge of is the preimges of Z re, n f({,}) = {Z} Prepre y: Dvi F. Mllister TP 2 1999, 2007 MGrw-Hill
Injetions, Surjetions n ijetions Let f e funtion from to. Definition: f is one-to-one (enote 1-1) or injetive if preimges re unique. Note: this mens tht if then f() f(). Definition: f is onto or surjetive if every y in hs preimge. Note: this mens tht for every y in there must e n x in suh tht f(x) = y. Definition: f is ijetive if it is surjetive n injetive (one-to-one n onto). Exmples: The previous Exmple funtion is neither n injetion nor surjetion. Hene it is not ijetion. Z Surjetion ut not n injetion Prepre y: Dvi F. Mllister TP 3 1999, 2007 MGrw-Hill
V W Z Injetion ut not surjetion V W Surjetion n n injetion, hene ijetion Note: Whenever there is ijetion from to, the two sets must hve the sme numer of elements or the sme rinlity. Tht will eome our efinition, espeilly for infinite sets. Prepre y: Dvi F. Mllister TP 4 1999, 2007 MGrw-Hill
Exmples: Let = = R, the rels. Determine whih re injetions, surjetions, ijetions: f(x) = x, f(x) = x2, f(x) = x3, f(x) = x + sin(x), f(x) = x Let E e the set of even integers {0, 2, 4, 6,....}. Then there is ijetion f from N to E, the even nonnegtive integers, efine y f(x) = 2x. Hene, the set of even integers hs the sme rinlity s the set of nturl numers. OH, NO! IT CN T E...E IS ONL HLF S IG!!! Sorry! It gets worse efore it gets etter. Prepre y: Dvi F. Mllister TP 5 1999, 2007 MGrw-Hill
Inverse Funtions Definition: Let f e ijetion from to. Then the inverse of f, enote f-1, is the funtion from to efine s Exmple: f-1(y) = x iff f(x) = y Let f e efine y the igrm: f V W f -1 V W Note: No inverse exists unless f is ijetion. Prepre y: Dvi F. Mllister TP 6 1999, 2007 MGrw-Hill
Definition: Let S e suset of. Then f-1(s) = {x f(x) S} Note: f nee not e ijetion for this efinition to hol. Exmple: Let f e the following funtion: Z f -1 ({Z}) = {, } f -1 ({, }) = {, } Prepre y: Dvi F. Mllister TP 7 1999, 2007 MGrw-Hill
Composition Definition: Let f: C, g:. The omposition of f with g, enote f og, is the funtion from to C efine y Exmples: f og(x) = f(g(x)) g V W f C h i j fοg C h i j If f(x) = x2 n g(x) = 2x + 1, then f(g(x)) = (2x+1)2 n g(f(x)) = 2x2 + 1 Prepre y: Dvi F. Mllister TP 8 1999, 2007 MGrw-Hill
Definition: The floor funtion, enote f (x) = x or f(x) = floor(x), is the lrgest integer less thn or equl to x. The eiling funtion, enote f (x) = x or f(x) = eiling(x), is the smllest integer greter thn or equl to x. Exmples: 3.5 = 3, 3.5 = 4. Note: the floor funtion is equivlent to truntion for positive numers. Exmple: Suppose f: C, g: n f og is injetive. Wht n we sy out f n g? We know tht if then f(g()) f(g()) sine the omposition is injetive. Prepre y: Dvi F. Mllister TP 9 1999, 2007 MGrw-Hill
Sine f is funtion, it nnot e the se tht g() = g() sine then f woul hve two ifferent imges for the sme point. Hene, g() g() It follows tht g must e n injetion. However, f nee not e n injetion (you show). Prepre y: Dvi F. Mllister TP 10 1999, 2007 MGrw-Hill