1、Functions Definition of Function Definition: Let A and B be nonempty sets. A function f from A to B, which is denoted f:AB, is a relation from A to B such that for all aA, f(a) contains just one element of B. A special kind of binary relation Under f, each element in the domain of f has a unique ima
2、ge. Note: the domain of :AB is A, but the range is not necessarily equal to B.Image and counterimage Let f:AB, AA, then (A)=y|y=f(x), xA is called the image of A under f. An element in Dom(f) corresponds a value A subset of Dom(f) corresponds an image Let BB, then f-1(B)=x|xA, f(x)B is called the co
3、unterimage of B under f. What is f -1(f(A) ? A f -1(f(A) ? f -1(f(A) A? BABAfImage and CounterimageSpecial Types of Functions Surjection :AB is a surjection or “onto” iff. Ran()=B, iff. yB, xA, such that f(x)=y Injection (one-to-one) :AB is one-to-one iff. yRan(f), there is at most one xA, such that
4、 f(x)=y iff. x1,x2A, if x1x2, then (x1) (x2) iff. x1,x2A, if (x1) =(x2), then x1=x2 Bijection(one-to-one correspondence) surjection plus injection If A,B are nonempty sets how many different functions from A to B are there? |B|A| how many Injection from A to B are there? If |A|B| then 0 else |A|!*|A
5、|C|B| how many Bijection from A to B are there? If |A|= |B| = m then M! else 0Special Types of Functions: Examples :Z+R, (x)= ln x, one-to-one :RZ, (x)= x, onto :RR, (x)= 2x-1, bijection :RRRR, () = , bijection Try to prove it What is (|x,yR, y=x+1)? R-1 :NNN, () = | x2-y2| (N0) = n2|nN, -1(0) =|nNC
6、haracteristic Function of Set Let U be the universal set, for any AU, the characteristic function of A, fA:U0,1 is defined as fA(x)=1 iff. xANatural Function R is an equivalence relation on set A, g : AA/R, for all aA, g(a)=R(a), then G is called a natural function on A Natural function is surjection For any R(a)A/R, there exists some xA,such that g(x)=R(x)Images of Union and Intersection Given f: AB, and X,Y are subsets of A, then: f (XY) = f(X)f (Y) f (XY) f(X)f (Y)