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)=4x8x1 is bijective.

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

4a18a11=4a28a21a12a11=a22a21(a12)(a21)=(a12)(a21)a1a22a2a1+2=a1a22a2a2+2a1=a2

Surjective
Let bR{4}

b=4a8a1b(a1)=4a8bab=4a8(b4)a=b8a=b8b4

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

4a18a11=4a28a21Thus a12a11=a22a21Hence (a12)(a21)=(a12)(a21)Thus a1a22a2a1+2=a1a22a2a2+2So a1=a2

(Surjective)
Let bR{4}

Define a=b8b4. Suppose a=1. Then b4=b8, so 4=8. Hence we see a1.
Note that

f(a)=4a8a1=4(b8b4)8b8b41=4(b8)8(b4)b4b8b4b4=4b4=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:ZZ by f(n)=2n+1 is bijective.

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

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

So f is injective.
(Surjective)

Let mZ. Define n=m12. Note that

f(n)=2n+1=2(m12)+1=m1+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:RR 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 xy 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±224(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:ZZ by h(n)=n+3 is bijective.
Proof.
(Injective)
Let n1,n2Z. Assume that h(n1)=h(n2). Then

n1+3=n2+3n1=n3

So h is injective.

(Surjective)
Let mZ. Define n=m3. We see that that

h(n)=n+3=(m3)+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:Z5Z5 by f(a)=2a+3.
a)
Proof.
We aim to prove that for each aZ5, 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 ba. 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,x2R. 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 xR 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 3x4,x+12otherwise.

Proof.

(Surjective)
There are two cases.
If 3x4
Let zR. 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 yR. Define x=y12. We see that

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

So f is surjective

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

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

x1=x2

Therefore, f is injective.

(Surjective)
We aim to show that for every yR, there exists an xR 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 xR{2}. Then f(x)=x3x2. We want to show that f(x)1.

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

x3x2=1

Multiplying both sides by x2 (which is not zero since x2), we get:

x3=x2

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

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

x13x12=x23x22(x22)(x13)=(x12)(x23)x1x23x22x1+6=x1x23x12x2+63x22x1+3x1+2x2=3x12x2+3x1+2x2x1x2=0x1=x2

So f is injective.

c)
Let bR{1}. Fix

a=2b+31b

We now show that a is in the domain of f, which is R{2}. Since b is not 1, the denominator 1b 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+31b2(1b)=2b+322b=2b+32=3

which is a contradiction. Therefore, a2.

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

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

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

f(2b+31b)=2b+33(1b)2b+32(1b)=2b+33+3b2b+32+2b=b1=b

Therefore, for every bR{1}, there exists an aR{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 aZ, there exists at least one pair (m,n)Z2 such that f(m,n)=a. This is equivalent to solving the equation 3m2n=a for integers m and n.

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

Case 2: a is odd, a=2k+1 for some kZ.
We can choose m=1 and n=k+1, so f(1,k+1)=3(1)2(k+1)=3+2k2=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)=66=0 and f(4,6)=3(4)2(6)=1212=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'.