Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
3.2 Surjective and Injective Functions Here we define surjective (onto), injective (1-1) and bijective (both) functions, and see how we prove that a given function falls (or doesn’t fall) into these categories. Surjective Def. Let f : A → B be a function. Then f is surjective (or a surjection) if Imf = B. Note that this says simply that the image of f is the entire codomain. Here are some examples: Ex. Let f : R → R be the function f (x) = x3 + 2. Is f a surjection? Prove that it is. We must show that Imf = R. This is a statement about two sets being equal, so we must show that Imf ⊆ R and R ⊆ Imf . The first is always true: the image of a function is always a subset of the codomain. So all we must do is prove that R ⊆ Imf . So let y ∈ R. We must show y ∈ Imf , i.e., that y = f (x) for some x ∈ R (the domain). The easiest way √ 3 3 to do this is to simply find the element x. We want x + 2 = y, so y − 2 = x. Our proof then looks like this: √ √ 3 3 Proof. Let y ∈ R. Consider the element x = y − 2 ∈ R. Then f (x) = f ( y − 2) = √ 2 3 ( y − 2) + 2 = y − 2 + 2 = y. Thus y ∈ Imf . � n + 2 if n is even Ex. Let f : Z → Z be defined by f (n) = . Is f surjective? Prove that 2n if n is odd it is not. � n/2 + 2 if n is even Ex. Let f : Z → Z be defined by f (n) = . Is f surjective? Prove 2n if n is odd that it is. Injective Def. Let f : A → B be a function. Then f is injective (or an injection) if whenever a1 , a2 ∈ A and a1 �= a2 , we have f (a1 ) �= f (a2 ). Such functions are often called 1-1. The idea is that no two different elements of the domain get mapped to the same element of the codomain. Ex. Is the function f : R → R given by f (x) = x2 injective? Why not. When we want to prove that a function is injective, we usually use the contrapositive of the definition. So instead of showing that for all a1 , a2 ∈ A, if a1 �= a2 , then f (a1 ) �= f (a2 ), we show that if f (a1 ) = f (a2 ) then a1 = a2 . Ex. Prove that the function f : R → R given by f (x) = 3x + 4 is injective. Proof. Let x1 , x2 ∈ R (the domain). Assume f (x1 ) = f (x2 ). Then 3x1 + 4 = 3x2 + 4. Thus 3x1 = 3x2 and further x1 = x2 . Thus f is an injection. � 2n + 3 if n is even Ex. Let f : Z → Z be given by f (n) = . Is f injective? Prove that it 2n + 2 if n is odd is. Proof. Let n1 , n2 ∈ Z. Assume f (n1 ) = f (n2 ). There are three cases. First suppose n1 and n2 are both even. Then 2n1 + 3 = 2n2 + 3, so n1 = n2 . Second, suppose n1 and n2 are both odd. Then 2n1 + 2 = 2n2 + 2, so n1 = n2 . Finally, suppose n1 is even and n2 is odd (or visa-versa). In this case 2n1 + 3 = 2n2 + 2. But that is impossible, since 2n1 + 3 is odd and 2n2 + 2 is even, so this case cannot occur. Therefore f is injective. There are some cases where using the direct definition is better. Consider: Ex. Let f : R → R be defined by f (x) = x3 + 3x2 + 4x. Prove that f is injective. Proof. Using calculus, we can check that f is strictly increasing. Thus if x1 �= x2 , then either x1 < x2 and thus f (x1 ) < f (x2 ), or x1 > x2 and thus f (x1 ) > f (x2 ). In either case f (x1 ) �= f (x2 ). Proposition. Let A and B be sets and X and Y subsets of A. Let f : A → B be an injective function. Prove that if f (X) ⊆ f (Y ), then X ⊆ Y . Compare to the similar proposition we did in section 3.1. Proof. Assume f (X) ⊆ f (Y ). Let a ∈ X. Then f (a) ∈ F (X), so f (a) ∈ F (Y ). That is, there exists a y ∈ Y such that f (a) = f (y). Since f is injective, a = y. So a ∈ Y , as desired. Bijections Def. A function is called bijective (or a bijection) if it is both surjective and injective. Which of the previous examples are bijections? In general, to prove that a function f is a bijection, you must prove two things: that f is a surjection and that f is an injection. Homework: 8, 17, 20, 21, 22