27 - Additional facts about functions

ˆ!Screenshot 2023-11-13 at 12.26.30 AM.png
!Screenshot 2023-11-13 at 12.26.54 AM.png!Screenshot 2023-11-13 at 12.27.05 AM.png
!Screenshot 2023-11-13 at 12.27.53 AM.png!Screenshot 2023-11-13 at 12.28.20 AM.png!Screenshot 2023-11-13 at 12.30.46 AM.png!Screenshot 2023-11-13 at 12.31.02 AM.png

In Class Practice



HW 27

Ben Finch

E 27.1
f is surjective iff |im(f)|=|B|.
Proof.
Let f,A,B be as stated above.
(=>)
Assume that f is surjective. Then B=im(f). Thus |B|=|im(f)|.

(<=)
Assume that |im(f)|=|B|. We work contrapositively.. Assume that f is not surjective. Then there exists b∈B such that b∉im(f). Thus if |B|=n, |im(f)|≤n−1. Hence |B|≠|im(f)|. ◻

E 27.2

f1(n)=n/2
Injective.
Let a1,a2∈N such that a1,a2 are even. Assume that f1(a1)=f1(a2). We find that

a12=a22a1=a2

So f1 is injective.

Surjective.
Let b∈N. Define a=2b. We find that

f1(a)=a2=2b2=b

So f1 is surjective. Since f1 is both injective and surjective, it is bijective.

f2=−n−12

Injective
Let a1,a2∈N such that a1,a2 are odd. Assume that f2(a1)=f2(a2). We see that

−a1−12=−a2−12a1−12=a2−12a1−1=a2−1a1=a2

So f2 is injective.

Surjective
Let b∈N. Define a=−2b+1. We find that

f(a)=−a−12=−(−2b+1)−12=−−2b2=2b2=b

So f2 is surjective .Since f2 is both injective and surjective, it is bijective.

Hence, both f1 and f2 are bijective. ◻

E 27.3

f(x)={(0,1+x) if x≥0(1,−x) if x<0

Injective:

Let a1,a2∈Z. Assume f(a1)=f(a2). There are two cases:

  1. If a1,a2≥0, then (0,1+a1)=(0,1+a2) so 1+a1=1+a2, which means a1=a2.
  2. If a1,a2<0, then (1,−a1)=(1,−a2), so −a1=−a2, which means a1=a2.

So, using the pasting together theorem f is injective.

Surjective:

Given any element (i,n) in {0,1}×N, we want to find an integer a such that f(a)=(i,n).

  1. If i=0, define a=n−1. Then f(a)=f(n−1)=(0,1+(n−1))=(0,n).
  2. If i=1, define a=−n. Then f(a)=f(−n)=(1,−(−n))=(1,n).

So, using the pasting together theorem, f is surjective.

Hence, f is bijective.

E 27.4
f(x)=x2+2x+2

a) f= {(−3,5),(−2,2),(−1,1),(0,2),(1,5),(2,10),(3,17)}
b) im(f)={5,2,1,10,17}
c) C={(−1,1),(0,2),(1,5),(2,10),(3,17)}. We see that C is a subset of A. C is injective since every second component appears exactly once. Also, im(f|c) = im(f),

E 27.5

a)
Proof.
Let f:A→B be an injective function and let S⊆A. Let a1,a2∈S. Assume that f|s(a1)=f|s(a2). Note that f|s(a1)=f(a1) and f|s(a2)=f(a2). Therefore, f(a1)=f(a2). Since f is injective, a1=a2. So f|s is injective. ◻
b)
Proof.

(Surjective)
Let b∈im(f). Then ∃a∈A such that f(a)=b. Hence f^(a)=b. Thus f^ is surjective.

(Injective)
Let a1,a2∈A. Assume that f^(a1)=f^(a2). Then f(a1)=f(a2). Hence a1=a2. Thus f^ is injective.

So f^ is bijective.

E 27.6

a) Prove that f is surjective iff f−1({b})≠∅ for each b∈B.

(⇒) Assume f is surjective. By definition, for every element b∈B, there exists at least one element a∈A such that f(a)=b. This implies f−1({b}) is not empty for each b∈B, because there is at least one element in A that maps to each b in B.

(⇐) Conversely, assume f−1({b})≠∅ for each b in B. This means for each b in B, there is at least one element in A that maps to b. This is the definition of a surjective function. Therefore, f is surjective.

b) Prove that f is injective iff |f−1({b})|≤1 for each b∈B.

(⇒) Assume f is injective. By definition, for every element b in B that is the image of an element a in A, there is no other element in A that maps to b. This implies that the preimage f−1({b}) contains at most one element for each b in B, so |f−1({b})|≤1.

(⇐) Conversely, assume |f−1({b})|≤1 for each b in B. This means for each b in B, there is at most one element in A that maps to b. This is the definition of an injective function. Therefore, f is injective.

E 27.7

a) f(X∪Y)=f(X)∪f(Y)

  1. f(X∪Y)⊆f(X)∪f(Y):

    Take any element y∈f(X∪Y). Then there exists an x∈X∪Y such that f(x)=y. Now, x is either in X or Y, so y will be in f(X) or f(Y), and hence in f(X)∪f(Y).

  2. f(X)∪f(Y)⊆f(X∪Y):

    Take any element y∈f(X)∪f(Y). This means y is either in f(X) or f(Y). If y∈f(X), then there is an x∈X such that f(x)=y. Also, if y∈f(Y), then there is an x∈Y such that f(x)=y. In either case, x is in X∪Y, so y is in f(X∪Y).

Therefore, f(X∪Y)=f(X)∪f(Y). ◻

b) f(X∩Y)=f(X)∩f(Y)

This statement is not always true. We will disprove it.

Consider f such that f(a)=f(b) for some a∈X, b∈Y, and a≠b. Then f(a)=f(b) is in both f(X) and f(Y), but there is no element in X∩Y that maps to it because a≠b. Hence, f(X∩Y)≠f(X)∩f(Y). ◻

c) f−1(C∪D)=f−1(C)∪f−1(D)

Proof.

  1. f−1(C∪D)⊆f−1(C)∪f−1(D):

    If x∈f−1(C∪D), then f(x)∈C∪D, which means f(x)∈C or f(x)∈D. Hence, x is in either f−1(C) or f−1(D), and thus in their union.

  2. f−1(C)∪f−1(D)⊆f−1(C∪D):

    If x is in f−1(C) or f−1(D), then f(x) is in C or D, and thus in C∪D. Hence, x∈f−1(C∪D).

Therefore, f−1(C∪D)=f−1(C)∪f−1(D).

d) f−1(C∩D)=f−1(C)∩f−1(D)

Proof.

  1. f−1(C∩D)⊆f−1(C)∩f−1(D): If x∈f−1(C∩D), then f(x)∈C∩D, which means f(x)∈C and f(x)∈D. Thus, x is in both f−1(C) and f−1(D).

  2. f−1(C)∩f−1(D)⊆f−1(C∩D): If x is in both f−1(C) and f−1(D), then f(x) is in both C and D, and therefore in their intersection C∩D. Hence, x∈f−1(C∩D).

So, f−1(C∩D)=f−1(C)∩f−1(D). ◻