Mathematics 220 Homework 8 1. Find the domain and range of the function f (x) = must provide detailed proof). Due Monday/Tuesday March 14/15 √ x−1 x (assume x is real). (Remember, you Solution: Domain: for the numerator to be defined, we need x ≥ 1; and this automatically implies that x 6= 0, so the domain is [1, ∞). The √range: y ∈ R is in the range of f if and only if there exists x ∈ [1, ∞) such that y = x−1 x . We have: √ √ x−1 ⇐⇒ ∃x ≥ 1 : xy = x − 1 x ⇐⇒ ∃x ≥ 1 : (xy)2 = x − 1 and y ≥ 0 ⇐⇒ ∃x ≥ 1 : y 2 x2 − x + 1 = 0 and y ≥ 0. ∃x ≥ 1 : y = The quadratic equation y 2 x2 − x + 1 = 0 (with the unknown x) has a root if and only if its discriminant is non-negative, that is, if and only if 1 − 4y 2 ≥ 0, which is equivalent to y ∈ [−1/2, 1/2]. Recall that this needs to be combined √ with the condition y ≥ 0 from above, 1± 1−4y 2 2y 2 to satisfy x ≥ 1 We note that this p 2 ≥ 0 ≥ − 1 − 4y 2 . is satisfied automatically when y ∈ [−1/2, 1/2], however, since 1 − 2y √ Thus we have obtained that ∃x ≥ 1 : y = x−1 is equivalent to: y ∈ [0, 1/2], and then by x definition, the range of f is [0, 1/2]. Note that here it is important to have the biconditionals everywhere (otherwise, depending on which way the arrows in your argument go, you will only get one inclusion between the range of f and the set you get in the answer). and we also need at least of of the roots x1,2 = Alternative solution for range of f : you could use calculus to find that the maximum of f on [1, ∞) is 1/2 (attained at the point x = 2); the minimum clearly is 0. Then Range of f is contained in [0, 1/2]. On the other hand, since the function f is continuous on its domain, and it attains the values 0 and 1/2, it has to attain every value in-between by the Intermediate Value Theorem. Then the range of f also contains the interval [0, 1/2]. 2. Let f : R → R be the function defined by f (x) = x2 + 3x + 4. (a) Prove that f is not injective. Solution: Since f (0) = 4 and f (−3) = 9 − 9 + 4 = 4, it follows that f is not injective. (b) Find all pairs a, b of real numbers so that f (a) = f (b). Solution: Let a, b ∈ R. If f (a) = f (b) then a2 + 3a + 4 = b2 + 3b + 4 a2 + 3a − 3b − b2 = 0 (a − b)(a + b + 3) = 0 Thus either a = b or b = −3 − a. Hence the set of required pairs is {(a, −3 − a) s.t. a ∈ R} ∪ {(a, a) s.t. a ∈ R} 3. Let h : Z → Z be a function defined by h(n) = 3n − 8. Determine whether it is (a) injective and (b) surjective. Remember, you must prove your answer. Page 1 of 5 Mathematics 220 Homework 8 Due Monday/Tuesday March 14/15 Solution: • It is injective — Let a, b ∈ Z so that h(a) = h(b). Then 3a − 8 = 3b − 8, so 3a = 3b and thus a = b. • It is not surjective — Let b ∈ Z and we need to find a ∈ Z so that f (a) = 3a − 8 = b. So we pick a = b+8 3 . The problems comes because this choice is not always an integer. eg If b = 0 then we need a = 38 6∈ Z. ie there is no integer that maps to 0. Hence not surjective. 4. Question 9.26. Give an example of a function f : N → N that is (a) one-to-one and onto (b) one-to-one but not onto (c) onto but not one-to-one (d) neither one-to-one nor onto Solution: (a) For example, f (n) = n works. (b) For example, f (n) = n+1. Then it is not onto because f −1 (1) = ∅ (this says, f does not take the value 1: the pre-image of 1 is empty). (It is very easy to check that f is one-to-one: if f (n) = f (m) for some n, m ∈ N, then n + 1 = m + 1, so n = m.) (c) Define, for example, f (1) = 3, and f (n) = n − 1 for n 6= 1. Then it is onto because for every n ∈ N, we have n + 1 ≥ 2, and so n = f (n + 1) (this is saying, every n ∈ N is in the range of f – namely, f takes the value n at the point n + 1). On the other hand, f is not one-to-one: we have f (1) = f (4) = 3. (d) Define, for example, f (1) = 3 and f (n) = n + 1 for n ≥ 1. Then f is not onto because 1 is not in its range, and is not one-to-one because f (1) = f (2) = 3. 5. Prove or disprove: For every set A there is an injective function f : A → P (A). Solution: So we need to build an injective function that maps elements of a set A to elements of the power set of A. But elements of the power set of A are subsets of A. So we need to map each element of A to a subset of A. Let us try the obvious thing f (a) = {a}. Proof. Let f : A → P (A) be a function defined by f (a) = {a} for any a ∈ A. We now show that f is injective. Let a, b ∈ A and assume a 6= b. Then f (a) = {a} and f (b) = {b}. Since a 6= b, {a} = 6 {b}. Thus f is injective. Another function that would work is the following g : A → P (A) g(a) = A − {a} I’ll leave you to prove that it is injective. Page 2 of 5 Mathematics 220 Homework 8 Due Monday/Tuesday March 14/15 6. Remember — in all parts of this problem, you have to prove that your function satisfies the required property. (a) Give an example of a bijection from (0, 1) to (1, ∞). (b) Give an example of a surjection from R to Q. (c) Give an example of a bijection from N to Z. Solution: Proof. (a) Let f : (0, 1) → (1, ∞) be defined by f (x) = 1/x. We must show it is both injective and surjective • Let x, z ∈ (0, 1) and assume f (x) = f (z). Then 1/x = 1/z and so z/x = 1 and thus z = x. Hence f is injective. • Let y ∈ (1, ∞) and pick x = 1/y. Since 1 < y, it follows that 0 < x < 1. Further f (x) = f (1/y) = 1/(1/y) = y. Thus f is surjective. Since f is injective and surjective, it is bijective. (b) Define f : R → Q by cases: let f (x) = x if x ∈ Q, f (x) = 0 otherwise. Then clearly f : R → Q and it is surjective. Indeed, for every x ∈ Q, x 6= 0, we have f −1 (x) = {x}; for x = 0, f −1 (0) = 0 ∪ (R − Q); in particular, the pre-image of every rational number is non-empty, thus f is surjective. (c) Define f (n) = ( −k, if n = 2k + 1 k, if n = 2k. Then f (1) = 0, f (2) = 1, f (3) = −1, f (4) = 2, etc. We discussed this function in class. Anyway, let us prove that it is bijective. First, injective: we need to show that if n 6= m, then f (n) 6= f (m) (here n, m ∈ N). Since f is defined by cases, we need to consider 3 cases: n, m are both even; n, m are both odd, and n is even, m is odd (note that the remaining case n is odd, m is even does not need to be checked because we can rename n and m and get back to case (3) this way). If n, m are both even: suppose n = 2k, m = 2ℓ; then f (n) = k, f (m) = ℓ, and k 6= ℓ ⇐⇒ m 6= n. The case n, m both odd is very similar. Now suppose n is even, m is odd, so n = 2k, m = 2ℓ + 1. Then f (m) = −ℓ ≤ 0, f (n) = k > 0, so we cannot have f (n) = f (m). Thus we have checked that f is injective. Now we need to check that f is surjective. This means, we need to prove that for any ℓ ∈ Z, there exists n ∈ N such that f (n) = ℓ. If ℓ ≤ 0, let n = 2(−ℓ) + 1. Then n ∈ N since ℓ ≤ 0, and by definition of f , we have f (n) = ℓ. If ℓ > 0, let n = 2ℓ. Again by definition, f (n) = ℓ. 7. Let f : A → B be a function and if D ⊂ B, recall that the inverse image of D under f is by definition the set f −1 (D) = {x ∈ A : f (x) ∈ D}. Note that f −1 (D) is a set, and is defined for any function f , even if f does not have an inverse. (a) If D1 , D2 ⊆ B, prove that f −1 (D1 ∩ D2 ) = f −1 (D1 ) ∩ f −1 (D2 ) (b) If D1 , D2 ⊆ B, prove that f −1 (D1 ∪ D2 ) = f −1 (D1 ) ∪ f −1 (D2 ) Page 3 of 5 Mathematics 220 Homework 8 Due Monday/Tuesday March 14/15 (c) If D ⊂ B, prove that f −1 (B − D) = A − f −1 (D) Solution: Proof. (a) We first prove that LHS ⊆ RHS and then RHS ⊆ LHS. • Let x ∈ f −1 (D1 ∩ D2 ), so f (x) ∈ D1 ∩ D2 . Hence f (x) ∈ D1 and f (x) ∈ D2 . Since f (x) ∈ D1 , x ∈ f −1 (D1 ), and similarly since f (x) ∈ D2 , x ∈ f −1 (D2 ). Thus x ∈ f −1 (D1 ) ∩ f −1 (D2 ). • Let x ∈ f −1 (D1 )∩f −1 (D2 ), so x ∈ f −1 (D1 ) and x ∈ f −1 (D2 ). Since x ∈ f −1 (D1 ), f (x) ∈ D1 , and similarly since x ∈ f −1 (D2 ), f (x) ∈ D2 . Thus f (x) ∈ D1 ∩ D2 and so x ∈ f −1 (D1 ∩ D2 ). (c) We first prove that LHS ⊆ RHS and then RHS ⊆ LHS. • Let x ∈ f −1 (B − D), so f (x) ∈ B − D. Thus f (x) ∈ B and f (x) 6∈ D. Since f (x) 6∈ D, we must have x 6∈ f −1 (D). By definition of f −1 we must have x ∈ A. Hence x ∈ A and x 6∈ f −1 (D) and thus x ∈ A − f −1 (D). • Let x ∈ A − f −1 (D). Hence x ∈ A and x 6∈ f −1 (D). Now f (x) ∈ B (since f : A → B) and f (x) 6∈ D. Thus f (x) ∈ B − D and so x ∈ f −1 (B − D). 8. Let A be a well-ordered set. Let f : P(A) → A be the function that assigns to every for B ⊆ A the smallest element of B. (a) Is f is a function? (b) Is f injective? (c) Is f surjective? Solution: The answer to the question is that f is not a function from A to P(A) since it is not defined for B = ∅. However, if we modify the question, and ask about such a function f from P(A) − {∅} to A, then we get a function. Indeed, first check that it is a function: let B be a subset of A. We need to show that if b1 and b2 are both minimal elements of B, then b1 = b2 . This was proved as Theorem 6.1 in the book. If A has more than one element, then f is not injective. Indeed, let a, b ∈ A be two distinct elements, with a < b. Then consider the sets B1 = {a}, and B2 = {a, b}. Then f (B1 ) = f (B2 ) = a. The function f is surjective. For every element a ∈ A, we have f ({a}) = a. 9. (a) Prove that if f : A → B is an injective function, then f (C1 ∩ C2 ) = f (C1 ) ∩ f (C2 ) for all C1 , C2 ⊆ A. Page 4 of 5 Mathematics 220 Homework 8 Due Monday/Tuesday March 14/15 (b) Prove that if f : A → B is a surjective function, then f (f −1 (D)) = D for every subset D ⊆ B. Solution: (a) We proved in class that f (C1 ∩ C2 ) ⊆ f (C1 ) ∩ f (C2 ) always. We need to show that if f is injective, then the reverse containment holds: f (C1 ∩ C2 ) ⊇ f (C1 ) ∩ f (C2 ). Let y ∈ f (C1 ) ∩ f (C2 ). Then, by definition, there exist x1 ∈ C1 and x2 ∈ C2 such that y = f (x1 ) = f (x2 ). Since f is injective, it follows that x1 = x2 , and then this is a common element of C1 and C2 . (b). We proved in lecture that f (f −1 (D)) ⊆ D always. We need to show that if f is surjective, then every element y ∈ D is contained in f (f −1 (D)). Since f is surjective, there exists x ∈ A such that f (x) = y. Since y ∈ D, this implies that x ∈ f −1 (D), by definition of the pre-image. Then y = f (x) ∈ f (f −1 (D)). Page 5 of 5