0% found this document useful (0 votes)
32 views39 pages

300 Problems Solutions

The document contains a collection of mathematical problems and solutions related to logical connectives, quantifiers, proofs, and set theory, among other topics. It includes detailed explanations and truth tables to demonstrate logical equivalences and properties of functions. The content is structured into sections, each focusing on different mathematical principles and applications, making it a comprehensive resource for studying mathematical logic.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views39 pages

300 Problems Solutions

The document contains a collection of mathematical problems and solutions related to logical connectives, quantifiers, proofs, and set theory, among other topics. It includes detailed explanations and truth tables to demonstrate logical equivalences and properties of functions. The content is structured into sections, each focusing on different mathematical principles and applications, making it a comprehensive resource for studying mathematical logic.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

MATH 300 Problems with solutions

F. Baudier (Texas A&M University)

October 20, 2023

Contents

1 Logical connectives and equivalences, Boolean Calculus 2

2 Quantifiers 8

3 Proofs 12

4 Applications of the Principle of Mathematical Induction 18

5 Applications of the Principle of Strong Mathematical Induction 25

6 Sequences defined by a recurrence relation 26

7 Set Theory 27
7.1 Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.2 Complements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.3 Arbitrary unions and intersections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.4 More problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

8 Functions 35
8.1 Composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.2 Injectivity, surjectivity, bijectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.3 Composition and injectivity/surjectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

9 Injectivity, surjectivity, and one-sided invertibility 37

10 Functions and sets 38

1
11 Supplementary problems 39

1 Logical connectives and equivalences, Boolean Calculus

Problem 1.1. Show that P ∨ P is logically equivalent to P.

Solution of Problem 1.1. We write the truth table for P ∨ P.

P P P∨P
T T T
F F F

Problem 1.2. Show that P ∧ P is logically equivalent to P.

Solution of Problem 1.2. We write the truth table for P ∧ P.

P P P∧P
T T T
F F F

Problem 1.3. Are the statement forms (P ∧ Q) ∧ R and P ∧ (Q ∧ R) logically equivalent?

Solution of Problem 1.3. We write a truth table for (P ∧ Q) ∧ R and P ∧ (Q ∧ R):

P Q R P∧Q Q∧R (P ∧ Q) ∧ R P ∧ (Q ∧ R)
T T T T T T T
T T F T F F F
T F T F F F F
T F F F F F F
F T T F T F F
F T F F F F F
F F T F F F F
F F F F F F F
Since the columns corresponding to (P ∧ Q) ∧ R and P ∧ (Q ∧ R) are identical, the two statement forms are
equivalent.

2
Problem 1.4. Are the statement forms (P ∨ Q) ∨ R and P ∨ (Q ∨ R) logically equivalent?

Solution of Problem 1.4. We write a truth table for (P ∨ Q) ∨ R and P ∨ (Q ∨ R):

P Q R P∨Q Q∨R (P ∨ Q) ∨ R P ∨ (Q ∨ R)
T T T T T T T
T T F T T T T
T F T T T T T
T F F T F T T
F T T T T T T
F T F T T T T
F F T F T T T
F F F F F F F
Since the columns corresponding to (P ∨ Q) ∨ R and P ∨ (Q ∨ R) are identical, the two statement forms are
equivalent.

Problem 1.5. Is the statement form (P ∧ Q) ∨ ((¬P) ∧ ¬Q) a tautology, a contradiction, or neither?

Solution of Problem 1.5. We write a truth table for (P ∧ Q) ∨ ((¬P) ∧ ¬Q):

P Q P∧Q (¬P) ∧ ¬Q (P ∧ Q) ∨ ((¬P) ∧ ¬Q)


T T T F T
T F F F F
F T F F F
F F F T T
Since (P∧Q)∨((¬P)∧¬Q) is neither always true nor always false, the statement form is neither a tautology
nor a contradiction.

Problem 1.6. Are the statement forms (P ∨ Q) ∧ R and P ∨ (Q ∧ R) logically equivalent?

Solution of Problem 1.6. We write a truth table for (P ∨ Q) ∧ R and P ∨ (Q ∧ R):

3
P Q R P∨Q Q∧R (P ∨ Q) ∧ R P ∨ (Q ∧ R)
T T T T T T T
T T F T F F T
T F T T F T T
T F F T F F T
F T T T T T T
F T F T F F F
F F T F F F F
F F F F F F F
Since the columns corresponding to (P ∨ Q) ∧ R and P ∨ (Q ∧ R) differ (in the second and fourth rows), the
two statements are not logically equivalent.

Problem 1.7. Show that P ∨ (Q ∧ R) is logically equivalent to (P ∨ Q) ∧ (P ∨ R).

Solution of Problem 1.7. We write a truth table for P ∨ (Q ∧ R) and (P ∨ Q) ∧ (P ∨ R):

P Q R P∨Q P∨R (P ∨ Q) ∧ (P ∨ R) P ∨ (Q ∧ R)
T T T T T T T
T T F T T T T
T F T T T T T
T F F T T T T
F T T T T T T
F T F T F F F
F F T F T F F
F F F F F F F

Since the columns corresponding to P ∨ (Q ∧ R) and (P ∨ Q) ∧ (P ∨ R) are identical, the two statement
forms are equivalent.

Problem 1.8. Show that P ∧ (Q ∨ R) is logically equivalent to (P ∧ Q) ∨ (P ∧ R).

Solution of Problem 1.8. We write a truth table for P ∧ (Q ∨ R) and (P ∧ Q) ∨ (P ∧ R):

4
P Q R P∧Q P∧R (P ∧ Q) ∨ (P ∧ R) P ∧ (Q ∨ R)
T T T T T T T
T T F T F T T
T F T F T T T
T F F F F F F
F T T F F F F
F T F F F F F
F F T F F F F
F F F F F F F

Since the columns corresponding to P ∧ (Q ∨ R) and (P ∧ Q) ∨ (P ∧ R) are identical, the two statement
forms are equivalent.

Problem 1.9. Are the statement forms P =⇒ (Q ∨ R) and (P =⇒ Q) ∨ (P =⇒ R) logically equivalent?

Solution of Problem 1.9. We could write a truth table for P =⇒ (Q ∨ R) and (P =⇒ Q) ∨ (P =⇒ R):

P Q R Q∨R P =⇒ Q P =⇒ R P =⇒ (Q ∨ R) (P =⇒ Q) ∨ (P =⇒ R)
T T T T T T T T
T T F T T F T T
T F T T F T T T
T F F F F F F F
F T T T T T T T
F T F T T T T T
F F T T T T T T
F F F F T T T T
Since the columns corresponding to P =⇒ (Q ∨ R) and (P =⇒ Q) ∨ (P =⇒ R) are identical, the two
statements are logically equivalent.
An alternate proof would go as follows:

P =⇒ (Q ∨ R) ≡ (¬P) ∨ (Q ∨ R) ≡ (¬P) ∨ Q ∨ R

while

5
(P =⇒ Q) ∨ (P =⇒ R) ≡ ((¬P) ∨ Q) ∨ ((¬P) ∨ R)

≡ (¬P) ∨ (¬P) ∨ Q ∨ R

≡ (¬P) ∨ Q ∨ R

and thus P =⇒ (Q ∨ R) ≡ (P =⇒ Q) ∨ (P =⇒ R).

Problem 1.10. Are the statement forms P =⇒ (Q ∧ R) and (P =⇒ Q) ∧ (P =⇒ R) logically equivalent?

Hint. Try to use Problem 1.7.

Solution of Problem 1.10. We could write a truth table for P =⇒ (Q ∧ R) and (P =⇒ Q) ∧ (P =⇒ R):

P Q R Q∧R P =⇒ Q P =⇒ R P =⇒ (Q ∧ R) (P =⇒ Q) ∧ (P =⇒ R)
T T T T T T T T
T T F F T F F F
T F T F F T F F
T F F F F F F F
F T T T T T T T
F T F F T T T T
F F T F T T T T
F F F F T T T T
Since the columns corresponding to P =⇒ (Q ∧ R) and (P =⇒ Q) ∧ (P =⇒ R) are identical, the two
statements are logically equivalent.
An alternate proof (assuming we know the result from Problem 1.7 ) would go as follows:

P =⇒ (Q ∧ R) ≡ (¬P) ∨ (Q ∧ R) ≡ ((¬P) ∨ Q) ∧ ((¬P) ∨ R)

while

(P =⇒ Q) ∧ (P =⇒ R) ≡ ((¬P) ∨ Q) ∧ ((¬P) ∨ R)

and thus P =⇒ (Q ∧ R) ≡ (P =⇒ Q) ∧ (P =⇒ R).

6
Problem 1.11. Show that the statement forms (P ∨ Q) =⇒ R and (P =⇒ R) ∧ (Q =⇒ R) are logically
equivalent.

Hint. Try to use DeMorgan’s Laws and Problem 1.7.

Solution of Problem 1.11. We could write a truth table for (P ∨ Q) =⇒ R and (P =⇒ R) ∧ (Q =⇒ R):

P Q R P∨Q Q =⇒ R P =⇒ R (P ∨ Q) =⇒ R (P =⇒ R) ∧ (Q =⇒ R)
T T T T T T T T
T T F T F F F F
T F T T T T T T
T F F T T F F F
F T T T T T T T
F T F T F T F F
F F T F T T T T
F F F F T T T T
Since the columns corresponding to (P ∨ Q) =⇒ R and (P =⇒ R) ∧ (Q =⇒ R) are identical, the two
statements are logically equivalent.
An alternate proof (assuming we know DeMorgan’s laws and the result from Problem 1.7) would go as
follows:

(P ∨ Q) =⇒ R ≡ (¬(P ∨ Q) ∨ R) ≡ ((¬P) ∧ ¬Q) ∨ R

≡ ((¬P) ∨ R) ∧ ((¬Q) ∨ R)

while

(P =⇒ R) ∧ (Q =⇒ R) ≡ ((¬P) ∨ R) ∧ ((¬Q) ∨ R)

and thus (P ∨ Q) =⇒ R ≡ (P =⇒ Q) ∧ (P =⇒ R).

Problem 1.12. For all the statement forms below write a logically equivalent statement form that involves
only the logical connective ¬ and ∨.

1. P ∨ (Q ∧ R)

7
2. (P ∨ Q) ∧ (P ∨ R)

3. P ⇐⇒ Q

Hint. Try to use DeMorgan’s laws.

Solution of Problem 1.12. 1. P ∨ (Q ∧ R) ≡ P ∨ ¬((¬Q) ∨ (¬R))

2. (P ∨ Q) ∧ (P ∨ R) ≡ ¬((¬(P ∨ Q)) ∨ ¬(P ∨ R))

3. P ⇐⇒ Q ≡ (P =⇒ Q) ∧ (Q =⇒ P) ≡ ((¬P) ∨ Q) ∧ ((¬Q) ∨ P) ≡ ¬((¬((¬P) ∨ Q)) ∨ ¬((¬Q) ∨ P))

Problem 1.13. For all the statement forms below write a logically equivalent statement form that involves
only the logical connective ¬ and ∧.

1. P ∧ (Q ∨ R)

2. (P ∧ Q) ∨ (P ∧ R)

3. P ⇐⇒ Q

Hint. Try to use DeMorgan’s laws.

Solution of Problem 1.13. 1. P ∧ (Q ∨ R) ≡ P ∧ ¬((¬Q) ∧ (¬R))

2. (P ∧ Q) ∨ (P ∧ R) ≡ ¬((¬(P ∧ Q)) ∧ ¬(P ∧ R))

3. P ⇐⇒ Q ≡ (P =⇒ Q) ∧ (Q =⇒ P) ≡ ((¬P) ∨ Q) ∧ ((¬Q) ∨ P) ≡ (¬((¬¬P) ∧ ¬Q)) ∧ ¬((¬¬Q) ∧


¬P) ≡ (¬(P ∧ ¬Q)) ∧ ¬(Q ∧ ¬P)

Problem 1.14. Are the statement forms [(¬P) =⇒ [Q ∧ ¬Q]] and P logically equivalent?

2 Quantifiers

Problem 2.1. Let x0 ∈ (a, b), ℓ ∈ R and f : (a, x0 ) ∪ (x0 , b) → R. We say that ℓ is the limit of f at x0 , and
we write limx→x0 f (x) = ℓ, if for all ε > 0 there exists δ > 0 such that if x satisfies 0 < |x − x0 | < δ then
| f (x) − ℓ| < ε. Formally,

lim f (x) = ℓ ⇐⇒ (∀ε > 0)(∃δ > 0)(∀x)[0 < |x − x0 | < δ =⇒ | f (x) − ℓ| < ε].
x→x0

Negate the statement (∀ε > 0)(∃δ > 0)(∀x)[0 < |x − x0 | < δ =⇒ | f (x) − ℓ| < ε].

8
Hint. Remember that ¬(P =⇒ Q) ≡ P ∧ ¬Q.

Solution of Problem 2.1.

(∃ε > 0)(∀δ > 0)(∃x)[(0 < |x − x0 | < δ ) ∧ (| f (x) − ℓ| ⩾ ε)].

Problem 2.2.

1. Give a possible definition of even numbers using logical symbols, quantifiers, and only the multipli-
cation operation.

2. Negate the definition you gave above.

Solution of Problem 2.2.

1.
x is even ⇐⇒ (x ∈ Z) ∧ (∃k ∈ Z)(x = 2k)

2.
x is not even ⇐⇒ (x ∈
/ Z) ∨ (∀k ∈ Z)(x ̸= 2k)

Problem 2.3.

1. Give a possible definition of a prime number using logical symbols, quantifiers, and only the multipli-
cation operation.

2. Negate the definition you gave above.

Solution of Problem 2.3.

1.

x is a prime number ⇐⇒ [(x ∈ N) ∧ (x ̸= 1) ∧ [(∀m ∈ N)(∀n ∈ N)[x = mn =⇒ ((m = 1) ∨ (n = 1))]].

2.

x is not a prime number ⇐⇒ [(x ∈


/ N) ∨ (x = 1) ∨ [(∃m ∈ N)(∃n ∈ N)(x = mn) ∧ (m > 1) ∧ (n > 1)].

9
Problem 2.4. Write a formal mathematical expression that expresses the fact that a given sequence (xn )n∈N
does not have a real limit.

Solution of Problem 2.4.

(∀ℓ ∈ R)(∃ε > 0)(∀N ∈ N)(∃n ⩾ N)(|xn − ℓ| ⩾ ε)

Problem 2.5. Negate the statement P : (∀n ∈ Z)(∃k ∈ Z)(n2 + n + 1 = 2k). Try to explain what P and ¬P
mean.

Solution of Problem 2.5. ¬P : (∃n ∈ Z)(∀k ∈ Z)(n2 + n + 1 ̸= 2k). P means that for every integer n the
integer n2 + n + 1 is even. ¬P means that there exists an integer n such that the integer n2 + n + 1 is not
even.

Problem 2.6. Let f be a function from R to R. We say that f is strictly increasing if

(∀x ∈ R)(∀y ∈ R)[(x < y) =⇒ ( f (x) < f (y))].

Negate the statement above.

Solution of Problem 2.6.


(∃x ∈ R)(∃y ∈ R)[(x < y) ∧ ( f (x) ⩾ f (y))].

Problem 2.7. Let f be a function from R to R. Define what it means for f to be strictly decreasing

Solution of Problem 2.7.

f is strictly decreasing ⇐⇒ (∀x ∈ R)(∀y ∈ R)[(x < y) =⇒ ( f (x) > f (y))].

Problem 2.8. Let f be a function from R to R. Write a formal mathematical expression which expresses the
fact that it is not true that f is strictly decreasing or strictly increasing.

10
Solution of Problem 2.8. If it is not true that f is strictly decreasing or strictly increasing then f is not strictly
decreasing and not strictly decreasing. Formally, it can be expressed with the following statement:

[(∃x ∈ R)(∃y ∈ R)[(x < y) ∧ ( f (x) ⩽ f (y))]] ∧ [(∃w ∈ R)(∃z ∈ R)[(w < z) ∧ ( f (w) ⩾ f (z))]].

Problem 2.9. Define formally what it means that an integer k divides an integer n.

Solution of Problem 2.9.


k divides n ⇐⇒ (∃m ∈ Z)(n = km)

Problem 2.10. Give a formal definition of what it means for a number x to be a rational number.

Solution of Problem 2.11.

p
x is rational ⇐⇒ (x ∈ R) ∧ [(∃p ∈ Z)(∃q ∈ N) x = ]
q

Problem 2.11. Give a formal definition of what it means for a number x to be a irrational number.

Solution of Problem 2.11. Since x is irrational if and only if it is not rational,

p
x is irrational ⇐⇒ (x ∈
/ R) ∨ [(∀p ∈ Z)(∀q ∈ N)(x ̸= )].
q

Problem 2.12. What is the truth value of the statement (∀x ∈ R)(∃y ∈ R)(∀z ∈ R)[xy = xz]?

Solution of Problem 2.12. The statement is false, i.e., (∃x ∈ R)(∀y ∈ R)(∃z ∈ R)[xy ̸= xz] is true. To see
this, let x = 1, and let y ∈ R be given. If y ̸= 0, put z = 2y. Then xy = y ̸= 2y = xz. If now y = 0, put z = 1.
Then xy = 0 ̸= 1 = xz.

Problem 2.13. What is the truth value of the statement (∃y ∈ R)(∀x ∈ R)(∃z ∈ R)[xy = xz]?

Solution of Problem 2.13. The statement is true. To see this, put y = 1, and let x ∈ R be given. Put z = 1.
Then we have xy = x = xz.

11
3 Proofs

Problem 3.1. Prove that the equation (E) : 7x − 2 = 0 has a unique solution in R.

Solution of Problem 3.1. Let x0 = 72 . Then x0 ∈ R and 7x0 − 2 = 7 27 − 2 = 2 − 2 = 0, so the equation (E)
has a solution. Assume now that y is a real solution to the equation (E), then 7y − 2 = 0 and thus y = 27 = x0 .
Therefore, the equation (E) has a unique solution.

Problem 3.2. Prove that the equation (E) : − 3x + 8 = 0 has a unique solution in R.

Solution of Problem 3.2. Assume that y and z are real solutions to the equation (E), then −3y + 8 = −3z + 8
and thus −3y = −3z. Since −3 ̸= 0 it follows that y = z. Therefore, the equation (E) has at most one
solution. Now, let x = 38 . Then x ∈ R and −3x + 8 = −3 38 + 8 = −8 + 8 = 0, so the equation (E) has at least
solution. We can thus conclude that the equation (E) at a unique solution.

Problem 3.3. Let a, b, c ∈ R with a ̸= 0. Prove that the equation (E) : ax + b = c has a unique solution in
R.

c−b
Solution of Problem 3.3. Let x0 = a . Then x0 ∈ R and ax0 + b = a c−b
a + b = c − b + b = c, and hence the

equation (E) has a solution. Assume now that y and z are real solutions to the equation (E), then ay + b = c
and az + b = c. Therefore,
0 = c − c = (ay + b) − (az + b) = a(y − z).

Since a ̸= 0, one has y − z = 0, and thus y = z. The equation (E) has a unique solution.

Problem 3.4. Let a, b, and c be integers. Prove that for all integers m and n, if a divides b and a divides c,
then a divides (bm + cn).

Solution of Problem 3.4. Let m and n be fixed integers. Assume that a divides b and that a divides c. Then
there exist integers j and k such that b = a j and c = ak. (We must show that there exists an integer l such
that bm + cn = al.) Observe that

bm + cn = a jm + akn = a( jm + kn).

Put l = jm + kn. Then l is an integer such that bm + cn = al, and therefore a | (bm + cn). Since m and n
were fixed but arbitrary, we proved that for all integers m and n, if a divides b and a divides c, then a divides
(bm + cn).

Problem 3.5. Prove that if m and n are even, then m + n is even.

12
Solution of Problem 3.5. Let m and n be fixed integer and assume that m and n are fixed even numbers.
Then there exist integers j and k such that m = 2 j and n = 2k. Let l = j + k, then l is an integer, and we have

m + n = 2 j + 2k = 2( j + k) = 2l.

Therefore, m + n is even. Since m and n were fixed but arbitrary even numbers then the proof is complete.

Problem 3.6. Prove that if m is even and n is odd, then m + n is odd.

Solution of Problem 3.6. Assume that m is a fixed even number and n is a fixed odd number. Then there
exist integers j and k such that m = 2 j + 1 and n = 2k. Let l = j + k, then l is an integer, and we have

m + n = 2 j + 1 + 2k = 2( j + k) + 1 = 2l + 1.

Therefore, m + n is odd. The proof is complete since m and n were fixed but arbitrary.

Problem 3.7. Prove that for all m, n ∈ Z, if m is even, then mn is even.

Solution of Problem 3.7. Let m and n be integers and assume that m is even. Then there exists and integer k
such that m = 2k. Put l = kn. Then l is an integer, and we have mn = 2kn = 2l. Therefore, mn is even.

Problem 3.8. Show that for all n ∈ Z, 4n + 7 is odd.

Solution of Problem 3.8. Fix n ∈ Z. Let k = 2n + 3, then k is an integer, and we have

4n + 7 = 2(2n) + 2(3) + 1 = 2(2n + 3) + 1 = 2k + 1.

Therefore, 4n + 7 is odd. Since n was fixed but arbitrary the conclusion follows.

Problem 3.9. Let n be an integer. Prove that if n2 is even, then n is even.

Solution of Problem 3.9. Let n ∈ Z and assume n is not even. Then n is odd, hence there is some k ∈ Z such
that n = 2k + 1. Thus n2 = (2k + 1)2 = 2(2k2 + 2k) + 1 = 2r + 1, with r = 2k2 + 2k ∈ Z, and thus n2 is odd.
Therefore, by contraposition, if n is even, then n2 is even.

Problem 3.10. Let n be an integer. Prove that if n3 is even, then n is even.

Solution of Problem 3.10. Let us prove the contrapositive “if n is not even then n3 is not even”, or equiv-
alently “if n is odd then n3 is odd”. Assume that n is odd, then there exists k ∈ Z such that n = 2k + 1,
and hence n3 = (2k + 1)3 = (2k)3 + 3 · (2k)2 + 3 · 2k + 1 = 2(4k3 + 6 · k2 + 3k) + 1 = 2r + 1, where r =
4k3 + 6 · k2 + 3k is an integer. Therefore n3 is odd.

13
Problem 3.11. For this problem you can use the following fact that will be proven later: 3 does not divides
n if and only if there exists an integer k and an integer i ∈ {1, 2} such that n = 3k + i.
Prove that for every integer n, if 3 divides n2 then 3 divides n.

Solution of Problem 3.12. Let n be an integer and assume that 3 does not divide n. Then there exists an
integer k and an integer i ∈ {1, 2} such that n = 3k + i. Therefore,

n2 = (3k + i)2 = 9k2 + 6ki + i2 = 3(3k2 + 2ki) + i2 .

If i = 1 then i2 = 12 = 1, and n2 = 3r + 1 with r = 3k2 + 2ki ∈ Z. Otherwise, if i = 2 then n2 = 3(3k2 +


2ki) + 22 = 3(3k2 + 2ki) + 3 + 1 = 3(3k2 + 2ki + 1) + 1 = 3s + 1, with s = 3k2 + 2ki + 1 ∈ Z. In any case,
n2 = 3t + 1 for some integer t and thus 3 does not divide n2 .

Problem 3.12. Prove that there are no integers m and n such that 8m + 26n = 1.

Solution of Problem 3.12. Assume, towards a contradiction, that there exist integers m and n such that 8m +
26n = 1. Then 1 = 2(4m + 13n) = 2r, with r = 4m + 13n ∈ Z, and 1 would be even. But 1 is odd, a
contradiction. Thus, there are no integers m and n such that 8m + 26n = 1.

Problem 3.13. Are there integers m and n such that m2 = 4n + 3?

Solution of Problem 3.13. Assume, towards a contradiction, that there exist integers m and n such that m2 =
4n + 3. Then m2 = 2(2n + 1) + 1, so m2 is odd, and therefore m is odd. Thus there is some k ∈ Z such that
m = 2k + 1, and we have
4n + 3 = (2k + 1)2 = 4k2 + 4k + 1,

so 4n + 2 = 4k2 + 4k, and thus 2n + 1 = 2k2 + 2k = 2(k2 + k). Hence 2n + 1 is both even and odd, a
contradiction. Therefore, there do not exist integers m and n such that m2 = 4n + 3.

Problem 3.14. Let x ∈ R. Show that if for all ε > 0, |x| < 2ε, then x = 0.

Solution of Problem 3.14. Let x ∈ R. Assume that for all ε > 0, |x| < 2ε and for the sake of a contradiction
|x|
assume that x ̸= 0. If we put ε0 = 4 then ε0 > 0. Therefore, |x| < 2ε0 = 2 |x|
4 . Since |x| =
̸ 0, it follows that
|x|
|x| < 2 and thus 1 < 12 , a contradiction.

3
Problem 3.15. Prove that 2 is irrational.

Hint. Use Problem 3.10.

14

3 √
3 p
Solution of Problem 3.15. Assume by contradiction that 2 is rational and write, as we may, 2 = q with
p ∈ Z, q ∈ Z, q > 0, where p and q have no common factors. Thus, 2 = ( qp )3 and 2q3 = p3 , which means
that p3 is even. By Problem 3.10 above p is even, and there exists k ∈ Z such that p = 2k. It follows that
p3 8k3
q3 = 2 = 2 = 2 · 2k3 and hence q3 is even. By Problem 3.10, q is even, a contradiction. Indeed, p and q
being even they have 2 as a common factor which contradicts our assumption.

Problem 3.16. Show that 3 is irrational.

Hint. Use Problem 3.11.



Solution of Problem 3.16. Assume, towards a contradiction, that 3 is rational. Then there exist nonnega-

tive integers m and n, with n ̸= 0, such that 3 = mn . Without loss of generality, we may assume that m and
n have no common factors. Then m2 = 3n2 , so 3 divides m2 , and by the result of Problem 3.11 it follows
that 3 divides m. Thus there is some k ∈ Z such that m = 3k. Hence we have

9k2 = m2 = 3n2 ,

so n2 = 3k2 . Thus 3 divides n2 , and applying the results of Problem 3.11 again, it follows that 3 divides
n. But then both m and n are divisible by 3, so they share a common factor, contradicting our assumption.

Therefore, 3 is irrational.

Problem 3.17. Show that log(3) is irrational.

Hint. You can use the the following property of the log function: x = log(3) ⇐⇒ 2x = 3 (no proof needed)
You can also use the binomial formula (no proof needed). Everything else that you might need needs to be
proven.

√ √
Problem 3.18. Prove that for all real numbers x and y with y ⩾ 0, if x2 ⩾ 4y, then x ⩾ 2 y or x ⩽ −2 y.


Solution of Problem 3.18. Let x ∈ R and y > 0 and assume that x2 ⩾ 4y. Either x ⩾ 2 y and the conclusion
√ √ √ √ √
follows, or x < 2 y but then 0 ⩽ x2 − 4y = (x − 2 y)(x + 2 y) and hence x + 2 y ⩽ 0, i.e. x ⩽ −2 y, and
the conclusion follows.

Problem 3.19. Prove that for all integers k, k(k + 3) is even.

Solution of Problem 3.19. Let k ∈ Z.

Case 1 k is even and there exists n ∈ Z such that k = 2n. So, k(k + 3) = 2n(2n + 3) which is even.

15
Case 2 k is odd and there exists n ∈ Z such that k = 2n + 1. So, k(k + 3) = (2n + 1)(2n + 4) = 2(2n + 1)(n + 2)
which is even.

Problem 3.20. Prove that for all integers k, (k + 1)(k + 6) is even.

Solution of Problem 3.20. Let k ∈ Z. Either k is even and there exists n ∈ Z such that k = 2n, and (k +
1)(k + 6) = (2n + 1)(2n + 6) = 2(2n + 1)(n + 3) which is even, or k is odd and there exists n ∈ Z such that
k = 2n + 1, and thus (k + 1)(k + 6) = (2n + 2)(2n + 7) = 2(n + 1)(2n + 7) is even.

For the following problems we recall the definition of the absolute value function

x if x ⩾ 0

|x| :=
−x if x < 0

Problem 3.21. Show that for all x ∈ R, |x| ⩾ 0 with |x| = 0 if and only if x = 0.

Proof of Problem 3.21. We prove the first part of the statement. Let x ∈ R. Then, either x ⩾ 0 or x < 0. If
x ⩾ 0 then by definition |x| = x ⩾ 0. Otherwise, if x < 0 then by definition |x| = −x > 0. For the equivalence
in the second part, if x = 0 then by definition |x| = 0. If |x| = 0 then by definition |x| = x and thus x = 0.

Problem 3.22. Prove that for all real numbers x and y, |x − y| = |y − x|.

Proof of Problem 3.22. Let x, y ∈ R. In the case x − y ⩾ 0 then y − x ⩽ 0 and |x − y| = x − y, but |y − x| =


−(y − x) = x − y and thus |x − y| = |y − x|. In the case x − y < 0 then y − x > 0 and |x − y| = −(x − y) = y − x,
but |y − x| = y − x and thus |x − y| = |y − x|. Therefore in all cases |x − y| = |y − x|.

Problem 3.23. Prove that for all real numbers x and y, |xy| = |x||y|.

Problem 3.24. Let x ∈ R and M ⩾ 0. Show that |x| ⩽ M ⇐⇒ −M ⩽ x ⩽ M.

Proof of Problem 3.24. Let x ∈ R and M ⩾ 0.


Proof of =⇒ : Assume that |x| ⩽ M, then if x ⩾ 0, then x = |x| and −M ⩽ 0 ⩽ x = |x| ⩽ M. Otherwise,
if x < 0 then |x| = −x and −M ⩽ 0 < −x = |x| < M.
Proof of ⇐=: Assume that −M ⩽ x ⩽ M. In the case x ⩾ 0 then |x| = x, but x ⩽ M and it follows that
|x| ⩽ M. In the case x < 0 then |x| = −x, but since −M ⩽ x then −x ⩽ M and hence |x| ⩽ M

Problem 3.25. Prove that for all real numbers x and y, |x + y| ⩽ |x| + |y|.

16
Hint. You could use Problem 3.24.

Proof of Problem 3.25. Let x, y ∈ R. Since −|x| ⩽ x ⩽ |x| and −|y| ⩽ y ⩽ |y| then by adding up theses two
inequalities −(|y| + |x|) ⩽ x + y ⩽ |x| + |y| and by Problem 3.24 |x + y| ⩽ |x| + |y|.

Problem 3.26. Prove that for all x, y, z ∈ R, |x − y| ⩽ |x − z| + |y − z|.

Hint. You could use Problem 3.25.

Proof of Problem 3.26. Let x, y, z ∈ R and set a = x − z and b = z − y. It follows from Problem 3.25 that
|x − y| = |a + b| ⩽ |a| + |b| = |x − z| + |y − z|.

Problem 3.27. Prove that for all real numbers x and y, |x| − |y| ⩽ |x − y|.

Hint. You could use Problem 3.25.

Proof of Problem 3.27. Let x, y ∈ R, then by Problem 3.25 |x| = |x − y + y| ⩽ |x − y| + |y|, and |y| = |y − x +
x| ⩽ |y − x| + |x|. Thus |x| − |y| ⩽ |x − y| and |y| − |x| ⩽ |x − y| and the conclusion follows.

Problem 3.28. Let x, y be real numbers. Show that

∀ε > 0, x < y + ε ⇐⇒ x ⩽ y.

Proof of Problem 3.28. Proof of ⇐=: Assume that x ⩽ y, then if ε > 0 it follows that x < y + ε. Proof of
=⇒ : Assume that x < y + ε for all ε > 0. Assume by contradiction that x > y and let ε0 = x − y > 0. By
our assumption, x < y + ε0 = y + (x − y) = x; a contradiction.

Problem 3.29. Let x, y be real numbers. Show that x > y − ε for all ε > 0 if and only if x ⩾ y.

Proof of Problem 3.29. Assume that x < y + ε for all ε > 0. Assume by contradiction that x > y and let
ε0 = x − y > 0. By our assumption, x < y + ε0 = y + (x − y) = x; a contradiction. For the other direction, if
x ⩾ y and ε > 0 then x > y − ε.

x+y
Problem 3.30. Prove that for all real numbers x and y, if x < y, then x < 2 < y.

Solution of Problem 3.30. Let x and y be real numbers such that x < y. Then 2x = x + x < x + y, and thus
x+y x+y
x< 2 . Similarly, x + y < y + y = 2y, and thus 2 < y. Combining our results, we obtain
x+y
x< <y
2
as desired.

17
Problem 3.31. Prove that for all positive real numbers x, the sum of x and its reciprocal is greater than 2.

Solution of Problem 3.31. Let x be a real number such that x > 0. Observe that 0 ⩽ (x − 1)2 = x2 − 2x + 1,
so 2x ⩽ x2 + 1 and thus since x > 0 one has

1 1 1
2= · 2x ⩽ · (x2 + 1) = x +
x x x

as desired.

√ x+y
Problem 3.32. 1. Prove that for all x, y ∈ R+ , xy ⩽ 2 .

√ x+y
2. Show that that for all x, y ∈ R+ , xy = 2 if and only if x = y

Solution of Problem 3.32. 1. Let x, y ∈ R+ be given. Observe that 0 ⩽ (x − y)2 = x2 − 2xy + y2 , and so
√ √
4xy ⩽ x2 + 2xy + y2 = (x + y)2 . Thus 2 xy ⩽ x + y, and therefore xy ⩽ x+y
2 .

2. Assuming x = y, we obtain
√ √ 2x x + y
xy = x2 = x = = .
2 2
√ x+y
Conversely, assume xy = 2 . Then 4xy = (x + y)2 = x2 + 2xy + y2 , and rearranging we obtain
0 = x2 − 2xy + y2 = (x − y)2 , so 0 = x − y and therefore x = y.

4 Applications of the Principle of Mathematical Induction

Problem 4.1. Prove that for all integers n ⩾ 1,


n
n(n + 1)(2n + 1)
∑ k2 = 6
.
k=1

Solution of Problem 4.1. First observe that for n = 1 we have

n(n + 1)(2n + 1) 1 · 2 · 3
= = 1,
6 6

but ∑1k=1 k2 = 12 = 1 and thus the equality holds if n = 1. Now let n ⩾ 1 and assume that assume ∑nk=1 k2 =

18
n(n+1)(2n+1)
6 . Then we have
n+1 n
∑ k2 = (n + 1)2 + ∑ k2
k=1 k=1
n(n + 1)(2n + 1)
= (n + 1)2 +
6
6(n + 1)(n + 1) n(n + 1)(2n + 1)
= +
6 6
(n + 1)[6(n + 1) + n(2n + 1)]
=
6
(n + 1)(2n2 + 7n + 6)
=
6
(n + 1)(n + 2)(2n + 3)
=
6
(n + 1)((n + 1) + 1)(2(n + 1) + 1)
= ,
6

so the equality holds for n + 1. Therefore, it follows by the Principle of Mathematical Induction that for all
n(n+1)(2n+1)
integers n ⩾ 1, ∑nk=1 k2 = 6 .

Problem 4.2. Prove that for all integers n ⩾ 0,


n
∑ 2k = 2n+1 − 1.
k=0

Solution of Problem 4.2. First observe that for n = 0, we have 20 = 1 = 20+1 − 1, so the equality holds in
this case. Let n ⩾ 0 and assume that the equality holds for n, i.e., ∑nk=0 2k = 2n+1 − 1. Then we have
n+1 n
∑ 2k = 2n+1 + ∑ 2k = 2n+1 + 2n+1 − 1 = 2 · 2n+1 − 1 = 2(n+1)+1 − 1
k=0 k=0

so the equality holds for n + 1. Therefore, it follows by the Principle of Mathematical Induction that for all
integers n ⩾ 0, ∑nk=0 2k = 2n+1 − 1.

Problem 4.3. Prove that for all integers n ⩾ 1,


n
∑ (2k − 1) = n2 .
k=1

Solution of Problem 4.3. First observe that for n = 1, we have 12 = 1 = 2 · 1 − 1, so the result is true in this
case. Now assume that the result holds for some positive integer m. Then we have
m+1 m
∑ (2k − 1) = 2(m + 1) − 1 + ∑ (2k − 1) = m2 + 2m + 1 = (m + 1)2 ,
k=1 k=1

so the result is true for m + 1. Therefore, it follows by induction that the result holds for all positive integers.

19
Problem 4.4. Prove that for all integers n ⩾ 1,
n
1 n
∑ k(k + 1) = n + 1 .
k=1

Solution of Problem 4.4. For n = 1, ∑1k=1 k(k+1)


1
= 1
1(1+1) = 1
2 = 1
1+1 , and the equality holds. Assume that
the result holds for some positive integer m. Then we have
m+1 m
1 1 1
∑ = +∑
k=1 k(k + 1) (m + 1)(m + 2) k=1 k(k + 1)
1 m
= +
(m + 1)(m + 2) m + 1
1 m2 + 2m
= +
(m + 1)(m + 2) (m + 1)(m + 2)
(m + 1)2
=
(m + 1)(m + 2)
(m + 1)
=
(m + 1) + 1

so the result is true for m + 1. Therefore, it follows by induction that the result holds for all positive integers.

Problem 4.5. Prove that for all integers n ⩾ 1,


n
4n3 − n
∑ (2k − 1)2 = 3
.
k+1

Solution of Problem 4.5. First observe that

4 · 13 − 1
= 1 = (2 · 1 − 1)2 ,
3

so the result is true for n = 1. Now assume that the result holds for some positive integer m. Then we have
m+1
4m3 − m
∑ (2k − 1)2 = (2m + 1)2 + 3
k=1
12m2 + 12m + 3 4m3 − m
= +
3 3
4m3 + 12m2 + 12m + 3 − m
=
3
4(m3 + 3m2 + 3m + 1) − (m + 1)
=
3
4(m + 1)3 − (m + 1)
= ,
3

so the result is true for m + 1. Therefore, it follows by induction that the result holds for all positive integers.

20
Problem 4.6. Conjecture a formula for ∑nk=1 (−1)k k2 , for all n ⩾ 1 and then prove the formula is correct
using induction.

Solution of Problem 4.6. After calculating a few iterates, you should see that for all n ⩾ 1 the formula you
are looking for is
n  
k 2 n n(n + 1)
∑ (−1) k = (−1)
2
.
k=1
Indeed, this holds for n = 1. Now assume the formula holds for some positive integer m. Then we have
m+1  
k 2 m+1 2 m m(m + 1)
∑ (−1) k = (−1) (m + 1) + (−1)
2
k=1
(−1)m+1
2m2 + 4m + 2 − m2 − m

=
2
(−1)m+1 2 
= m + 3m + 2
2  
m+1 (m + 1)((m + 1) + 1)
= (−1) ,
2

so the formula holds for m + 1. Therefore, by induction, the result holds for all positive integers.

Problem 4.7. Prove that for all integers n ⩾ 1, n < 10n .

Solution of Problem 4.7. The result is true for n = 1. Now assume the result holds for some positive integer
m. Then we have
m + 1 < 10m + 1 < 9 · 10m + 10m = 10 · 10m = 10m+1 ,

so the result is true for m + 1. Therefore, by induction it follows that the result is true for all positive
integers.

4 n

Problem 4.8. Prove that for all integers n ⩾ 7, 3 > n.
7
Solution of Problem 4.8. Direct calculation show that 43 > 7. Now assume that for some m ⩾ 7 we have
4 m
m m
> m. Then 3 < 7 ⩽ m < 43 , so 1 < 13 43 and thus

3
 m
1 4 m
   m+1
4 4
m+1 < + = ,
3 3 3 3

so the result holds for m + 1. Therefore, by induction it follows that the result holds for all positive integers
n ⩾ 7.

Problem 4.9. Prove that for all integers n ⩾ 1, n3 + 8n + 9 is divisible by 3.

21
Solution of Problem 4.9. First observe that 13 + 8 · 1 + 9 = 18 = 3 · 6, so the result is true for n = 1. Now
assume that the result holds for some positive integer m. Then there is some integer k such that m3 +8m+9 =
3k, and we have

(m + 1)3 + 8(m + 1) + 9 = (m3 + 3m2 + 3m + 1) + (8m + 8) + 9

= (m3 + 8m + 9) + 3m2 + 3m + 9

= 3(k + m2 + m + 3),

so the result is true for m + 1. Therefore, by induction it follows that the result holds for all positive integers.

Problem 4.10. Prove that for all integers n ⩾ 1, 32n − 1 is divisible by 8.

Solution of Problem 4.10. First observe that 32·1 − 1 = 8 · 1, so the result is true for n = 1. Now assume the
result is true for some positive integer m. Then there is some integer k such that 32m − 1 = 8k, and we have

32(m+1) − 1 = 32m+2 − 1

= 9 · 32m − 1

= 9 · (32m − 1) + 8

= 8 · (9k + 1),

so the result is true for m1 . Therefore, by induction it follows that the result is true for all positive integers.

Problem 4.11. Prove that for all integers n ⩾ 5, n2 < 2n .

Solution of Problem 4.11. Let P(n) be the statement n2 < 2n . Observe that 52 = 25 < 32 = 25 , so P(5) is
true. Now assume that P(m) is true for some m ⩾ 5. Since m ⩾ 5, we have 2m + 1 < 3m < m2 , so that

(m + 1)2 = m2 + 2m + 1 < 2m2 < 2 · 2m = 2m+1 .

and thus P(m + 1) is true. Therefore, by induction it follows that P(n) is true for all n ⩾ 5.

Problem 4.12. Prove that for all integers n ⩾ 4, 2n < n!.

Solution of Problem 4.12. Clearly 24 = 16 < 24 = 4!. Now assume that 2m < m! for some positive integer
m ⩾ 4. Then we have
2m+1 = 2 · 2m < 2m! < (m + 1) · m! = (m + 1)!

Therefore, it follows by induction that 2n < n! for all positive integers n.

22
Problem 4.13. Assuming that (1 + 1n )n < e, for all n ⩾ 1, prove that for all n ⩾ 1, n! > ( ne )n .

Problem 4.14. Show that for all n ⩾ 12 there exist xn ∈ Z and yn ∈ Z such that n = 3xn + 7yn

Problem 4.15. Prove that for all positive integers n, 4n − 1 is divisible by 3.

Solution of Problem 4.15. First note that 41 − 1 = 3, and thus 3 | 41 − 1. Now assume that 4m − 1 is divisible
by 3 for some positive integer m. Then 4m − 1 = 3k for some k ∈ Z, hence we have

4m+1 − 1 = 4(4m − 1) + 3 = 3(4k + 1).

Thus 4m+1 − 1 is divisible by 3, and it follows by induction that 4n − 1 is divisible by 3 for all positive
integers n.

Problem 4.16. Let a1 = 2, and let an+1 = 21 (an + 3) for all n ⩾ 1.

(a) Prove that for all positive integers n, an < an+1 .

(b) Prove that for all positive integers n, an < 3.

1
(c) Prove that for all positive integers n, an = 3 − 2n−1 .

Solution of Problem 4.16. (a) First note that a2 = 12 (a1 + 3) = 12 (2 + 3) = 25 > a1 . Now assume that am+1 >
am for some positive integer m. Then we have

1 1
am+2 = (am+1 + 3) > (am + 3) = am+1 .
2 2

By induction, it follows that an+1 > an for all positive integers n.

(b) Clearly a1 = 2 < 3. Now assume that am < 3 for some positive integer m. Then we have

1 1
am+1 = (am + 3) < (3 + 3) = 3.
2 2

By induction, it follows that an < 3 for all positive integers n.

1 1
(c) Clearly a1 = 2 = 3 − 21−1 . Now assume that am = 3 − 2m−1 for some positive integer m. Then we have
 
1 1 1 1
am+1 = (am + 3) = 6 − m−1 = 3 − m+1−1 .
2 2 2 2
1
By induction, it follows that an = 3 − 2n−1 for all positive integers n.

23
Problem 4.17. Let r ∈ R with r ̸= 1. Prove that
n−1
1 − rn
∑ rk = 1−r
.
k=0

1−r1
Solution of Problem 4.17. Fix r ∈ R with r ̸= 1. Note that ∑1−1 k
k=0 r = 1 = 1−r . Now assume that ∑m−1 k
k=0 r =
1−rm
1−r for some positive integer n. Then we have

m m−1
1−r 1 − rm 1 − rm+1
∑ rk = rm + ∑ rk = rm 1 − r + 1−r
=
1−r
.
k=0 k=0

1−rn
Thus, by induction it follows that ∑n−1 k
k=0 r = 1−r is true for all positive integers n.

Problem 4.18. Prove Bernoulli’s Inequality: Let x > −1. Then for all n ∈ N, (1 + x)n ⩾ 1 + nx.

Solution of Problem 4.18. For n = 1 equality (hence the inequality) holds. Now suppose that (1 + x)m ⩾
1 + mx for some m ∈ N. Then we have

(1 + x)m+1 ⩾ (1 + x)(1 + mx) = 1 + mx + x + mx2 ⩾ 1 + (m + 1)x.

(Note that we used the assumption that x > 1 in the first inequality.) Thus by induction, the inequality holds
for all n ∈ N.

Problem 4.19. Let x, y ∈ R. Prove the binomial theorem: for all integers n ⩾ 1,
n  
n n n−k k
(x + y) = ∑ x y.
k=0 k

Solution of Problem 4.19. First note that


   
1 1 0 1 0 1
(x + y)1 = x + y = x y + x y .
0 1

Now assume that for some m ∈ N we have


  m
m m m−k k
(x + y) = ∑ x y.
k=0 k

24
Then we have

(x + y)m+1 = (x + y)(x + y)m


m  
m m+1−k k m m m−k k+1
 
=∑ x y +∑ x y
k=0 k k=0 k
m m+1 0 m m m+1−k k m−1 m m−k k+1
       
m 0 m+1
= x y +∑ x y +∑ x y + x y
0 k=1 k k=0 k m
m m+1 0 m
       
m m m 0 m+1
= x y +∑ + xm+1−k yk + x y
0 k=1 k k − 1 m
m + 1 m+1 0 m m + 1 m+1−k k
     
m + 1 0 m+1
= x y +∑ x y + x y
0 k=1 k m+1
m+1  
m + 1 m+1−k k
= ∑ x y
k=0 k

as desired.

Problem 4.20. Let n be an integer. Show that if n is even then nk is even for all k ∈ N.

5 Applications of the Principle of Strong Mathematical Induction

Problem 5.1. For i ∈ N, let pi denote the ith prime number, so that

p1 = 2, p2 = 3, p3 = 5, . . . .

n−1
Prove that for all n ∈ N, pn ⩽ 22 .

Hint. For the induction step, given m ∈ N, show that pm+1 ⩽ p1 p2 · · · pm + 1.

1−1 k−1
Solution of Problem 5.1. First observe that p1 = 2 = 22 . Now fix m ∈ N, and assume that pk ⩽ 22 for
1 ⩽ k ⩽ m. Note that pm+1 ⩽ p1 p2 · · · pm + 1, since pk does not divide p1 p2 · · · pm + 1 for 1 ⩽ k ⩽ m. Thus,
we have
m−1 k m −1 m −1 m
pm+1 ⩽ p1 p2 · · · pm + 1 ⩽ 2∑k=0 2 + 1 = 22 + 1 < 2 · 22 = 22 .

Problem 5.2. Show that the principle of strong mathematical induction implies the principle of mathemati-
cal induction.

Solution of Problem 5.2. Assume the principle of strong mathematical induction, and let P(n) be a statement
about the positive integer n. Assume that P(1) is true, and that for all m ∈ N, if P(m) is true then P(m + 1) is

25
true. Let m ∈ N be given, and assume that P(k) is true for 1 ⩽ k ⩽ m. Then P(m) is true, so P(m + 1) is true.
Thus, by the principle of strong mathematical induction, P(n) is true for all n ∈ N. Therefore, the principle
of mathematical induction is true.

Problem 5.3. Show that the principle of mathematical induction implies the principle of strong mathemati-
cal induction.

Solution of Problem 5.3. Assume the principle of mathematical induction, and let P(n) be a statement about
the positive integer n. Assume that P(1) is true, and that for all m ∈ N, if P(k) is true for 1 ⩽ k ⩽ m, then
P(m + 1) is true. For n ∈ N, let Q(n) be the statement ”P(k) is true for all k ⩽ n”. Clearly Q(1) is true.
If m ∈ N and Q(m) is true, then P(k) is true for all 1 ⩽ k ⩽ m. By assumption P(m + 1) is true, and thus
Q(m + 1) is true. By the principle of mathematical induction, Q(n) is true for all n ∈ N. But if Q(n) is
true, then P(n) is true, and thus P(n) is true for all n ∈ N. Therefore, the principle of strong mathematical
induction is true.

6 Sequences defined by a recurrence relation

Problem 6.1. Let a1 = 2, a2 = 4, and an+1 = 7an − 10an−1 for all n ⩾ 2. Conjecture a closed formula for
an and prove your result.

Solution of Problem 6.1. We will show that an = 2n for each n ∈ N. Indeed, a1 = 2 = 21 and a2 = 4 = 22 .
Now assume that for some m ⩾ 2 we have ak = 2k for 1 ⩽ k ⩽ m. Then we have

am+1 = 7am − 10am−1 = 7 · 2m − 10 · 2m−1 = 14 · 2m−1 − 10 · 2m−1 = 4 · 2m−1 = 2m+1 .

Therefore, by the principle of strong mathematical induction it follows that an = 2n for all n ∈ N.

Problem 6.2. Let a1 = 3, a2 = 4, and an+1 = 31 (2an + an−1 ) for all n ⩾ 2. Prove that for all positive integers
n, 3 ⩽ an ⩽ 4.

Solution of Problem 6.2. Clearly 3 ⩽ a1 ⩽ 4 and 3 ⩽ a2 ⩽ 4. Now fix m ⩾ 2, and assume that 3 ⩽ ak ⩽ 4
for all 1 ⩽ k ⩽ m. Then we have
1 1
am+1 = (2am + am−1 ) ⩾ (2 · 3 + 3) = 3
3 3
and
1 1
am+1 = (2am + am−1 ) ⩽ (2 · 4 + 4) = 4.
3 3
Therefore, by the principle of strong mathematical induction it follows that 3 ⩽ an ⩽ 4 for all n ∈ N.

26
Problem 6.3. Consider the sequence (an )∞
n=1 recursively defined as a1 = 1, a2 = 8 and for all n ⩾ 3,

an = an−1 + 2an−2 . Show that for all n ⩾ 1, an = 3 · 2n−1 + 2(−1)n .

Solution of Problem 6.3. Note that 3 · 21−1 + 2(−1)1 = 1 = a1 , 3 · 22−1 + 2(−1)2 = 8 = a2 . Now assume
that for some integer m ⩾ 2, we have ak = 3 · 2k−1 + 2(−1)k whenever 1 ⩽ k ⩽ m. Then we have

am+1 = am + 2am−1

= (3 · 2m−1 + 2(−1)m ) + 2(3 · 2m−2 + 2(−1)m−1 )

= 3 · 2 · 2m−1 + 2((−1)m + (−1)m−1 ) + 2(−1)m−1

= 3 · 2m + 2(−1)m+1 .

Therefore, by the principle of strong mathematical induction it follows that an = 3 · 2n−1 + 2(−1)n for all
integers n ⩾ 1.

Problem 6.4. Consider the sequence (an )∞


n=1 recursively defined as a1 = 2, a2 = 4 and for all n ⩾ 3,

an = 3an−1 − 2an−2 . For all n ⩾ 1, find a closed formula for an .

Solution of Problem 6.4. After performing a few calculations, it should be clear that an = 2n . We prove by
induction that this is the correct formula.
Clearly 21 = 2 = a1 and 22 = 4 = a2 . Now suppose that for some m ∈ N with m ⩾ 2, we have ak = 2k
whenever 1 ⩽ k ⩽ m. Then we have

am+1 = 3am − 2am−2 = 3 · 2m − 2 · 2m−1 = 3 · 2m − 2m = 2m+1 .

Thus, by the principle of strong mathematical induction it follows that an = 2n for all n ∈ N.

7 Set Theory

7.1 Subsets

Problem 7.1. Prove that X ⊆ Y where X = {n ∈ Z | n is a multiple of 6} and Y = {n ∈ Z | n is even}.

Solution of Problem 7.1. Let n ∈ X be given. Then n is a multiple of 6, so there is some k ∈ Z such that
n = 6k. Thus n = 2(3k), so n is even and therefore x ∈ Y .

Problem 7.2. Consider the sets

A = {n ∈ Z | (∃k ∈ Z)(n = 12k + 11)},

B = {n ∈ Z | (∃ j ∈ Z)(n = 4 j + 3)}.

27
(a) Is A ⊆ B? Prove or disprove.

(b) Is B ⊆ A? Prove or disprove.

Solution of Problem 7.2. (a) We will show that A ⊆ B. Suppose n ∈ A. Then there is some k ∈ Z such that
n = 12k + 11. Put j = 3k + 2. Then j ∈ Z and

n = 12k + 11 = 4(3k) + 4(2) + 3 = 4 j + 3,

and therefore n ∈ B.

(b) We will show that B ̸⊆ A, that is, there is some n ∈ B such that n ∈
/ A. Indeed, put n = 7. Then
n = 4(1) + 3 so n ∈ B. Now assume (towards a contradiction) that n ∈ A. Then there is some k ∈ Z such
that 7 = 12k + 11. But then −4 = 12k, which is impossible. Thus n ∈
/ A and therefore B ̸⊆ A.

Problem 7.3. Consider the sets

A = {n ∈ Z | (∃k ∈ Z)(n = 4k + 1)},

B = {n ∈ Z | (∃ j ∈ Z)(n = 4 j − 7}.

Prove that A = B.

Solution of Problem 7.3. Suppose n ∈ A. Then there is some k ∈ Z such that n = 4k + 1. Hence we have

n = 4k + 1 = 4(k + 2) − 7 ∈ B,

and therefore A ⊆ B.
Conversely, assume n ∈ B. Then there is some j ∈ Z such that n = 4 j − 7. Hence we have

n = 4 j − 7 = 4( j − 2) + 1 ∈ A

and therefore B ⊆ A.

Problem 7.4. Consider the sets

A = {n ∈ Z | (∃k ∈ Z)(n = 3k)},

B = {n ∈ Z | (∃i, j ∈ Z)(n = 15i + 12 j)}.

Prove that A = B.

28
Solution of Problem 7.4. Suppose n ∈ A. Then there is some k ∈ Z such that n = 3k. Note that k = 5k − 4k,
so we have
n = 3k = 3(5k − 4k) = 15(k) + 12(−k) ∈ B

and therefore A ⊆ B.
Conversely, suppose n ∈ B. Then there exist i, j ∈ Z such that n = 15i + 12 j. Then n = 3(5i + 4 j) ∈ A,
and therefore B ⊆ A.

Problem 7.5. Prove that X = {n ∈ Z | n + 5 is odd} is the set of all even integers.

Solution of Problem 7.5. Let n ∈ X be given. Then n + 5 is odd, so there is some k ∈ Z such that n + 5 =
2k + 1. Thus n = 2k − 4 = 2(k − 2), so n is even.
Now suppose n ∈ Z is even. Then there is some k ∈ Z such that n = 2k. Thus n + 5 = 2k + 5 =
2(k + 2) + 1, so n + 5 is odd and therefore n ∈ X.

7.2 Complements

Problem 7.6. Let A and B be subsets of an ambient set U. Prove that (A − B) ∪ (B − A) = (A ∪ B) − (A ∩ B).

Solution of Problem 7.6. Using the identities found in section Section 4.2, this can be done with a few
manipulations:

(A − B) ∪ (B − A) = (A ∩ B) ∪ (B ∩ A)

= (A ∪ (B ∩ A)) ∩ (B ∪ (B ∩ A))

= [(A ∪ B) ∩ (A ∪ A)] ∩ [(B ∪ B) ∩ (B ∪ A)]

= (A ∪ B) ∩ (B ∪ A)

= (A ∪ B) ∩ (A ∩ B)

= (A ∪ B) − (A ∩ B).

You could also give a a double-inclusion proof.


First, we show that (A − B) ∪ (B − A) ⊆ (A ∪ B) − (A ∩ B). Note that A ⊆ A ∪ B and A ∩ B ⊆ B, so
(A − B) ⊆ (A ∪ B) − (A ∩ B). Similarly, since B ⊆ A ∪ B and A ∩ B ⊆ A, we have (B − A) ⊆ (A ∪ B) − (A ∩ B),
and therefore (A − B) ∪ (B − A) ⊆ (A ∪ B) − (A ∩ B).
Conversely, assume that x ∈ (A ∪ B) − (A ∩ B). Then in particular, x ∈
/ A ∩ B and x ∈ (A ∩ B). If x ∈ A,
then x ∈
/ B, for otherwise x ∈ A∩B and we obtain a contradiction. Thus x ∈ A−B ⊆ (A−B)∪(B−A). If now
x ∈ B, then x ∈
/ A, for otherwise x ∈ A ∩ B and we obtain a contradiction. Thus x ∈ B − A ⊆ (A − B) ∪ (B − A).
Therefore, we have (A ∪ B) − (A ∩ B) ⊆ (A ∪ B) − (A ∩ B) and equality holds.

29
7.3 Arbitrary unions and intersections
S∞
Problem 7.7. For i ∈ N, let Ai = (−i, i). Compute i=1 Ai .

S∞
Solution of Problem 7.7. We will show that i=1 Ai =R
S∞
• i=1 Ai ⊆R
S∞ S∞
If x ∈ i=1 Ai , then x ∈ Ai0 for some i0 . Since Ai0 ⊆ R, then x ∈ R. Since x ∈ i=1 Ai was arbitrary, it
S∞
follows that i=1 Ai ⊆ R.
S∞
• R⊆ i=1 Ai

If x ∈ R, then there is some i ∈ N such that −i < x < i. Indeed if x = 0 any i ⩾ 1 would work, otherwise
if x ̸= 0 then |x| > 0 and by the Archimedean principle there is an integer i ⩾ 1 such that |x| < i and
S∞ S∞
then −i < x < i. Thus x ∈ (−i, i) = Ai and x ∈ i=1 Ai . Therefore R ⊆ i=1 Ai

S∞
By combining the two inclusions one has that R = i=1 Ai .

T∞
Problem 7.8. For i ∈ N, let Ai = (−i, i). Compute i=1 Ai .

T∞
Solution of Problem 7.8. We will show that i=1 Ai = (−1, 1).

T∞
• i=1 Ai ⊆ (−1, 1).
T∞ T∞
If x ∈
/ (−1, 1), then x ∈
/ A1 , and thus x ∈
/ i=1 Ai . Therefore i=1 Ai ⊆ (−1, 1).
T∞
• (−1, 1) ⊆ i=1 Ai .
T∞
If x ∈ (−1, 1), then x ∈ (−i, i) for all i ∈ N and thus (−1, 1) ⊆ i=1 Ai .

Problem 7.9. For i ∈ N, let Ai = 0, 1 − 1i . Compute i∈N Ai .


  S

S
Solution of Problem 7.9. We will show that i∈N Ai = [0, 1).

⊆ [0, 1)
S
• i∈N Ai

If x ∈ then x ∈ A j for some j ∈ N. Thus 0 ⩽ x ⩽ 1 − 1j < 1, and hence x ∈ [0, 1). Therefore,
S
i∈N Ai ,

⊆ [0, 1).
S
i∈N Ai

30
• [0, 1) ⊆
S
i∈N Ai .

1
If now x ∈ [0, 1), then 0 ⩽ x < 1. Thus 0 < 1 − x and 1−x > 0, and by the Archimedean principle there
1 1
is some j ∈ N such that 1−x ⩽ j, and hence j ⩽ 1 − x. Thus 0 ⩽ x ⩽ 1 − 1j , and x ∈ [0, 1 − 1j ] = A j .
Therefore x ∈ and [0, 1) ⊆
S S
i∈N Ai , i∈N Ai .

S
By definition of equality between sets we have proven that i∈N Ai = [0, 1).

Problem 7.10. For i ∈ N, let Ai = 0, 1 − 1i . Compute i∈N Ai .


  T

= {0}.
T
Solution of Problem 7.10. We will show that i∈N Ai

⊆ {0}.
T
• i∈N Ai

Suppose x ∈ Then in particular x ∈ A1 = [0, 1 − 1] = {0}, and therefore ⊆ {0}.


T T
i∈N Ai . i∈N Ai

• {0} ⊆
T
i∈N Ai
h 
Conversely, 0 ∈ 0, 1 − 1j = A j for all j ∈ N, and therefore {0} ⊆ i∈N Ai .
T

Problem 7.11. Let Xn = ( 2n , 2n] for every integer n ⩾ 2.


S∞
1. Compute n=2 Xn .

T∞
2. Compute n=2 Xn .

S∞
Solution of Problem 7.11. 1. We will show that n=2 Xn = (0, ∞).

= ( 2k , 2k]
S∞ S∞
First, we show that n=1 Xn ⊆ (0, ∞). Let x ∈ n=2 Xn , then there exists k ⩾ 2 such that x ∈ Xk
2 2
and hence k < x ⩽ 2k. Since it follows from k ⩾ 2 that k ⩾ 1 > 0 and 2k < ∞ one has 0 < x < ∞ and
S∞
thus x ∈ (0, ∞). Therefore n=2 Xn ⊆ (0, ∞)

Assume now that x ∈ (0, ∞), then x > 0 and also 2x > 0. On one hand, if follows from the Archimedean
2
principle that there is some n1 ⩾ 2 such that n1 > 2x , so 2n1 ⩾ x. On the other hand, x > 0 and it
2 2
follows from the Archimedean principle that there exists n2 ⩾ 2 such that x < n2 and hence x > n2 .
2 2 S∞
Let k = max{n1 , n2 } ⩾ 2 then k ⩽ n2 < x ⩽ 2n1 ⩽ k and hence x ∈ Xk . Therefore, (0, ∞) ⊆ n=2 Xn .

T∞
2. We will show that n=2 Xn = (1, 4].

then x ∈ Xn = ( 2n , 2n] for all integers n ⩾ 2. In particular, x ∈ X2 = ( 22 , 2 · 2] = (1, 4].


T∞
Let x ∈ n=2 Xn
T∞
Therefore, n=2 Xn ⊆ (1, 4].

31
2
Now, let x ∈ (1, 4] then 1 < x ⩽ 4 and for all n ⩾ 2, it follows that n ⩽ 1 < x ⩽ 4 ⩽ 2n. Therefore
x ∈ ( n2 , 2n] = Xn for all n ⩾ 2, and (1, 4] ⊆
T∞
n=2 Xn .

Problem 7.12. Let I be a nonempty set and let {Ai : i ∈ I} be an indexed family of sets. Let X be a non-empty
set. Suppose that for all i ∈ I, X ⊆ Ai . Prove that X ⊆
T
i∈I Ai .

Solution of Problem 7.12. Suppose x ∈ X, and let i ∈ I be given. Since X ⊆ Ai , x ∈ Ai . Since i ∈ I was
arbitrary, x ∈ Ai for all i, thus x ∈ and therefore X ⊆
T T
i∈I Ai , i∈I Ai .

Problem 7.13. Let {Ai : i ∈ N} be an indexed family of sets. Assume that for all i ∈ N, Ai+1 ⊆ Ai . Prove
S
that i∈N Ai = A1 .

Solution of Problem 7.13. If x ∈ A1 , then there is some i ∈ N such that x ∈ Ai (namely, i = 1), and thus
x∈
S
i∈N Ai .

Next, we show that Ai ⊆ A1 for all i ∈ N. Clearly A1 ⊆ A1 . If now Am ⊆ A1 , then Am+1 ⊆ Am ⊆ A1 , so


Am+1 ⊆ A1 . Thus it follows by induction that An ⊆ A1 for all n ∈ N.
Now assume x ∈ Then there is some n ∈ N such that x ∈ An . Since An ⊆ A1 , it follows that
S
i∈N Ai .

x ∈ A1 .

Problem 7.14. Let (Xi )i∈I be a collection of subsets of an ambient set U. Show that
\ [
Xi = X i.
i∈I i∈I


T S
Solution of Problem 7.14. We first prove the inclusion i∈I Xi i∈I X i .

= 0/ then the inclusion holds, otherwise let z ∈ Then z ∈


T T T
If i∈I Xi i∈I Xi . / i∈I Xi (by definition of the
complement), and it follows that z ∈
/ Xi0 for some i0 ∈ I (by definition of the intersection). Thus, z ∈ Xi0 (by
definition of the complement), which means that z ∈
S
i∈I X i (by definition of the union).

= 0/ then the inclusion holds, otherwise let z ∈ Then z ∈ Xi0


S S
For the reverse inclusion, if i∈I X i i∈I X i .

for some i0 ∈ I (by definition of the union), and thus z ∈


/ Xi0 (by definition of the complement). It follows
that z ∈ (by definition of the intersection), and hence z ∈
T T
/ i∈I Xi i∈I Xi (by definition of the complement).
S T
Therefore, it follows from the definition of equality between sets that i∈I Xi = i∈I X i .

Problem 7.15. Let (Xi )i∈I be a collection of subsets of an ambient set U. Show that
[ \
Xi = X i.
i∈I i∈I

32

S T
Solution of Problem 7.15. We first prove the inclusion i∈I Xi i∈I X i .

= 0/ then the inclusion holds, otherwise let z ∈ Then z ∈


S S S
If i∈I Xi i∈I Xi . / i∈I Xi (by definition of the
complement), and it follows that z ∈
/ Xi for all i ∈ I (by definition of the union). Thus, z ∈ Xi for all i ∈ I (by
definition of the complement), which means that z ∈
T
i∈I X i (by definition of the intersection).

= 0/ then the inclusion holds, otherwise let z ∈ Then z ∈ Xi


T T
For the reverse inclusion, if i∈I X i i∈I X i .

for all i ∈ I (by definition of the intersection), and thus z ∈


/ Xi for all i ∈ I (by definition of the complement). It
follows that z ∈ (by definition of the union), and hence z ∈
S S
/ i∈I Xi i∈I Xi (by definition of the complement).
S T
Therefore, it follows from the definition of equality between sets that i∈I Xi = i∈I X i .

7.4 More problems



Problem 7.16. Let A = {x + y 2 | x, y ∈ Q} ⊆ R.

(a) Prove that for all x, y ∈ Q, x + y 2 = 0 if and only if x = y = 0.

z1
(b) Prove that for all z1 , z2 ∈ A, z1 + z2 , z1 z2 ∈ A and , for z2 ̸= 0, z2 ∈ A.
√ √
Solution of Problem 7.16. (a) Clearly if x = y = 0 then x+y 2 = 0. Conversely, assume x+y 2 = 0. Then
√ √ √
x = −y 2. If y ̸= 0 then 2 = − xy ∈ Q, a contradiction. Thus y = 0, and therefore 0 = x + y 2 = x.

(b) Suppose z1 , z2 ∈ A. Then there exist x1 , x2 , y1 , y2 ∈ Q such that zi = xi + yi 2 for i = 1, 2. Then we have

z1 + z2 = (x1 + x2 ) + (y1 + y2 ) 2 ∈ A,

and

z1 z2 = (x1 x2 + 2y1 y2 ) + (x1 y2 + x2 y1 ) 2 ∈ A.

Now assume z2 ̸= 0. Then we have



z1 x1 + y1 2
= √
z2 x2 + y2 2
√ √
x1 + y1 2 x2 − y2 2
= √ · √
x2 + y2 2 x2 − y2 2
x1 x2 − 4y1 y2 x2 y1 − x1 y2 √
= + 2 2.
x22 + 4y22 x2 + 4y22
x1 x2 −4y1 y2 x2 y1 −x1 y2 z1
Since x22 +4y22
, x2 +4y2 ∈ Q, it follows that z2 ∈ A.
2 2

33
n=1 is increasing, or an ascending chain, if X1 ⊆ X2 ⊆
Problem 7.17. We say that the sequence of sets (Xn )∞
X3 ⊆ · · · ⊆ Xn ⊆ Xn+1 ⊆ . . . . Formally, (Xn )∞
n=1 is increasing if

(∀n ∈ N)[Xn ⊆ Xn+1 ].

Show that the sequence of sets (Xn )∞


n=1 is increasing if and only if

(∀n ∈ N)(∀k ∈ N)[(n ⩽ k) =⇒ (Xn ⊆ Xk )].

Hint. Your goal is to show that

(∀r ∈ N)[Xr ⊆ Xr+1 ] ⇐⇒ (∀k ∈ N)(∀n ∈ N)[(1 ⩽ n ⩽ k) =⇒ (Xn ⊆ Xk )]

For the implication ⇐= simply put n = r and k = r + 1. For the implication =⇒ you need to assume
that (∀r ∈ N)[Xr ⊆ Xr+1 ] and show by induction on k that ∀k ∈ N P(k) is true, where P(k) is the predicate
(∀n ∈ N)[(1 ⩽ n ⩽ k) =⇒ (Xn ⊆ Xk )]. For the base case observe that P(1) is simply X1 ⊆ X1 . For the
inductive step P(k + 1) is the predicate (∀n ∈ N)[(1 ⩽ n ⩽ k + 1) =⇒ (Xn ⊆ Xk+1 )] and you need to
distinguish two cases: either 1 ⩽ n ⩽ k and you can use the induction hypothesis together with the other
assumption, or n = k + 1

n=1 is decreasing, or a descending chain, if X1 ⊇ X2 ⊇


Problem 7.18. We say that the sequence of sets (Xn )∞
X3 ⊇ · · · ⊇ Xn ⊇ Xn+1 ⊇ . . . . Formally, (Xn )∞
n=1 is increasing if

(∀n ∈ N)[Xn ⊆ Xn+1 ].

n=1 is decreasing if and only if for all n, k ∈ N if n ⩽ k then Xn ⊇ Xk .


Show that the sequence of sets (Xn )∞

Hint. Your goal is to show that

(∀r ∈ N)[Xr ⊇ Xr+1 ] ⇐⇒ (∀k ∈ N)(∀n ∈ N)[(1 ⩽ n ⩽ k) =⇒ (Xn ⊇ Xk )]

For the implication ⇐= simply put n = r and k = r + 1. For the implication =⇒ you need to assume
that (∀r ∈ N)[Xr ⊇ Xr+1 ] and show by induction on k that ∀k ∈ N P(k) is true, where P(k) is the predicate
(∀n ∈ N)[(1 ⩽ n ⩽ k) =⇒ (Xn ⊇ Xk )]. For the base case observe that P(1) is simply X1 ⊇ X1 . For the
inductive step P(k + 1) is the predicate (∀n ∈ N)[(1 ⩽ n ⩽ k + 1) =⇒ (Xn ⊇ Xk+1 )] and you need to
distinguish two cases: either 1 ⩽ n ⩽ k and you can use the induction hypothesis together with the other
assumption, or n = k + 1

34
Problem 7.19. Let X and Y be subsets of a universal set U. Show that X ∩Y = X ∪Y .

Solution of Problem 7.19. We first prove the inclusion X ∩Y ⊆ X ∪Y . If X ∩Y = 0/ then the inclusion holds,
otherwise let z ∈ X ∩Y . Then z ∈
/ X ∩Y (by definition of the complement), and it follows that z ∈
/ X or z ∈
/Y
(by definition of the intersection). Thus, z ∈ X or z ∈ Y (by definition of the complement), which means that
z ∈ X ∪Y (by definition of the union). We just proved that X ∩Y ⊆ X ∪Y .

For the reverse inclusion, if X ∪Y = 0/ then the inclusion holds, otherwise let z ∈ X ∪Y . Then z ∈ X or
z ∈ Y (by definition of the union), and thus z ∈
/ X or z ∈
/ Y (by definition of the complement). It follows that
z∈
/ X ∩ Y (by definition of the intersection), and hence z ∈ X ∩Y (by definition of the complement). This
shows the reverse inclusion.

8 Functions

8.1 Composition

Problem 8.1. Let f , g : R → R be defined for all x ∈ R as f (x) = x2 − 3x and g(x) = 5x − 2.

1. Is it possible to define f ◦ g? If it is, what is f ◦ g.

2. Is it possible to define g ◦ f ? If it is, what is g ◦ f .

3. Are f ◦ g and g ◦ f equal? (Justify your answer)

Solution of Problem 8.1. 1. It is possible to define f ◦ g : R → R and for all x ∈ R

f ◦ g(x) = f (g(x)) = (g(x))2 − 3(g(x)) = (5x − 2)2 − 3(5x − 2) = 25x2 − 35x + 10.

2. It is possible to define g ◦ f : R → R and for all x ∈ R

(g ◦ f )(x) = g( f (x)) = 5( f (x)) − 2 = 5(x2 − 3x) − 2 = 5x2 − 15x − 2.

3. Let x = 0 then (g ◦ f )(0) = −2 ̸= 10 = ( f ◦ g)(0) and thus f ◦ g ̸= g ◦ f .

Problem 8.2. Let f , g : Z → Z be defined for all n ∈ Z as f (n) = 2n + 3 and



 2n − 1 if n is even,
g(n) =
 n + 1 if n is odd.

35
1. Is it possible to define f ◦ g? If it is, what is f ◦ g.

2. Is it possible to define g ◦ f ? If it is, what is g ◦ f .

3. Are f ◦ g and g ◦ f equal? (Justify your answer)

Solution of Problem 8.2. 1. It is possible to define f ◦ g : Z → Z and for all n ∈ Z, since we have f (2n −
1) = 4n + 1 and f (n + 1) = 2n + 5, it follows that

 4n + 1 if n is even,
( f ◦ g)(n) =
 2n + 5 if n is odd.

2. Since f (n) is odd for any n ∈ Z, we have

(g ◦ f )(n) = f (n) + 1 = (2n + 3) + 1 = 2n + 4.

3. Let n = 0 then n is even and (g ◦ f )(0) = 4 ̸= 1 = ( f ◦ g)(0). Therefore, g ◦ f ̸= f ◦ g.

8.2 Injectivity, surjectivity, bijectivity

Problem 8.3. For f : R → R defined by f (x) = x + |x|, determine if:

1. f is injective,

2. f is surjective,

3. f is bijective.

Solution of Problem 8.3. First, note that



 2x : x ⩾ 0,
f (x) =
 0 : x < 0.

1. f is not injective, since f (−1) = 0 = f (0).

2. f is not surjective, since y ∈ R is not in the range of f whenever y < 0. Indeed, for any x ∈ R we have
x + |x| ⩾ x + (−x) = 0, so f (x) ⩾ 0.

3. f is not bijective because it is not injective (nor surjective).

36
8.3 Composition and injectivity/surjectivity

Problem 8.4. Let W, X,Y be nonempty sets. Let f : W → X, g : X → Y be functions. Show that if g ◦ f is
surjective, then g is surjective.

Solution of Problem 8.4. Fix y ∈ Y . Since g ◦ f is surjective, there is some w ∈ W such that (g ◦ f )(w) = y.
Put x = f (w). Then x ∈ X and g(x) = g( f (w)) = (g ◦ f )(w) = y. Therefore, g is surjective.

Problem 8.5. Let W, X,Y be nonempty sets. Let f : W → X, g : X → Y be functions. Show that if g ◦ f is
injective, then f is injective.

Solution of Problem 8.5. Assume that g ◦ f is injective. Let w1 , w2 ∈ W such that f (w1 ) = f (w2 ). Since g
is a function one has g( f (w1 )) = g( f (w2 )) and (g ◦ f )(w1 ) = (g ◦ f )(w2 ) (by definition of the composition).
Since g ◦ f is injective it implies that w1 = w2 , and f is injective.

Problem 8.6. Let X and Y be nonempty sets and let f : X → Y be a function. Prove that f is injective if and
only if for all sets Z, for all functions h : Z → X and k : Z → X, if f ◦ h = f ◦ k, then h = k.

Solution of Problem 8.6. First suppose f is injective. Let Z be a set, and let h, k : Z → X be functions such
that f ◦ h = f ◦ k. Given z ∈ Z, since f (h(z)) = f (k(z)), it follows that h(z) = k(z). Thus h = k.
Conversely assume f is not injective. Then there exist x1 , x2 ∈ X such that x1 ̸= x2 while f (x1 ) = f (x2 ).
Define h, k : X → X by h(x) = x1 and k(x) = x2 for all x ∈ X. Then for all x ∈ X, f (h(x)) = f (x1 ) = f (x2 ) =
f (k(x)), so f ◦ h = f ◦ k, but h ̸= k.

Problem 8.7. Let X and Y be nonempty sets and let f : X → Y be a function. Prove that f is surjective if
and only if for all sets Z, for all functions h : Y → Z and k : Y → Z, if h ◦ f = k ◦ f , then h = k.

Solution of Problem 8.7. First assume f is surjective. Let Z be a set, and let h, k : Y → Z be functions such
that h ◦ f = k ◦ f . Given y ∈ Y , there is some x ∈ X such that y = f (x), and thus h(y) = h( f (x)) = k( f (x)) =
k(y). Therefore, h = k.
Conversely, assume f is not surjective. Then there is some y0 ∈ Y such that the set {x ∈ X : f (x) = y0 }
is empty. Put h = iY , and let k : Y → Y be defined by k(y) = y if y ̸= y0 and k(y0 ) = y1 for some y1 ∈ Y with
y0 ̸= y1 . Then h ̸= k since h(y0 ) = y0 ̸= y1 = k(y0 ), but h ◦ f = k ◦ f .

9 Injectivity, surjectivity, and one-sided invertibility

Problem 9.1. Let X and Y be nonempty sets and f : X → Y be a function. We say that f is left-invertible
(or admits a left-inverse) if there exists a function g : Y → X such that g ◦ f = iX . Prove that f is injective if

37
and only if f is left-invertible.

Solution of Problem 9.1. Suppose first that f is left-invertible. Then there is some function g : Y → X such
that g ◦ f = iX . Let x1 , x2 ∈ X such that f (x1 ) = f (x2 ), then g( f (x1 )) = g( f (x2 )) (since g is a function),
and thus (g ◦ f )(x1 ) = (g ◦ f )(x2 ) (by definition of the composition). It follows from the assumption that
iX (x1 ) = iX (x2 ) and hence x1 = x2 (by definition of the identity function on X). Therefore f is injective.
Conversely, assume f is injective. Define a function g : Y → X as follows: if y = f (x) for some (and
hence only one by injectivity) x ∈ X, put g(y) = x, and otherwise define g(y) arbitrarily. Then for each x ∈ X,
let y = f (x). Then g(y) = x, that is, g( f (x)) = x and hence (g ◦ f )(x) = x (by definition of the composition).
By definition of the identity function (g◦ f )(x) = iX (x) and thus g◦ f = iX . Therefore f is left-invertible.

Problem 9.2. Let X and Y be nonempty sets, and f : X → Y be a function. We say that f is right-invertible
(or admits a right-inverse) if there exists a function g : Y → X such that f ◦ g = iY . Prove that if f has a
right-inverse then f is surjective.

Solution of Problem 9.2. Suppose first that f is right-invertible. Then there is some function h : Y → X such
that f ◦ h = iY . Let y ∈ Y , then

y = iY (y) (by definition of the identity function on Y )

= ( f ◦ h)(y) (since f ◦ h(y) = iY (y) by definition of h being a right-inverse of f )

= f (h(y)) (by definition of the composition).

If we let x = h(y) then x ∈ X (since the codomain of h is X) and y = f (x). We just proved that for all y ∈ Y ,
there is x ∈ X such that y = f (x), which means that f is surjective.

10 Functions and sets

Problem 10.1. Let X and Y be nonempty sets, and f : X → Y be an injective function. Let A be a subset of
X. Prove that f −1 ( f (A)) = A.

Solution of Problem 10.1. The result is proved by a double inclusion argument. We first prove that f −1 ( f (A)) ⊆
A. If f −1 ( f (A)) = 0/ then the inclusion holds. Otherwise let x ∈ f −1 ( f (A)), then f (x) ∈ f (A) (by definition
of the inverse image of a subset), and there exists a ∈ A such that f (x) = f (a) (by definition of the image of
a subset). Since f is injective it follows that x = a, and hence x ∈ A (because a ∈ A).

We now prove that A ⊆ f −1 ( f (A)). If A = 0/ the inclusion holds. Otherwise, let x ∈ A, then f (x) ∈ f (A)
(by definition of the image of a subset) and x ∈ f −1 ( f (A)) (by definition of the inverse image of a subset).

38
Problem 10.2. Let X and Y be nonempty sets, and f : X → Y be an surjective function. Let A be a subset of
Y . Prove that f ( f −1 (A)) = A.

Solution of Problem 10.2. The result is proved by a double inclusion argument. We first prove that f ( f −1 (A)) ⊆
A. If f ( f −1 (A)) = 0/ the inclusion holds. Otherwise let y ∈ f ( f −1 (A)), then y = f (x) for some x ∈ f −1 (A)
(by definition of the image), and f (x) ∈ A (by definition of the inverse image). But y = f (x) belongs to A
since f (x) does. Therefore f −1 ( f (A)) ⊆ A.

We now prove that A ⊆ f ( f −1 (A)). If A = 0/ the inclusion holds. Otherwise let a ∈ A, then a ∈ Y since
A is a subset of Y . By surjectivity of f , there exists x ∈ X such that a = f (x), and f (x) ∈ A (since a is in A).
It follows that x ∈ f −1 (A) (by definition of the inverse image) and f (x) ∈ f ( f −1 (A)) (by definition of the
image). Therefore a ∈ f ( f −1 (A)).

11 Supplementary problems

Problem 11.1. Let f1 : X1 → X2 , f2 : X2 → X3 , f3 : X3 → X4 and f4 : X4 → X5 . Show that (( f4 ◦ f3 )◦ f2 )◦ f1 =


f4 ◦ ( f3 ◦ ( f2 ◦ f1 )).

Problem 11.2. Let X and Y be nonempty sets, and f : X → Y be a function. Prove that f is surjective then
f is right-invertible.

Solution of Problem 11.3. Assume f is surjective. For each y ∈ Y , the set {x ∈ X : f (x) = y} is non-empty.
Note that if y1 ̸= y2 , then {x ∈ X : f (x) = y1 } ∩ {x ∈ X : f (x) = y2 } = ∅. By the axiom of choice, there is a
function h : Y → X such that for each y ∈ Y , h(y) ∈ {x ∈ X : f (x) = y}. Hence f (h(y)) = y for each y ∈ Y ,
so f ◦ h = iY and therefore f is right-invertible.

Problem 11.3. Let f1 : X1 → X2 , f2 : X2 → X3 , f3 : X3 → X4 be three injective functions. Show that f3 ◦ f2 ◦ f1


is injective.

39

You might also like