Homework 1 Solutions
Homework 1 Solutions
Homework 1 Solutions
Enrique Treviño
September 7, 2014
1 Chapter 1
Problem 1. (Exercise 4)
Prove A ∪ ∅ = A and A ∩ ∅ = ∅.
Solution 1.
A ∪ ∅ = {x ∈ A or x ∈ ∅} = {x ∈ A} = A
and
A ∩ ∅ = {x ∈ A and x ∈ ∅} = ∅.
If proving it this way seems unsatisfactory, an alternative proof of the first statement would be:
Let x ∈ A ∪ ∅, then x ∈ A or x ∈ ∅, but since x 6∈ ∅, then x ∈ A, so A ∪ ∅ ⊆ A.
Now, if x ∈ A, then x ∈ A ∪ ∅, so A ⊆ A ∪ ∅. Therefore A ∪ ∅ = A.
An alternative proof for the second statement can be proved as follows:
For the sake of contradiction, suppose A ∩ ∅ 6= ∅. Then there exists an x ∈ A ∩ ∅. But then x ∈ A and x ∈ ∅.
But there is no x ∈ ∅, therefore we’ve reached a contradiction. Hence A ∩ ∅ = ∅.
1
(c) f is not one-to-one because sin 0 = sin π = 0.
f is not onto because | sin x| ≤ 1. The range of f is {x ∈ R | −1 ≤ x ≤ 1}.
(d) f is not one-to-one because f (1) = f (−1) = 1.
f is no onto because f is never negative. The range of f is {x2 | x ∈ Z}.
Problem 4. (Exercise 22)
Let f : A → B and g : B → C be maps.
(a) If f and g are both one-to-one functions, show that g ◦ f is one-to-one.
(b) If g ◦ f is onto, show that g is onto.
(c) If g ◦ f is one-to-one, show that f is one-to-one.
(d) If g ◦ f is one-to-one and f is onto, show that g is one-to-one.
(e) If g ◦ f is onto and g is one-to-one, show that f is onto.
Solution 4.
(a) Suppose g ◦ f (x) = g ◦ f (y), i.e., g(f (x)) = g(f (y)). Since g is one-to-one, then f (x) = f (y). Since f
is one-to-one, then x = y. Therefore g ◦ f is one-to-one.
(b)
(c) Suppose f (x) = f (y), then g(f (x)) = g(f (y)). Since g ◦ f is one-to-one and g ◦ f (x) = g ◦ f (y), then
x = y. Therefore f is one-to-one.
An alternative proof would be to assume for the sake of contradiction that f is not one-to-one, i.e.,
there exist distinct x and y such that f (x) = f (y). But then g(f (x)) = g(f (y), which implies that
x = y, contradicting the fact that x and y are distinct.
The two proofs are very similar but I wrote both of them to illustrate that you don’t have to think
about it a certain way.
(d)
(e) Let b ∈ B. Now consider c = g(b) ∈ C. Since g ◦ f is onto, then there exists an a ∈ A such that
g ◦ f (a) = c. Therefore g(f (a)) = c = g(b). Since g is one-to-one, f (a) = b. So we’ve shown that there
exists an a ∈ A such that f (a) = b, which shows that f is onto.
Problem 5. (Exercise 24)
Let f : X → Y be a map with A1 , A2 ⊂ X and B1 , B2 ⊂ Y .
(a) Prove f (A1 ∪ A2 ) = f (A1 ) ∪ f (A2 ).
(b) Prove f (A1 ∩ A2 ) ⊂ f (A1 ) ∩ f (A2 ). Give an example in which equality fails.
(c) Prove f −1 (B1 ∪ B2 ) = f −1 (B1 ) ∪ f −1 (B2 ), where
2
(b) Let x ∈ f (A1 ∩ A2 ). Then there exists y ∈ A1 ∩ A2 such that f (y) = x. Since y ∈ A1 , then x ∈ f (A1 ).
Similarly, since y ∈ A2 , we have that x ∈ f (A2 ). Since x ∈ f (A1 ) and x ∈ f (A2 ), we can conclude that
x ∈ f (A1 ) ∩ f (A2 ), which proves that f (A1 ∩ A2 ) ⊆ f (A1 ) ∩ f (A2 ).
An example where equality fails is the following. Let f : R → R be defined by f (x) = x2 . Now, let
A1 = {−1, 2}. Let A2 = {1, 2}. So f (A1 ∩ A2 ) = f ({2}) = {4}, while f (A1 ) ∩ f (A2 ) = f ({−1, 2}) ∩
f ({1, 2}) = {1, 4} ∩ {1, 4} = {1, 4} =
6 {4}.
(d) m ∼ n in Z if m ≡ n (mod 6)
Solution 6.
(a) It’s not an equivalence relation because it is not symmetric. For example 3 ∼ 2 because 3 ≥ 2, but
2 6∼ 3 since 2 6≥ 3.
3
2 Chapter 2
Problem 7. (Exercise 1)
Prove that
n(n + 1)(2n + 1)
12 + 22 + · · · + n2 =
6
for n ∈ N.
Solution 7. We will prove it by induction.
The statement is true for n = 1 since, the left hand side of the equation is 12 = 1 and the right hand side is
1(1 + 1)(2(1) + 1) 6
= = 1.
6 6
Assume that for an integer k ≥ 1, the statement is true for n = k, i.e., we have that
k(k + 1)(2k + 1)
12 + 22 + . . . + k 2 = .
6
Therefore
4
(Note: Squaring is not always valid when proving inequalities. In this case it is valid because the ai are
positive.)
So we want to prove that
a21 + 2a1 a2 + a22 ≥ 4a1 a2
a21 − 2a1 a2 + a22 ≥ 0
(a1 − a2 )2 ≥ 0.
But the last statement is clearly true, since x2 ≥ 0 for any x ∈ R.
So we’ve proven the statement for r = 1, i.e., for n = 21 = 2. Now, to continue by induction suppose
that the inequality is true for r = k, i.e.,
k
2
1 X √
ai ≥ 2k a1 a2 a3 · · · a2k .
2k i=1
Let’s manipulate the left hand side by first expanding the sum, then grouping in pairs and using the inequality
for n = 2 and finally using the induction hypothesis (the case n = 2k ):
k+1
2X
1 a1 + a2 + a3 + . . . + a2k+1 −1 + a2k+1
ai =
2k+1 i=1
2k+1
a +a2k+1
a1 +a2 a3 +a4 2k+1 −1
2 + 2 + . . . + 2
=
√ √ 2k
√
a1 a2 + a3 a4 + . . . + a2k+1 −1 a2k+1
≥
q√ 2k
2k
√ √
≥ a1 a2 a3 a4 · · · a2k+1 −1 a2k+1
√
q
2k
= a1 a2 a3 a4 · · · a2k+1 −1 a2k+1
√
k+1
= 2 a1 a2 a3 a4 · · · a2k+1 −1 a2k+1 .
So we have proven the inequality for all powers of 2. So now we know the statement is true for n =
1, 2, 4, 8, 16, 32, 64, 128, . . ., but we don’t know what happens with the values in between. To prove the values
in between we’ll use “reverse-induction”. “Reverse-induction” is where you prove that if the inequality is
true for n = k, then the inequality is true for n = k − 1. If we manege to prove this implication, we can fill
in the holes. For example, since we know the inequality for powers of 2, it is true for n = 64, if we can prove
that k → k − 1, then it would be true for n = 63, but then it would be true for n = 62, and so on. The
reason reverse-induction is a valid strategy is that we already proved it for all powers of 2, so we can leap to
the next power of 2 and then fill in the gaps below it.
Without further ado, let’s prove the “reverse-induction” implication. Suppose the inequality is true for
n = k, i.e.,
a1 + a2 + . . . + ak √
≥ k a1 a2 · · · ak .
k
Now let’s prove it for n = k − 1. Suppose we have b1 , b2 , . . . bk−1 be positive real numbers. We want to show
b1 + b2 + . . . + bk−1 p
k−1
≥ b1 b2 · · · bk−1 .
k−1
Let
b1 + b2 + . . . + bk−1
bk = .
k−1
5
By the “reverse-induction” hypothesis, we know
b1 + b2 + . . . + bk−1 + bk p
≥ k b1 b2 · · · bk−1 bk . (1)
k
The left-hand-side is:
b1 +b2 +...+bk−1
b1 + b2 + . . . + bk−1 + bk b1 + b2 + . . . + bk−1 + k−1
=
k k
(k − 1)(b1 + b2 + . . . + bk−1 ) + (b1 + b2 + . . . + bk−1 )
=
k(k − 1)
b1 + b2 + . . . + bk−1
= .
k−1
And the right-hand-side is:
s
p
k k b1 + b2 + . . . bk−1
b1 b2 · · · bk−1 bk = b1 b2 · · · bk−1
k−1
s
p b1 + b2 + . . . bk−1
= k b1 b2 · · · bk−1 k
k−1
1
1 b1 + b2 + . . . bk−1 k
= (b1 b2 · · · bk−1 ) k .
k−1
Now by taking the (k − 1)-th root on both sides (valid because both sides are positive), we get the desired
inequality, i.e.,
b1 + b2 + . . . bk−1 p
≥ k−1 b1 b2 · · · bk−1 .
k−1
The “reverse-induction” is complete and hence the statement is true for all n ∈ N.
Problem 10. (Exercise 15)
For each of the following pairs of numbers a and b, calculate gcd(a, b) and find integers r and s such that
gcd(a, b) = ra + sb.
(a) 14 and 39
(b) 234 and 165
(c) 1739 and 9923
(d) 471 and 562
(e) 23,771 and 19,945
6
(f) −4357 and 3754
Solution 10.
(a)
39 = 14 × 2 + 11
14 = 11 × 1 + 3
11 = 3 × 3 + 2
3 = 2 × 1 + 1.
1=3−2×1
= 3 − (11 − 3 × 3) × 1
= 3 × 4 − 11 × 1
= (14 − 11) × 4 − 11 × 1
= 14 × 4 − 11 × 5
= 14 × 4 − (39 − 14 × 2) × 5
= 14 × 14 − 39 × 5.
7
Now,
1=3−2×1
= 3 − (8 − 3 × 2) × 1
=3×3−8×1
= (99 − 8 × 12) × 3 − 8 × 1
= 99 × 3 − 8 × 37
= 99 × 3 − (206 − 99 × 2) × 37
= 99 × 77 − 206 × 37
= (511 − 206 × 2) × 77 − 206 × 37
= 511 × 77 − 206 × 191
= 511 × 77 − (1228 − 511 × 2) × 191
= 511 × 459 − 1228 × 191
= (1739 − 1228 × 1) × 459 − 1228 × 191
= 1739 × 459 − 1228 × 650
= 1739 × 459 − (9923 − 1739 × 5) × 650
= 1739 × 3709 − 9923 × 650.
8
Now,
1 = 23 − 22 × 1
= 23 − (45 − 23 × 1) × 1
= 23 × 2 − 45 × 1
= (68 − 45 × 1) × 2 − 45 × 1
= 68 × 2 − 45 × 3
= 68 × 2 − (249 − 68 × 3) × 3
= 68 × 11 − 249 × 3
= (566 − 249 × 2) × 11 − 249 × 3
= 566 × 11 − 249 × 25
= 566 × 11 − (815 − 566 × 1) × 25
= 566 × 36 − 815 × 25
= (3826 − 815 × 4) × 36 − 815 × 25
= 3826 × 36 − 815 × 169
= 3826 × 36 − (19945 − 3826 × 5) × 169
= 3826 × 881 − 19945 × 169.
= (23771 − 19945 × 1) × 881 − 19945 × 169
= 23771 × 881 − 19945 × 1050.
(f)
9
Now,
1=3−2×1
= 3 − (5 − 3 × 1) × 1
=3×2−5×1
= (18 − 5 × 3) × 2 − 5 × 1
= 18 × 2 − 5 × 7
= 18 × 2 − (59 − 18 × 3) × 7
= 18 × 23 − 59 × 7
= (136 − 59 × 2) × 23 − 59 × 7
= 136 × 23 − 59 × 53
= 136 × 23 − (603 − 136 × 4) × 53
= 136 × 235 − 603 × 53
= (3151 − 603 × 5) × 235 − 603 × 53
= 3151 × 235 − 603 × 1228
= 3151 × 235 − (3754 − 3151 × 1) × 1228
= 3151 × 1463 − 3754 × 1228
= (−4357 − 3754 × (−2)) × 1463 − 3754 × 1228
= (−4357) × 1463 + 3754 × 1698
Solution 11.
Problem 12. (Exercise 27)
Let a, b, c ∈ Z. Prove that if gcd(a, b) = 1 and a | bc, then a | c.
Solution 12. Since a | bc, there exists an integer k such that ak = bc. Since gcd(a, b) = 1, there exist
integers r and s such that ar + bs = 1. Now multiply by c and we get
arc + bcs = c
arc + (ak)s = c
a(rc + ks) = c.
10