advertisement

Functions and Relations Number Systems Natural Numbers N (1,2,3,-----) Integer Numbers Z (German word Zahen), (---,-1,0,1,2,3,---) Rational Numbers Q ( Quotient, p/q, p and q are integers, q≠0) Number Systems Real numbers R (includes all other numbers, decimal, irrational numbers) Complex numbers C x and y are real and i 1 x iy Functions and Relations Relations: Let S and T be sets. A relation on S and T is a subset of S×T. If R is a relation then we write either (s,t) R, or sometimes sRt to indicate that (s,t) is an element of the relation. We also write s~t when the relation being discussed is understood. Relations Example: Let S=N, T=R, Define a relation s t s 1 R by (s,t)ЄR if For instance (2,5)ЄR, (4,17)ЄR, (5,10)R Relations The Domain of a relation R where sЄS such that there exists a t Є T with (s,t)ЄR. The Image of the relation R is a set of tЄT, such that there exists a sЄS with (s,t)ЄR. (sometimes called Codomain or Range) Relations Example: Let S=N, and T=N. Define a relation R on S and T by the condition (s,t)ЄR if Observe that, for any element sЄS=N, S=1 » 1‹ 2, s=2 » 4‹ 5 the number satisfies 2 s t t s 1 2 s2 t Relations Therefore every sЄS=N is in the domain of relation. Now let us think about the image. The number 1ЄN=T cannot be in the image since there is no element sЄS=N such that 2 s t Relations However, any element t Є T that exceeds 1 satisfies 2 1 t Thus the image of R is set t N: t 2 Relations Example: S=N, T=N, (s,t)ЄR if Is itself a perfect square. For instance: (3,4)ЄR, (4,3)ЄR, (12,5)ЄR , (5,12)ЄR s t 2 2 Relations Domain of R We can see number 1=s Є S is not in the domain of R, because Is not a perfect square Also number 2=s Є S is not in the domain of R, because Is not a perfect square The domain of R is a set {s Є S : s›2} 1 t 2 2 t 2 2 2 Relations Image of R: Also 1+2 are not in the Image of R Then the image of R is a set {t Є T : t ›2} In fact both the domain and image of R have infinitely many elements. Relations Definition: If S=T=A, then S and T are the same set R be a relation on a set A. We say that R is an equivalence relation if the following properties hold: R is reflexive, symmetric, and transitive. Relations R is reflexive : if xЄA then (x, x)ЄR R is symmetric : if (x, y)ЄR then (y,x)ЄR R is transitive : if (x, y)ЄR and (y, z)ЄR then (x, z)ЄR, Relations Equivalence Classes: Let R be an equivalence relation on set A=S=T. If xЄA then define Ex={yЄA: (x, y)ЄR} Or EsתEt=Ø, or Es=Et Relations Example: If (x , y)ЄR or x~y if x and y have at least one biological parent. We will check if R is an equivalence relation? R is reflexive : if xЄA then (x, x)ЄR R is symmetric : if (x, y)ЄR then (y, x)ЄR R is not transitive : if (x, y)ЄR and (y, z)ЄR then ( x , z) R Relations A*B»x B * C » y y is related to x C * D » z y is related to z, but z is not related to x Then R is not transitive also R is not equivalence relation. Relations Exercises: 1) Consider the relation on Z defined by (m, n) ЄR if m+n is even. Prove that this is an equivalence relation. What are the equivalence classes? Answer: If nЄZ then n+n=2n is even so (n,n)ЄR Then R is reflexive Relations If (m,n)ЄR, then m+n is even so n+m is even hence (n,m)ЄR, then R is symmetric. If (m,n) ЄR, and (n,p)ЄR, then m+n=2r is even and n+p=2s is even thus m+n+p=2r+2s so m+p=2r+2s2n=2(r+s-n) is even then (m,p)ЄR So R is transitive. Relations Then R is an equivalence relation The equivalence classes: Are the set of even integers and the set of odd integers. Relations 2) Consider the relation on Zx(Z\{0}) define by (m,n)R(m’,n’) provided that m.n’=m’.n. Prove that this is an equivalence relation. Can you describe the equivalence classes? Answer: If (m,n)Є Zx(Z\{0}) then m.n=m.n so (m,n)R(m,n) then R is reflexive. Relations If (m,n)R(m’,n’) then m.n’= m’.n so that m’.n=m.n’, hence (m’,n’)R(m,n), so R is symmetric. If (m,n)R(m’,n’) and (m’,n’)R(m’’,n’’), then m.n’=m’.n and m’.n’’=m’’.n’ hence m.n’.m’.n’’=m’.n.m’’,n’ Cancelling m’.n’» m.n’’=m’’.n hence (m,n)R(m’’,n’’) so R is Transitive. Then R is an equivalence relation Relations The equivalence classes: Are ordered pairs (m,n) such that the ratio of m to n represent the same fraction. For instance (1,2), (3,6), and (10,20) are in the same equivalence. Relations 3) Consider the relation defined on the cartesian plane by (x,y)R(x’,y’) if y=y’. Prove that this is an equivalence relation. Can you describe the equivalence classes? Can you pick a representative (that is, an element) of each equivalence class that will help to exhibit what the equivalence relation is? Relations If (x,y)ЄR.R then y=y so (x,y)R(x,y) then R is reflexive. If (x,y)R(x’,y’) then y=y’ so that y’=y hence (x’,y’)R(x,y), then R is symmetric. If (x,y)R(x’,y’) and (x’,y’)R(x’’,y’’) then y=y’ and y’=y’’ so that y=y’’ hence (x,y)R(x’’,y’’) then R is transitive. So R is an Equivalence relation. Relations The equivalence classes: Are horizontal lines. A useful representative for each equivalence class is the point where the line crosses the y axis. Relations 4) Let s be the set of all living people. Let x,yЄS. Say that x is related to y if x and y are siblings or the same person, that is, x and y have both parents the same. Prove that this is an equivalence relation. What are the equivalence classes? Relations Answer: If a is a person then a is the same as a so (aRa), then R is Reflexive. If aRb then a and b are siblings(or the same person) with the same parents. Hence b and a are siblings (or the same person) with the same parents. We conclude that bRa. Then R is symmetric. Relations If aRb and bRc then a and b are siblings (or the same person) with the same parents and b and c are siblings (or the same person) with the same parents. Thus a and c are siblings (or the same person) then aRc. Then R is transitive. So R is an equivalence relation. Relations The equivalence classes: Are sets of siblings in the same family with same parents. Functions Definition: Let S and T be sets. A function f from S to T f: S T where f is relation on Domain S and Range T, such that: 1) Every sЄS is in the domain of f; 2) If (s,t)Єf and (s,u)Єf then t=u( each element s of S is a ssociated to only one member of T) its called (Rule or assign). Functions Example: Let S={1,2,3} and T={a,b,c} If f= {(1,a),(2,a),(3,b)} This function is a relation on S and T,because f(1)=a, f(2)=a, f(3)=b, 1), Every sЄS is in the domain of f. Also notice that each element 1,2,3 of the domain is “assinged” to one and only one element of the range T. Functions Example: Let S={1,2,3} and T={a,b,c,d,e} If F={(1,b),(2,a),(3,c),(4,a),(5,b)} This is a function (relation), because 1) Every sЄS is in the domain of f; 2) If (s,t)Єf and (s,u)Єf then t=u. However, not all elements of the range are used. According to the definition of function, this is allowed. Note that the range of f is{a,b,c,d,e} while the image of f is {a,b,c} Functions Definition: Let f be a function with domain S and T. We often write such a function as f: S T. We say that f is one to one Or injective if whenever (s,t)Єf and (s’,t)Єf then s=s’, We sometimes refer to such a mapping as an injection. We also refer to such a map as univalent. Functions The conditions 1) Every sЄS is in the domain of f; 2) If (s,t)Єf and (s’,t)Єf then s=s’ (that no two domain elements be associated with the same range element). Functions Example: Let S=T=R and let f be of all 2 ordered pairs ( x, x or f :R R x x2 or as f ( x) x 2 ): x R Functions f is not one-to-one function or injective function because The ordered pairs (-2,4) and (2,4) are in f and f(-2)=f(2). Example: Let S=T=R and let f be the function 3 f ( x) x Then f is strictly increasing as x moves from left to right. In other words, if s < t then f(s) < f(t). Hence f(s) ≠ f(t) the function f is one-to-one or injective. Functions Definition Let f be a function with domain S and range T. If for each tЄT there is an sЄS such that f(s)=t then we say that f is onto or surjective. We sometimes refer to such a mapping as a surjection. The function is onto or surjective when its image equals its range. Functions Example Let f ( x) x 2 S=T=R. The point t=-1ЄT has the property that there is no sЄS such that f(s)=t. As a result, this function f is not onto Functions Example Let S=R, T={xЄR:1≤x<∞}. Let g:S T 2 g ( x ) x 1 Be given by Then for each tЄT the number g ( s) t s 2 1 t s t 1 Makes sense and lies in S. then this function g is surjective, (is not injective, g(-1)=g(1)=2) Combining Functions Definition: Let f and g be functions with same domain S and the same range T. 1) 2) 3) 4) ( f g )( x ) f ( x ) g ( x ) ( f g )( x ) f ( x ) g ( x ) ( f . g )( x ) f ( x ). g ( x ) ( f / g )( x ) f ( x ) / g ( x ) provided that g ( x ) 0 Combining Functions Example: Let S=T=R. Define f ( x) x 3 x and g( x) sin( x 2 ) Let us calculate f+g, f-g, f.g, f/g. Now Combining Functions ( f g )( x) ( x x ) sin( x ) 3 2 ( f g )( x) ( x x) sin( x ) 3 2 ( f . g )( x) ( x x).[sin( x )] 3 2 x x ( f / g )( x) Pr ovided x k k {0,1,2,...) 2 sin( x ) 3 Combining Functions Definition: Let f: S T be a function and let g: T U be a function. Then we define, for sЄS, the composite function ( g f )( x ) g ( f ( x )) We call g f the composite functions g and f Combining Functions Example: Let f : R {x R: x 0} be given by f ( x ) x 4 x 2 6 and g:{x R: x 0} R be given by g ( x ) x 4 ( g f )( s) g ( f ( x )) g ( x 4 x 2 6) x 4 x 2 6 4 Also ( f g )( s) f ( g ( x )) f ( x 4) [ x 4]4 [ x 4]2 6 f g and g f both make sense, will generally be different Combining Functions Let f : S T function and g: T U function g f {( s, u): s S , u U , and t T such that ( s, t ) f and (t , u) g} Combining Functions Definition: Let S and T be sets. Let f: S T. f and g are mutually (common to both) inverse provided that both ( f g )( t ) t ( g f )( s) s g f 1 for all t T , and for all s S , we write or f g 1 We say f and g are invertible; we call g the inverse of f and f the inverse of g Combining Functions Example: Let f: R R be given by f ( s) s 3 1 And g: R g (t ) 3 t 1 R be given by ( f g )(t ) [ 3 t 1]3 1 (t 1) 1 t , for all t and ( g f )( s) 3 ( s 3 1) 1 Thus g f 1 (or f g 1 ) 3 s 3 s, for all s Combining Functions Example: Let g : [1,+∞) [8, +∞) be given g( x) x 3x 4 2 Then g(1)=8, g(2)=14, g(3)=22,… and g is strictly increasing without bound. Then g is one-to-one function Combining Functions If t 9 x 2 3x 4 9 x 2 3x 5 0 3 9 20 3 29 x1,2 x 119 . 2 2 If t 15 x 2 3x 4 15 x 2 3x 11 0 x1,2 3 9 44 3 53 x 2.14 2 2 Combining Functions Then for each tЄT there is sЄS such that f(s)=t then we say that f is onto function. We conclude that g has an inverse. g ( x ) x 2 3x 4 t x 2 3x 4 t 0 9 4( 4 t ) 3 2 3 7 4t x 2 3 7 4x g 1 ( x ) 2 x 3 9 16 4t 2 Combining Functions From last example we conclude that a function that does have an inverse must be one-to-one and onto function. Types of Functions The polynomial function: p( x) a0 a1 x a2 x a3 x ...a k x 2 3 A polynomial function is easy to understand because we can calculate its value at any point x by simply plugging in x and then multiplying and adding. k Types of Functions The exponential function: g( x) 2 x Is an exponential function. This function is easy to calculate when x is an integer. It is difficult to calculate when x is a noninteger. Types of Functions The logarithmic function: A logarithmic function is simply the inverse of an exponential function. h( x) log 2 x is the inverse of g( x) 2 x Functions and Relations Exercises: 5) Let S={a,b,c,d} and T={1,2,3,4,5,6,7}. Which of the following relations on SXT is a function? Why? a) {(a,4),(d,3),(c,3),(b,2)} b) {(a,5),(c,4),(d,3)} Functions and Relations 6) Which of the following functions is one-to-one? Which is onto? a) f : N N f (m) m 2 b) g: Z Z g(m) 2m 7 2 Functions and Relations 8) Find the domain and image of each of these relations: a) ( x, y) R R: x y3 b)( , ): is a person, is a person, and is the father of Functions and Relations a) Domain ={xЄR:x≥0} Image = {yЄR:y≥-3} b) Domain = all people Image =all male parents Functions and Relations 10) Discuss why there are infinitely many triples of natural number k, l, m such that k l m 2 2 2