2. PROPERTIES OF FUNCTIONS 111 2. Properties of Funtions 2.1. Injetions, Surjetions, an Bijetions. Definition 2.1.1. Given f : A B 1. f is one-to-one (short han is 1 1) or injetive if preimages are unique. In this ase, (a ) (f(a) f()). 2. f is onto or surjetive if every y B has a preimage. In this ase, the range of f is equal to the oomain. 3. f is ijetive if it is surjetive an injetive (one-to-one an onto). We egin y isussing three very important properties funtions efine aove. 1. A funtion is injetive or one-to-one if the preimages of elements of the range are unique. In other wors, if every element in the range is assigne to eatly one element in the omain. For eample, if a funtion is efine from a suset of the real numers to the real numers an is given y a formula y = f(), then the funtion is one-to-one if the equation f() = has at most one solution for every numer. 2. A funtion is surjetive or onto if the range is equal to the oomain. In other wors, if every element in the oomain is assigne to at least one value in the omain. For eample, if, as aove, a funtion is efine from a suset of the real numers to the real numers an is given y a formula y = f(), then the funtion is onto if the equation f() = has at least one solution for every numer. 3. A funtion is a ijetion if it is oth injetive an surjetive. 2.2. Eamples. Eample 2.2.1. Let A = {a,,, } an B = {, y, z}. The funtion f is efine y the relation piture elow. This funtion is neither injetive nor surjetive. a y z
2. PROPERTIES OF FUNCTIONS 112 Eample 2.2.2. f : A B where A = {a,,, } an B = {, y, z} efine y the relation elow is a surjetion, ut not an injetion. a y z Eample 2.2.3. f : A B where A = {a,,, } an B = {v, w,, y, z} efine y the relation elow is an injetion, ut not a surjetion. a v w y Eample 2.2.4. f : A B where A = {a,,, } an B = {v, w,, y} efine y the relation elow oth a surjetion an an injetion, an therefore a ijetion. Notie that for a funtion to e a ijetion, the omain an oomain must have the same arinality. z a v w y
2. PROPERTIES OF FUNCTIONS 113 The eamples illustrate funtions that are injetive, surjetive, an ijetive. Here are further eamples. Eample 2.2.5. Let f : [0, ) [0, ) e efine y f() =. This funtion is an injetion an a surjetion an so it is also a ijetion. Eample 2.2.6. Suppose f() = 2. If the omain an oomain for this funtion is the set of real numers, then this funtion woul e neither a surjetion nor an injetion. It is not a surjetion eause the range is not equal to the oomain. For eample, there is no numer in the omain with image 1 whih is an element of the oomain. It is not an injetion sine more than one istint element in the omain is mappe to the same element in the oomain. For eample, f( 1) = f(1) ut 1 1. Eerise 2.2.1. What if we say the omain of the funtion in Eample 2.2.6 is the set of all reals an the oomain is [0, ). Whih properties woul the funtion have (injetive an/or surjetive)? Eplain. Eerise 2.2.2. Now, if we say the omain an the oomain are oth [0, ). What properties oes the funtion in Eample 2.2.6 have? Eplain. 2.3. Eample 2.3.1. Eample 2.3.1. Prove that the funtion f : N N e efine y f(n) = n 2 is injetive. Proof. Let a, N e suh that f(a) = f(). This implies a 2 = 2 y the efinition of f. Thus a = or a =. Sine the omain of f is the set of natural numers, oth a an must e nonnegative. Thus a =. This shows a [f(a) = f() a = ], whih shows f is injetive. In Eample 2.3.1 we prove a funtion is injetive, or one-to-one. Notie that to prove a funtion, f : A B is one-to-one we must show the following: This is equivalent to showing ( A)( y A)[( y) (f() f(y))]. ( A)( y A)[(f() = f(y)) ( = y)]. To prove this statement (whih atually uses the ontrapositive of the efinition) we egin y hoosing two aritrary elements of the omain an assume the hypothesis
2. PROPERTIES OF FUNCTIONS 114 of the impliation, i.e. we egin with Let, y A an assume f() = f(y). We then use the rules of algera to show that the onlusion must follow. 2.4. Eample 2.4.1. Eample 2.4.1. Prove that the funtion g : N N, efine y g(n) = n/3, is surjetive. Proof. Let n N. Notie that g(3n) = (3n)/3 = (3n)/3 = n. Sine 3n N, this shows n is in the range of g. Hene g is surjetive. To prove a funtion, f : A B is surjetive, or onto, we must show f(a) = B. In other wors, we must show the two sets, f(a) an B, are equal. We alreay know that f(a) B if f is a well-efine funtion. While most funtions enountere in a ourse using algerai funtions are well-efine, this shoul not e an automati assumption in general. With that sai, though, we will usually assume the funtions given to us are well efine, so all that must e shown is that B f(a). To o this we may use the efinition of a suset: show every element of B is also an element of f(a). Thus we egin the proof y fiing an aritrary element of B. We then use the tools at our isposal (efinition of the funtion, algera, any other known information) to show that this aritrary element must in fat e the image of some element of A. 2.5. Eample 2.5.1. Eample 2.5.1. Prove that the funtion g : N N, efine y g(n) = n/3, is not injetive. Proof. The numers 1 an 2 are in the omain of g an are not equal, ut g(1) = g(2) = 0. Thus g is not injetive. To show a funtion is not injetive we must show [( A)( y A)[( y) (f() f(y))]]. This is equivalent to ( A)( y A)[( y) (f() = f(y))].
2. PROPERTIES OF FUNCTIONS 115 Thus when we show a funtion is not injetive it is enough to fin an eample of two ifferent elements in the omain that have the same image. 2.6. Eample 2.6.1. Eample 2.6.1. Prove that the funtion f : N N e efine y f(n) = n 2, is not surjetive. Proof. The numer 3 is an element of the oomain, N. However, 3 is not the square of any integer. Therefore, there is no element of the omain that maps to the numer 3, so f is not surjetive. To show a funtion is not surjetive we must show f(a) B. Sine a well-efine funtion must have f(a) B, we shoul show B f(a). Thus to show a funtion is not surjetive it is enough to fin an element in the oomain that is not the image of any element of the omain. You may assume the familiar properties of numers in this moule as one in the previous eamples. 2.7. Inverse Funtions. Definition 2.7.1. Suppose f : A B is a ijetion. Then the inverse of f, enote f 1 : B A, is the funtion efine y the rule f 1 (y) = if an only if f() = y. If a funtion f is a ijetion, then it makes sense to efine a new funtion that reverses the roles of the omain an the oomain, ut uses the same rule that efines f. This funtion is alle the inverse of the f. If the funtion is not a ijetion, it oes not have an inverse. You have seen many funtions in algera an alulus that are efine as inverses of other funtions. For eample, the square-root funtion is efine y the rule y = if an only if y 0 an y 2 =. That is, the square-root funtion is the inverse of the square funtion. Before we an invert the square funtion, however, its usual omain, the set of all real numers, must e restrite to the set of nonnegative real numers in orer to have a ijetion. That is, if A = B = { R : 0},
2. PROPERTIES OF FUNCTIONS 116 then the funtion f : A B efine y f() = 2 is a ijetion, an its inverse f 1 : B A is the square-root funtion, f 1 () =. Another important eample from algera is the logarithm funtion. If a is a positive real numer, ifferent from 1, an R + = { R : > 0}, the funtion f : R R + efine y f() = a is a ijetion. Its inverse, f 1 : R + R, is the logarithm funtion with ase a: f 1 () = log a. In other wors y = log a if an only if a y =. Eample 2.7.1. Let f : A B, where A = {a,,, } an B = {v, w,, y}, e efine as follows a v w y Then the inverse funtion is f 1 : B A efine as follows v a w y Eample 2.7.2. Suppose f : R {2} R {1} is efine y f() = 2. Then the funtion f 1 () = 2 is the inverse of f. This is a goo eample of an 1 algeraially efine funtion whose inverse has a nie formula speifying its rule. You may reall that the formula efining f 1 an e otaine y setting y = f() = 2, interhanging an y, an solving algeraially for y. Eerise 2.7.1. Fin the inverse of the funtion f : R { 2} R {1} efine y f() = 1 + 2.
2. PROPERTIES OF FUNCTIONS 117 Eerise 2.7.2. Fin the inverse of the funtion f : R (, 1) efine y f() = 1 e. Theorem 2.7.1. If a funtion is a ijetion, then its inverse is also a ijetion. Proof. Let f : A B e a ijetion an let f 1 : B A e its inverse. To show f 1 is a ijetion we must show it is an injetion an a surjetion. Let 1, 2 B e suh that f 1 ( 1 ) = f 1 ( 2 ). Then y the efinition of the inverse we have 1 = f(f 1 ( 2 )) = 2. This shows f 1 is injetive. We leave the proof that f 1 is surjetive as an eerise for the reaer. Eerise 2.7.3. Finish the proof of Theorem 2.7.1. 2.8. Inverse Image. Definition 2.8.1. Let f : A B an let S e a suset of B. Then the inverse image of S uner f is the set f 1 (S) = { A f() S}. There is no requirement for f to e injetive or surjetive for this efinition to hol. Eample 2.8.1. Let f : A B, where A = {a,,, } an B = {, y, z} e efine as follows a y z f 1 ({z}) = {, } f 1 ({, y}) = {a, } We revisit the efinition of the inverse image of a set to emphasize the ifferene etween the inverse image of a suset of the oomain an the inverse of a funtion. The inverse image of a set is the set of all elements that map into that set. The funtion oes not have to e injetive or surjetive to fin the inverse image of a set. For eample, the funtion f(n) = 1 with omain an oomain all natural numers
2. PROPERTIES OF FUNCTIONS 118 woul have the following inverse images: f 1 ({1}) = N an f 1 ({5, 6, 7, 8, 9}) =. This funtion oes not have an inverse, however. The ontet of the use of the notation f 1 usually iniates if the inverse image or the inverse funtion is intene. If A is a suset of the oomain we woul always assume f 1 (A) is the inverse image of A. When isussing a ijetion the istintion etween the inverse image an inverse funtion is often lurre. Eerise 2.8.1. Fin an eample of a funtion f : A B an a set S A where f(s) f(s). Eerise 2.8.2. Let f : A B e a funtion an let S B. Prove f 1 (S) = f 1 (S) 2.9. Composition. Definition 2.9.1. Let f : A B an g : B C. The omposition of g with f, enote g f, is the funtion from A to C efine y (g f)() = g(f()). Eample 2.9.1. Let A = {a,,, }, B = {v, w,, y}, an C = {r, s, t}; an let f : A B an g : B C y efine as follows a v v r w w s t y y Then the omposition g f is as follows a r s t
2. PROPERTIES OF FUNCTIONS 119 The omposition of two funtions is efine y following one funtion y another. To efine the omposition g f we must have the range of f ontaine in the omain of g. 2.10. Eample 2.10.1. Eample 2.10.1. Prove that the omposition of two injetive funtions is injetive. Proof. Let A, B, an C e sets an let f : A B an g : B C e two injetions. Suppose an y are elements of A suh that (g f)() = (g f)(y). This means g(f()) = g(f(y)). Sine the oomain of f is B, f() B an f(y) B. Thus we have two elements of B, f() an f(y), suh that g(f()) = g(f(y)). Sine g is injetive, we must have f() = f(y). But now we may use the fat that f is injetive to onlue = y. This shows that g f is an injetion. Sometimes we have to prove properties aout funtions without any speifi formula for the funtions. In Eample 2.10.1 we prove that the omposition of two injetions is again an injetion. We annot use speifi eamples of funtion eause that woul not prove this more general statement. We have to use the tools given y the assumptions, namely, that we know the two funtions that make up the omposition are known to e injetions. Eerise 2.10.1. Prove the omposition of two surjetions is a surjetion. Theorem 2.10.1 (Corollary to Eample 2.10.1 an Eerise 2.10.1). The omposition of two ijetions is a ijetion. Eerise 2.10.2. Prove or isprove: if the omposition of two funtions is an injetion then the two original funtions must e injetions too. Eerise 2.10.3. Prove or isprove: if the omposition of two funtions is an surjetion then the two original funtions must e surjetions too.