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

Functions 1

Uploaded by

nathanmunene254
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
42 views

Functions 1

Uploaded by

nathanmunene254
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 14
NB: The results above could not necessarily hold if Ax B = 0. For instance, let A = D = ® and let B = {x} and C = {y} Thea Ax B=andC xD Ax B=CxD However, B ¢ D FUNCTIONS: Def Let A and B be nonempty set sets. A function f from A to Bis a rule that assigns to cach clement of A exactly one element of B. We write f(a) b if bisa unique clement of B assigned by the funetion f to the element a of A. If fis a function from A to B, we write fiA+BorA+B In this case we call A the domain off, denoted dom f, and B the codomain of f, denoted cod f. IF fla) =, we say that b is the image of a and a is the reimage of b. The range, or image of fis the subset of B containing all the images of the elements of A. It is denoted f(A) or range for imf. In other words, f( {b€ B) 3a A, b= f(a) Remark: Functions are also called mappings or transformations. We usu- ally use lower case letters to denote fimetions If fA» B, we say that f maps A to B, Example: T. Consider the following relations: MISSING DIAGRAMS In this case fis a function with domain A = a,b, cand codomain B = 1,2,3,4. Also, f(a) = 3. f(0) = 4, fe) = 4, and f(A) = imf =3 However, gis not a finction since the element a in Ais assigned two distinct elements of B. Similarly, h is not a function since 6 € A is not assigned any clement of B by hy 2, Let A= 1,2,3,4,5 and B= a.bod with f(1) = 5, f(2) = a f(8) = 4, §(1) =a, and f(5) =a. Then f is a function from A to B and im f = a,b,d 3. Let f: 2» Z where f(e) = 22. Then dom = Set of all integers % codf = Set of all integers Z rangef = the set ofall integers that are perfect squares i. {0,1,4,9, 16...) 4. If f(w) = “3, then dom f =R|{0}. Defn: A function is called a real-valued if its codomain is the set of real numbers, and is called integer-valued if its codomain is the set of integers. Defin: Let fi and fo be functions from A to R. ‘Then fi + fo and fifa are also functions from A to B defined v2 CA by: (f+ fala) = fale) + fale) ila) fala) Tet fi and fy be functions from R to R such that (2) =a”. Then (ht h)G@) = Ale) + hala) 2+ (e 22) )= ae 24) ‘Types of Functions Gne-to-one Functions (Injections) A function J is said to be one-to-one (1 - 1), or injection, if and only if J(0) = f(b) implies that a = b for all 2 and y in the domain of f ic. if and only if distinet images in the codomain. A funetion is called injective i itis ono-to-one. NB: A function f is one-to-one if and only if f(a) # f(b) whenever a # b. Example: T. Determine whether the function f from {a, b, ¢, d) to (1,2, 8, 4, 5} with S(a) =4, f(b) =5, flo) = Land f(d) #3 is one-to-one. Solutios Representing the function using an arrow diagrams: MISSING ARROW DIAGRAM Distinct elements in dom have distinct images in codf. So, f is 11 2. Let f :Z > Z where f(x) = 2. In this case f(1) = f(-1) = 1. However, 1 #1. Therefore, the function is not 1 3. The function g : Z + Z, g(x) = 2° 4. The function h:Z > 2, h(a) = 241 is 1~ 1 also, Given a function Jf, to check whether f is 1~1, we first asst ‘Then if we manage to'show that 2 = y, the function is 1 ~ 1. Example: T. Let FRR be defined by f(e) = 2r-+3, Determine whether f is 1—1 or not. = Sly). Solutio Suppose J(21) = f(a), Thea =a=tn ‘Thus, f is not 1 ~1. However, g:R! -R, g(x) = 2? is 1-1. tion. Then if |A| > |B, then f is mot 1 = 1 ‘A function J = A — B is called onto, or a surjections, if and only if Vb © B 3a © A for which f(a) = i.e. if and only if every element in the co-domain has fa pre-image, This in turn implies that f is onto if and only if imf = eodf = B. A function f is called surjective if it is onto, Example: T. Consider the function f and g with arrow diagrams as below MISSING ARROW DIAGRAM ‘Then f is not onto since the element 3 in codf has no pre-image i.e. notexists dom{ for which f(z) = 3. However, f is 1 ~ a ‘On the other hand g is onto since Wy € cod g 5 C dom g such that g() = y. However, g is not 1 1 since g(b) = g(e) =2 yet 6 #e 2. The function f: RR, f(x) = 2 is not onto since R~ (negative real numbers) do not have pre-images. However, 9: R* > R*, g(x) = 2? is onto. 8. The function f : RR, f(z) > 2° is onto, 4. The function f:ZZ*, f(z) =|aj= * t20 2 if r<0 one-to-one. 5. Show that the function f: 2+ %, f(e) =2-+1 is onto Solutio: Vy CZ, ae € 2, f(x) = y. Thisis 90 because f(x) = yif and only if +1 Which is the ease if and only if = y ~ 1 NB: lf f: A Bisa fimetion and |A| <|B\, then f is not onto. Bijections: ‘A fanetion J : A+ B is called a bijection, or a one-to-one correspondence, i itis both 11 and onto. In this ease we say that f is bijective Example: T. Let fbe the function from {a,b,¢,d} to {1,2,3,4) with f(a) = 4, #(2) = 2, fle) =i, and f(a) MISSING ARROW DIAGRAM The function f is both 1 — 1 and onto. Hence, fis a bijective. 2, The function f : RR, f(r) = 2° is a bijection since itis both 1-1 and onto. However, 9: R with g(x) = x is not a bijection since it is not 1-1 or onto, 3. The function f :Z > 2, f(z) = # +1 is a bijective. im: If f : A» B is a bijection, then |A| = |B. is onto but not Due to one-to-oneness || = |f(4)] and due to ontoness |f(A)| fore |A| = |B] Identity Function: For norempty set A, there exists a trivial mapping that maps every element of A to itself, This is called the identity funetion, denoted by i. Soi: A> A such that a(a) =a Va € A. The identity function is one-to-one and onto, s0 it 3s a bijection. Example: Tet A= (,2,3,4). Then i: A> A, i(a) =a Yae A, ie i(1) = 1, 12) = (8) = 8 and a(4) = 4. From an arrow diagram point of view. MISSING AN ARROW DIAGRAM Constant Funetion Let f: A> B be a function. Then / is called a constant fanetion if there is a Bxed clements b ¢ B such that f(a) =b Vac A Example: Let A={1, 2, 8, 4} and B = {a, b, c}. Deine f : A + B such that J() = F2) = f(3) = f(4) = 4. Then, f is constant function. MISSING ARROW DIAGRAM Inverse Functions Bl. There- 2 Suppose { : A > B is a bijection. Since f is onto, then every element bc B Js the image of some element a C A. Also, since J is 1-1, then for every 6 < B there is a unique a € A such that b= f(a). Consequently, we can define a new function from B to A. This function is called the inverse function of f, denoted by f-1.If f(a) =0, then f-4(6) =a NB: 1. A function f is invertible (i.e. has an inverse f-2) if and only if it is bijective 2. The inverse function J is not the same as the function $ Exampl T. Find the inverse function of f : R + R where f(z) 1x ~ 3. Making 2 the subject we have My) Now, replace 2 with y~ pies So that f-'(x) = = 2, Find the inverse function of f sR + R f(x Solution: Tet y= f(z) = 3H > day + Ty Je) and y and 2 gives aa=5e soap =F) Replacing 3 with (x) and y with a we have f@)=Ee 3. Let f be a function from {a, b, c} to {1, 2, 3} such that f(a) = 2, J(8) = 3 and f(c) = 1. Then f is invertible since itis a bijection. Furthermore, £72) =a, $43) = b and f-*(1) =e. MISSING DIAGRAM ARROW 4. ‘The function f : Z-> Z such that f(2) = +1 is invertible with Jy) =y—Lwhile the function g: +R where g(z) = x? is not invertible Since g is not 1 - 1 oF onto, ‘Composition of Functions Suppose two functions are such that the codomain of the fxs is equal to the domain of the second. Then we can define a function from the domain of the first to the codomain of the second comprising of the two functions following each other. For instance, let [A> B and g : BC be functions. We can define a fanction from A'to C which would be f followed by g, denoted by gof and read as “g composition £". Such a function is called a composite function. 43 MISSING ARROW DIAGRAM Clearly, (gof)(a) = a f(a). NB: In the case above fog is not defined since cod g # dom £ a,b, ch, BH{L, 2, 3), Cmfz,y,2} and let fA > B with F(a) =2, f(6) =3, fle) = L and g: B+ © with o(1) = 2, 9(2) =, 9(8) =y ‘Then gof is defined since cod J dom g. In this ease (oof la (90H) Gof)lo Note that fog is not defined since cod g¥ dom f MISSING ARROW DIAGRAM 2. Let f: R > Rand g: R + R be defined by f(a) = 2? +1 and g(a) = 22 ~5 respectively. Then Tn general, fog # gof. In other words, composition of functions is not commutative ‘A composition of two bijections is another bijection 3, Let fig: ZZ be deained by f(x) = 22-+3 and g(x) = 3¢ +2, Find Jog and gof NB: For any three functions j, 9 and hy (fog)oh = folgoh). Tis is clear since [Foa)ohlx = [Foath(z) = Ftothte)i} And [fo(goh)]x = F{lgoh](z)} = F{a{h(2)]} Example: et fig, Then [fog)oh|x = [fo(goh)](x) ZZ where fz) = 30+2, glx) = 2? ~ 8 and h(x) = 2x 41 Salh(o)]} = Hoax +1} = {22+ 1)? 3} = F{4x? +42 — 2} (4x? + 4 — 2) +2 = 122? + 122-4 ‘Theorem: If f : A> B is a bijection then fof-! = frtof =i Proof Recall that if f(a) = b, then J-4(0) =a for a bijection J: Now (Fof")(0) = FLO) (a) > foft=i Also Flofla) = F(a} =F) > flop =i Therefore, fof"! = fo} Exercise: at if both f: A> Band g: B+ C are surjectives then gof is also how surjective Functions that Involve Cartesian Produets of sets Since in the definition of a function we require the domain and the codomain to be non-empty, either of the two or even both may be a cartesian product of sets, Example: T. The function f : 2» %, fle first integer in the pair. ‘The fiction is onto but not 11. Eg. f(0, J(0,2)=0 2. Similarly, the function g : Z x Z + Z, f(a,b) = 2a ~ bis onto but not 1-1, Eg, 9(1,1) = 9(0,-1) METHODS OF PROOF = 2 assigns to each pair of integers the + Theorem. fa statement that can be shown to be true. Less important theorems are called propositions, Theorems can also be reffered to as facts or * Proof - a valid argument that establishes the truth of a theorem, ie. a demonstration that a theorem is true. ‘+ Axioms / Postulates - statements that are used in the proof of another theorem, ‘+ Lomma - a simple theorem that is used in the proof of another theorer, 45 ‘+ Corollary - a theorem that can be established directly from the theorem that has been proved, ie. a consequence of a theorer. ‘+ Conjecture - a statement that is being proposed to be true but that has ot been proved i.e, its truth value is unknown, When the proof of a conjecture is found, the conjecture becomes a theorem. 1. Direet Proof This is a proof p > q is true that proceeds by showing that q is true when pis true. One begins with the premise p and comes up with some intermediate propositions p2, po; ; Pus and end with the conclusion q, Le. p> pi -* pe > Pn 4. Sometimes when coming up with the intermediate propositions one urgues from both propositions p and q. This is called forward - backward reasoning. Examples: T. Use direct proof to proof that if a is odd and b is even, then ab is even, Proof: Tras odd, then a= 22 + 1 for some x € Zand if bis even, then 5 = 2y for some y © Z Now: ab = (20+ 1)2y = dey + 2y (2ry + y) where 2ry ty eZ Thus, ab is even 2. Proof that the produet of two odd numbers is odd. Proof, Suppose both a and 6 are odd, Then a = 2m +1 and b= 2n+1 where m,n©Z. Now, (2m + 1)(2n +1) ymin + 2m-+2n +1 (2mn m+n) 1 Which is odd 4, Proof that the product of any two rational numbers is rational Pro! Tet a,b € Q. Then a= 2 and ab=E xt =! Wilere pr, gs © % and gs #0. Hence ab is rational. 4. Proof that if m and n are perfect squares, then mn is also a perfect square. Pro! Suppose m = where p,q.n.s € Zand q,840, Now, and n= y? where 2,y € Z. Then fay)? where 2.y € Z Therefore, mn is a perfect square 5. Give a direct proof for the statement that “if gis even, then 4 divides q?" Proof: Suppose q is even. Then 3 ¢.¢ Z such that q = 2 Now, So, 4 divides q?. 6. Proof that if n is an odd integer, then n? is also odd. Proot Suppose n = 2p-+ 1, p 2 ‘Phen n?= p+ 1)2p-+1) ip? + 4p +1 (2p +2p) +1 Which is odd 2. Proof by Contraposition: ‘This method makes use of the fact that the conditional statements p> @ is equivalent to its contrapositive ~ q —r~ p. So, the conditional p ~» q can be proved by showing that its contrapositive, ~ g ->~ p, is true ‘This method is used when we cannot easily find a direct proof. Such a proof is called an indirect proof Example: 1. Prove that ifn is an integer and Sn +2 is od, then n is odd Proof The corresponding contrapositive is fn is even, then 3n +2 is even’ Suppose n is even, Then n = 2k, k € 2. (2k) +2 = 2(3-+1) where Bk+1¢Z So, n +2 is even, 2. Show that 2 is odd if 2? is odd, ugh to show that if x is even, then 2 is even also. Suppose z is even. Then x = 2p, p eZ = 2(2p) where 2p ¢ Z So, 2? is even. 3. Prove that if'n = ab for some positive integers @ and b, then a < VF or be yi. Proo! The contrapositive of the given statement is “if a > yi and b> yi then n fab" Suppose a> Yi and b> YR. Then ab > Vy = So, ng ab 3. Proof by Contradiction: Suppose p is a proposition. We can prove that p is true by showing that ~ pis false; this can be done by showing that ~ p— (qA ~ q) is true for some ie. n 0 then p(n) is true for every n € N. Examples: 1, Show that the suin of the fist m natural numbers is V npn) is true where pn) is Proof Wo show that 12) 342. ¢ = Sb "There are two stops involved (@) Base step: Prove for n= 1-2-1 (b) Inductive step : Assume true for n = and prove for n = k+1 For n =k, then 142434 ...¢4 = High Form =k 41 THES 4 REA) = MD 4) So true for n= KF Since true for n= 1 and true for n= k-+ 1 whenever true for m= h, then it is true for every n > 1 2. Prove that the sum of the first even m even natural mamber is n(n + 1) Prool 2416+. }2n=n(n+1) Cheek if itis true for n= 1 2=10) Hence true for n = 1 ‘Assume true for n =k, then 2HAt GH... 42k = W(k+1) Forn=k+1 2A G6 on | Db+AWk+ 1) +2k + 1)= (K+ IVE +2) Since true for n=1 and true form = k +1, whenever true for n =k, it is true for every n > 1 3, Prove that the sum of the first n odd natural numbers is n?. 49 Prooft Te 3454. }Qn4 1 ant Check for n = 1, 1=1°, hence true for n = 1 Assume true for n =k, then 12345=... + (2k-1)=? Forn=k+1 T4454 ob Qk ~1)+(2k41 Since true for n = 1 and true for n true for all values of n> 1. 4. Prove that the sum of the squates of the frst n natural numbers is An(n+1)(2n +1) Proof: Tyo ast +n? = dnl + n+ 1) Check for'n = 1 P= 22E Assume true for n P+ P43 +..+h Forn=k+1 Pe 4 Fst +R +LP AELR(2R +1) + 6k +1) (2k? + 7h +6) Bk +2)(0 +3) HA U(k +1) + 12 +1) + 1) So, true for n= k-+ 1 whenever true for n = k. Therefore, itis true for all positive integers n > 1. 5.149 +5 ++ 2m — 1)? = Sndn? - 1) Forn=1 12 = 2(1)[4(1) ~ 1) = 1, hence true for n =1 Assume true for n =k; then 14384 58 44 (2b 1)? = gh(AM 1) Forn=k+1 P4945? 4.4 (2k 1)? + fe +1) -1P u(ak? — 1) + (2-41) — 1? wWosapiu — pisyKor yisdisy wae taes — 94 4 1)(Qk +3) a eae sess OS aR? 4 Bh 4 3) i Be a(R? + 28 +1) — 1) Bea? + 2k +1) ~ 1) = Se +1)? -1) ace +121] kaye + 1 whenever true for m= ik is 1, hence true for n , then de(e-+ 1)(2k-+ 1) Bak + 1)(2k +1) + (+1)? lever true for n= k. ‘Therefore, it is true for all So, true for n= kh positive integers. 6. Show that 8? — 1 is divisible by 7 for all positive integers n Proof (1) so true for n Suppose true for n= k 124324574... 4 (2k 1)? + [atk +1) IP (AR? ~ 1) + 204 1) = 1? Haein a aki yae-1ys92469) we seaphie _ akenwas ysa(esn] © wee yo yaks] _ aey GE ss ee + eae Tiess — WEN, + 1)(2k-+3) cesiaetaabasked — (442 + Bh +3) = Geass Wg? + 2k +1) — 1] Shae? + 2+ 1) — 1) = Bae + 7-1) = SP e+e So, true for n =k +1 whenever true for n =k. ‘Therefore itis true for all positive integers n 7. Show that 8" ~ 1 is divisible by 7 forall postive integers. Proo! For n=1,7-8! Suppose true for n Bka1 For n = k +1 Check if 8**1 — 1 is divisible by 7. git paar 147 ght] 18.1 +8.1-1=8(72) +7 (8 — 1) +7 = 7(82 +1) => T divides 8**! —1 So, true for n = k-+ 1 whenever true for n = k. Therefore, true for all positive integers. 8. Show that 8 is a factor of 9" ~ 1 for every positive integer n. Proo! so true for n k 8(1) so true for n= Suppose true for n= k, k€ Z~ 8(t), kez ke =o 949 — ‘True for n. NUMBERS ‘+ The set of all natural numbers (positive integers) is N= (1,2,3,4,...}(ltis also denoted by Z*) + The set of non-negative integers ig zronnes — (0,1,2,8,4, ..} = Z* U {0} ‘+ The set of integers (whole number is) Bay B-2,-1,0,1,2,34,..} 4 The set of rational numbers is Q= (ele = $,0,b€ 2,54 0 and geda,2) = 1} Numbers that are not rational are called irrational. ‘The set irrational numbers is denoted Q* ‘« The set of all peal numbers is given by R= QUQE. ‘* A.complex number is one of the form a-+bi where a and bare real numbers ‘while ‘is the imaginary number defined as i = VT. The set ofall complex. numbers is denoted by C. NB:NCZcQcRe ‘* A positive integer p is called prime if it has exactly two positive divisors, namely 1 and p itself. ‘The frst few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19 and 23. The number 2 is the only even prime number. * An integer n > 1 is called composite if it is not prime. In other words 1 is composite if there exists two integers a and b with 1

You might also like