HW8-Solutions
HW8-Solutions
Solution to Question 1.
(a) This is a function. It is injective.
(b) This is not a function.
(c) This is a bijective function.
(d) This is a function that is neither injective nor surjective.
Solution to Question 2. A function is defined not only by its rule, but also its domain and codomain. While
the domains and codomains were rarely explicitly mentioned in precalculus, the standard interpretation is
for it to be the largest real domain possible. With this, f ’s domain is R \ {−3} and g’s domain is R. Since
these have different domains, they are different functions.
Solution to Question 3. The range is the set of all positive integers which are divisible by both 2 and 3,
and are not divisible by any other prime.
Solution to Question 4. We will prove that f is a bijection by proving it is injective and surjective.
4x + 3 = 4y + 3.
Simplifying,
4x = 4y
x = y.
Surjective. Suppose that b ∈ R. We wish to find an x from the domain for which f (x) = b.
Let x = b−3
4 . Notice that x ∈ R and
b−3 b−3
f (x) = f =4 + 3 = b − 3 + 3 = b.
4 4
That is, for any b ∈ R we found an x ∈ R for which f (x) = b. Thus, f is surjective.
Solution to Question 5.
Part (j): r is not injective. To see this, note that
r(−5) = −| − 5 + 4| = −1
and
r(−3) = −| − 3 + 4| = −1.
Proofs: A Long-Form Mathematics Textbook Jay Cummings
That is, we have found numbers x, y ∈ (∞, 0) for which x 6= y and yet r(x) = r(y), proving that r is not
injective.
We will now show that r is surjective. Indeed, let b ∈ (−∞, 0) and let x = b − 4. Note that b ∈ (−∞, 0)
and that
r(x) = r(b − 4) = −|b − 4 + 4| = −|b| = −(−b) = b.
Thus, given any b ∈ (−∞, 0), there exists some b ∈ (−∞, 0) for which r(x) = b, proving that r is surjective.
Part (k): s is injective. To see this, observe that if s(x) = s(y), then (x, x) = (y, y). For two ordered pairs
to be equal, they must be equal in each coordinate—both give the same thing: x = y. We have shown that
if s(x) = s(y), then x = y, and hence s is injective.
We will now show that s is not surjective. To see this, note that (1, 2) ∈ N × N, and if s(x) = (1, 2), then
(x, x) = (1, 2), implying that x = 1 and x = 2, a contradiction. Thus, (1, 2) is in the codomain but not the
range, showing that s is not surjective.
Solution to Question 6. Assume A and B are finite sets and |A| = |B| and f : A → B. First we will
prove that if f is injective, then f is surjective. We do so using the contrapositive. To that end, assume f
is not surjective. Then there is some b ∈ B which nothing maps to; that is,
f (x) ∈ B \ {b}
for all x ∈ A. Consider each element in A to be in object and each element in B \ {b} to be a box. Place
object a in box f (a), for each a ∈ A. Notice that there are |A| objects and |B| − 1 boxes. And since |A| = |B|
this means there are more objects than boxes and hence by the pigeonhole principle there must be some box
with at least two objects in it.
Suppose x and y are two objects that ended up in the same box. Since x was placed in box f (x) and y
was placed in box f (y), and the pigeonhole principle tells us that these two boxes are the same, this means
that f (x) = f (y), proving that f is not injective. Since f being not surjective implies it is not injective, by
the contrapositive f being injective implies it is surjective.
Next we prove that if f is surjective, then it is injective. Again, we use the contrapositive. To that end,
assume that f is not injective. Then there are x, y ∈ A such that f (x) = f (y) but yet x 6= y. Consider now
the remaining |A| − 2 points from A, and the remaining |B| − 1 points from B. Assume for a contradiction
that each of those points in B were hit by a point in A. Then, every b ∈ B has some a ∈ A for which
f (a) = B.
Consider each of these |B| − 1 points to be objects and each of the |A| − 2 remaining points in A to be
boxes, and for each b ∈ B, pick an a ∈ A which maps to b and place b in that Box a. Since |A| = |B|, there
are more objects than boxes. Thus, by the pigeonhole principle, there must be some Box a which has more
than one point in it; meaning, there are two distinct points b1 , b2 ∈ B for which f (a) = b1 and f (a) = b2 .
This contradicts the definition of a function, which insists that each point in the domain is sent to only one
element of the codomain. This proves that f : A → B is not surjective. Since f being not injective implies
f is not surjective, by the contrapositive f being surjective implies that f is injective.
Second Solution. Assume A and B are finite sets and |A| = |B| and f : A → B. First we will prove
that if f is injective, then f is surjective. We do so using the contrapositive. To that end, assume f is not
surjective. Then there is some b ∈ B which nothing maps to; that is,
f (x) ∈ B \ {b}
for all x ∈ A. Thus, f ’s rule acts as a function from A to B \ {b}, where |A| = n and |B \ {b}| = n − 1, by
the func-y pigeonhole principle f is not injective. Since f being not surjective implies it is not injective, by
the contrapositive f being injective implies it is surjective.
Next we prove that if f is surjective, then it is injective. Again, we use the contrapositive. To that end,
assume that f is not injective. Then there are x, y ∈ A such that f (x) = f (y) but yet x 6= y. Consider now
the remaining n − 2 points from A. Consider the portion of f which maps A \ {x, y} to B \ {f (x)}, which
Proofs: A Long-Form Mathematics Textbook Jay Cummings
is a function from a set of size n − 2 to a set of size n − 1. By the func-y pigeonhole principle this function
is not surjective. This proves that f : A → B is not surjective. Since f being not injective implies f is not
surjective, by the contrapositive f being surjective implies that f is injective.
Solution to Question 7.
Solution to Question 8.
Since there is a counterexample to Conjecture 2, this shows that the conjecture is false.