25 - Injective and surjective functions

!Screenshot 2023-11-08 at 1.00.22 AM.png!Screenshot 2023-11-08 at 1.03.36 AM.png!Screenshot 2023-11-08 at 1.07.27 AM.png!Screenshot 2023-11-08 at 1.08.14 AM.png
Injective

  1. No
  2. Yes
  3. Yes
  4. Yes

f:R−{1}→R−{4}

Surjective
Every y (second component) is defined

Bijective = BOTH

Prove that f:R−{1}→R−{4} given by f(x)=4x−8x−1 is bijective.

Scratch work:
injective
Let a1,a2∈R−{1}. Assume f(a1)=f(a2).

4a1−8a1−1=4a2−8a2−1a1−2a1−1=a2−2a2−1(a1−2)(a2−1)=(a1−2)(a2−1)a1a2−2a2−a1+2=a1a2−2a2−a2+2a1=a2

Surjective
Let b∈R−{4}

b=4a−8a−1b(a−1)=4a−8ba−b=4a−8(b−4)a=b−8a=b−8b−4

Proof.
(Injective)
Let a1,a2∈R−{1}. Assume that f(a1)=f(a2).
Then

4a1−8a1−1=4a2−8a2−1Thus a1−2a1−1=a2−2a2−1Hence (a1−2)(a2−1)=(a1−2)(a2−1)Thus a1a2−2a2−a1+2=a1a2−2a2−a2+2So a1=a2

(Surjective)
Let b∈R−{4}

Define a=b−8b−4. Suppose a=1. Then b−4=b−8, so −4=−8. Hence we see a≠1.
Note that

f(a)=4a−8a−1=4(b−8b−4)−8b−8b−4−1=4(b−8)−8(b−4)b−4b−8−b−4b−4=4b−4=b

HW 25

Ben Finch

E 25.1
A to B
{(1,x),(2,x),(3,x)}
Neither injective nor surjective

{(1,x),(2,x),(3,y)}
Surjective but not injective

{(1,x),(2,y),(3,y)}
Surjective but not injective

{(1,y),(2,y),(3,y)}
Neither injective nor surjective

{(1,y),(2,x),(3,y)}
Surjective but not injective

{(1,y),(2,y),(3,x)}
Surjective but not injective

{(1,y),(2,x),(3,x)}
Surjective but not injective

{(1,x),(2,y),(3,x)}
Surjective but not injective

B to A
{(x,1),(y,1)}
Neither injective nor surjective

{(x,1),(y,2)}
Injective but not surjective

{(x,1),(y,3)}
Injective but not surjective

{(x,2),(y,1)}
Injective but not surjective

{(x,2),(y,2)}
Neither injective nor surjective

{(x,2),(y,3)}
Injective but not surjective

{(x,3),(y,1)}
Injective but not surjective

{(x,3),(y,2)}
Injective but not surjective

{(x,3),(y,3)}
Neither injective nor surjective

E 25.2
a)
We aim to prove that the function f:Z→Z by f(n)=2n+1 is bijective.

Proof.
(Injective)
Let n1,n2∈Z. Assume f(n1)=f(n2). Then

2n1+1=2n2+12n1=2n2n1=n2

So f is injective.
(Surjective)

Let m∈Z. Define n=m−12. Note that

f(n)=2n+1=2(m−12)+1=m−1+1=m

So f is surjective.

Since f is both injective and surjective, it is bijective. â—»

b)
We aim to prove that the function g:R→R by g(x)=x2+2x+2 is neither injective nor surjective.

Proof. (Injective)
Fix z=0 and y=−2. We see that g(z)=2 and g(y)=2 so g(x)=g(y). But x≠y so g is not surjective. ◻

Proof. (Surjective)
Suppose that there exists some some point (x,0) within the function g(x). Then we can use the quadratic formula to find out what x it is. We see

x=−2±22−4(2)2=−2±−42=−2±2i2=−1±i

We see that there are no real roots, so there is no point (x,0) within g(x). Since 0 is within the codomain but not defined within the function, the function is not surjective. â—»

c)
We aim to prove that the function h:Z→Z by h(n)=n+3 is bijective.
Proof.
(Injective)
Let n1,n2∈Z. Assume that h(n1)=h(n2). Then

n1+3=n2+3n1=n3

So h is injective.

(Surjective)
Let m∈Z. Define n=m−3. We see that that

h(n)=n+3=(m−3)+3=m

So h is surjective.

Since we have proven that h is both surjective and injective, h is bijective. â—»

E 25.3
Define f:Z5→Z5 by f(a―)=2a+3―.
a)
Proof.
We aim to prove that for each a―∈Z5, f(a―) is unique.

  1. f(0―)=2(0)+3―=3―
  2. f(1―)=2(1)+3―=0―
  3. f(2―)=2(2)+3―=2―
  4. f(3―)=2(3)+3―=4―
  5. f(4―)=2(4)+3―=1―

Then f is well defined.

b)
Based on part a, we see that f={(0―,3―),(1―,0―),(2―,2―),(3―,4―),(4―,1―)}. We will prove f is both surjective and injective.

Proof.
(Injective)
We see that no two distinct elements in the domain Z5 are mapped to the same element in the codomain Z5. Thus, f is injective since f(a1)=f(a2) implies a1=a2. â—»

(Surjective)
The codomain of f is Z5={0―,1―,2―,3―,4―}. Since every element in Z5 appears as a second component in the set of ordered pairs, f is surjective.

Therefore, f is bijective. â—»

E 25.4
a) f(x)=x2
Proof.
(Injective)
Fix a=1 and b=−1. Then f(a)=1 and f(b)=1 but b≠a. So f is not injective.

(Surjective)
Take f(x)=−1 which is within the codomain. However, solving for x, we see that x=i which is not within the domain. In other words, squaring any real number cannot result in a negative number. So f is not surjective. ◻

b) f(x)=x
Proof.
(Injective)
Let x1,x2∈R. Assume that f(x1)=f(x2). We see that

x1=x2

Squaring both sides we get

x1=x2

So f is injective. â—»

(Surjective)

Consider any negative number f(x)=y with y<0. There is no x∈R such that x=y because the square root of a nonnegative number is always nonnegative.

Therefore, there is no x that maps to any negative y, which means f is not surjective.
â—»

c)

f(x)={x2if âˆ’3≤x≤4,x+12otherwise.

Proof.

(Surjective)
There are two cases.
If −3≤x≤4
Let z∈R. Define x=z. We see that

f(x)=x2=(z)2=z

Since f(x)=x+12 crosses the origin at x=−12, it is fine that x2 will not result in any any negative values.

If x<−3 or x>4.
Let y∈R. Define x=y−12. We see that

f(x)=x+12=(y−12)+12=y

So f is surjective

(Injective)
Fix a=−12 and b=0. Then f(a)=0 and f(b)=0 but b≠a. So f is not injective.

d) f(x)=x
Proof.
(Injective)
Let x1,x2∈R. Assume that f(x1)=f(x2). This gives us:

x1=x2

Therefore, f is injective. â—»

(Surjective)
We aim to show that for every y∈R, there exists an x∈R such that f(x)=y. This is true because for every y, we can take x=y, and we will have f(x)=y. Therefore, f is surjective. ◻

E 25.5
a)
Let x∈R−{2}. Then f(x)=x−3x−2. We want to show that f(x)≠1.

Suppose f(x)=1. Then we have:

x−3x−2=1

Multiplying both sides by x−2 (which is not zero since x≠2), we get:

x−3=x−2

This simplifies to −3=−2, which is a contradiction. Therefore, f(x)≠1 for any x∈R−{2}, and f is indeed a function from R−{2} to R−{1}.

b) Let x1,x2∈R−{2}. Assume f(x1)=f(x2). We find

x1−3x1−2=x2−3x2−2(x2−2)(x1−3)=(x1−2)(x2−3)x1x2−3x2−2x1+6=x1x2−3x1−2x2+6−3x2−2x1+3x1+2x2=−3x1−2x2+3x1+2x2x1−x2=0x1=x2

So f is injective.

c)
Let b∈R−{1}. Fix

a=−2b+31−b

We now show that a is in the domain of f, which is R−{2}. Since b is not 1, the denominator 1−b is not zero, and so a is a well-defined real number. Furthermore, a cannot be 2 because if a were 2, then we would have:

2=−2b+31−b2(1−b)=−2b+32−2b=−2b+32=3

which is a contradiction. Therefore, a≠2.

Substituting a back into f(x), we have:

f(−2b+31−b)=(−2b+31−b)−3(−2b+31−b)−2

Multiplying the numerator and the denominator by 1−b we get:

f(−2b+31−b)=−2b+3−3(1−b)−2b+3−2(1−b)=−2b+3−3+3b−2b+3−2+2b=b1=b

Therefore, for every b∈R−{1}, there exists an a∈R−{2} such that f(a)=b. Hence, f is surjective. ◻

E 25.6
f is surjective and not injective.

Surjective:
We want to show that for every a∈Z, there exists at least one pair (m,n)∈Z2 such that f(m,n)=a. This is equivalent to solving the equation 3m−2n=a for integers m and n.

Case 1: a is even, a=2k for some k∈Z.
We can choose m=0 and n=−k, so f(0,−k)=0−2(−k)=2k=a.

Case 2: a is odd, a=2k+1 for some k∈Z.
We can choose m=1 and n=−k+1, so f(1,−k+1)=3(1)−2(−k+1)=3+2k−2=2k+1=a.

Since in both cases, we can find integers m and n such that f(m,n)=a, the function is surjective.

Not injective.
Fix m1=2,n1=3 and m2=4,n2=6. These are distinct pairs in Z2. For these values, f(2,3)=3(2)−2(3)=6−6=0 and f(4,6)=3(4)−2(6)=12−12=0. Since f(2,3)=f(4,6) but (2,3)≠(4,6), the function is not injective.

Therefore, f is surjective but not injective.

E 25.7
a) [−1,1]
b) (0,∞)
c) (−∞,∞)
d) [0,∞)

E 25.8
a) A function f from R to R assigns to each element x in the domain exactly one element f(x) in the codomain. If a vertical line intersects the graph of f more than once, then there would be two different values of f(x) for the same x, which contradicts the definition of a function. Therefore, since f is a function, every vertical line intersects the graph of f at most once.

b) Since f is a function defined on all of R, for every x in R, there exists a unique f(x) in R. This means that for every vertical line (which corresponds to a value of x), there must be a point on the graph of f where it intersects that line. If there were a vertical line that did not intersect the graph of f, then there would be an x in R for which f(x) is not defined, which would contradict the fact that f is a function from R to R. Therefore, every vertical line intersects the graph of f at least once.

c) To prove that f is injective using the horizontal line test, we assume that for every horizontal line y=k, the line intersects the graph of f at most once. This means for any two points a and b in the domain, if f(a)=f(b), then it must be the case that a=b. Thus, no two different x-values map to the same y-value, which by definition means f is injective.

d) For f to be surjective, every y in the codomain R must be the image of at least one x in the domain. To prove this, we assume that for every real number y, there exists a real number x such that f(x)=y. Thus, any horizontal line y=k, for any real number k, will intersect the graph of f at least once, which means f is surjective as it covers the entire codomain without any 'holes'.