MATH2222 Homework 4
MATH2222 Homework 4
Isaac Leong
March 2023
Collaboration Statement
For this Assignment, because I started very early, I unfortunately did not have a chance to
discuss and collaborate with others in the class. I finished this assignment all the questions
on my own. However, for question 3, I have discussed with Thomas Bridgart about another
possible solution. Also, I discussed some other questions for pleasure with him during the
tutorial.
1
Question 1
(a)
Prove: The composition of injective functions is injective.
Suppose function f : X −→ Y and g : Y −→ V are injective. We will prove that the
composition g ◦ f : X −→ V is injective.
First, by definition of injection, both functions f and g satisfy the following conditions.
(b)
Prove: The composition of surjective functions is surjective.
Suppose function f : X −→ Y and g : Y −→ V are surjective. We will prove that the
composition g ◦ f : X −→ V is also surjective.
Then, by definition of surjection,
2
Question 2
Let f : A −→ B and g : B −→ C, and let h = g ◦ f .
(a)
Prove or disprove: If h is injective, then f is injective.
Direct prove for case 1 but prove by contradiction for case 2.
Case 1:
If there are only one or no element in A, then f has to be an injection because for all elements
in B, there is only at most one element in A such that f (a) = b.
Case 2:
If there are at least two elements in set A, then we can make the following assumption.
Since f (a1 ) = f (a2 ), then g(f (a1 )) = g(f (a2 )), where a1 ̸= a2 . This is equivalently h(a1 ) =
h(a2 ) (a1 ̸= a2 ).
However, this contradicts to h being injective. Therefore, the assumption is wrong and f is
injective. ■
(b)
Prove or disprove: If h is injective, then g is injective.
This statement is false.
Let, A = {1}, B = R and C = R.
Let f be a constant function, ie. f (a) = 1. Then, let g(b) = b2 .
Then, since for all c ∈ R, there is only at most one value a ∈ A, such that g ◦ f (a) = c. This
implies that g ◦ f is injective. Therefore, even though g ◦ f is injective, g is not injective. ■
(c)
Prove or disprove: If h is surjective, then f is surjective.
This statement is false. Construct the following functions:
3
(d)
Prove or disprove: If h is surjective, then g is surjective.
Proof: Since h is surjective, then for all c ∈ C, there exists a ∈ A such that h(a) = c.
Also note that h(a) = g(f (a)). Since, f (A) ⊂ B, therefore f (a) ∈ B. Therefore, we can just
choose b = f (a) ∈ B such that g(b) = c. This implies that for all c ∈ C, there exists b ∈ B
such that g(b) = c. Therefore, g is surjective. ■
4
Question 3
Let n and k be positive integers. Prove that if there is a bijection from [n] to [k] then n = k.
(Denote {1, ....., n}, by [n])
5
Question 4
Show that odd integers are a countable set.
First, to show that it is a countable set, we have to show that there is a bijection between
it and the natural number set by definition of a countable set.
Since, there is a bijection from the odd integer sets to the natural number set, if and only
if there exists a bijection from the natural number set to the odd integers set.
Hence, we construct the following bijection going from natural number to the odd integer
set.
f : N −→ {2k + 1|k ∈ Z} (N includes zero)
(
x if x is odd
f (x) =
−x − 1 if x is even
In order to show the construction is indeed a bijection, it is required to show that it is
both injective and surjective.
Injective
If f (x) > 0, then from the definition, x is odd. Then, f is f (x) = x. Therefore, f (x1 ) =
f (x2 ) =⇒ x1 = x2 .
If f (x) < 0, then from the definition, x is even. Then the function f (x) = −x − 1.
Therefore,
This shows that f is also injective for all f (x) < 0. Therefore, f is injective for the domain,
N, and the codomain, {2k + 1|k ∈ Z}, provided.
Surjective
Prove by contradiction. Suppose there is an odd integer, y0 , that is not hit by any elements
in the natural number according to the mapping of f .
If y0 > 0, then since there is always x = y0 such that f (x0 ) = y by definition of the
function. Therefore, y0 is not positive.
Also, if y0 < 0, then since there is always x = −y0 − 1 such that f (x0 ) = y by definition
of the function because, if y0 is a negative odd integer, then x = −y0 − 1 is a positive even
integer (including 0). Therefore, y0 is not negative as well.
Since, y0 is an odd number, therefore, it is not zero as well. This leads to contradiction
of the law of trichotomy. Therefore, the original assumption is wrong and f should indeed
be surjective.
6
Question 5
Let A1 , A2 , A3 , ... be a sequence of disjoint sets, each of which is countable. Prove that their
union is countable.
First, from the question, there are infinitely many sets Ai indexed by the natural number.
Then, if we denote the jth element in a set Ai as aij , then all elements in all the sets can
be indexed by (i, j), where i ∈ N and j ∈ N, where i means the element is in the i-th set,
Ai , and it is the j-th element in the set. This is equivalently indexing all elements in all the
set by an element of N × N.
A1 = {a11 , a12 , a13 , a14 , ...}
A2 = {a21 , a22 , a23 , a24 , ...}
A3 = {a31 , a32 , a33 , a34 , ...}
:
:
Then, through the bijection introduced in class,
f : N × N −→ N
Injective
Since, all the Ai are disjoint, this implies that they do not have common element, ie. Ai ∩Aj =
∅. Therefore, if g(i, j) = aij = axy = g(x, y), then (i, j) = (x, y) because all aij are unique.
Hence, g is injective.
Surjective
Since, by definition for the mapping it is constructed above, any element in any set are
assigned a pair of integers based on which set Ai it belongs to and the place it appears in
Ai , therefore, for all aij ∈ A1 ∪ A2 ∪ A3 ..., there exists an ordered pair of (i, j) such that
g(i, j) = aij . Hence, by definition, g is surjective.