# SOLUTION OF HW1 September 18, 2011

```SOLUTION OF HW1
MINGFENG ZHAO
September 18, 2011
1. Show that the distance function d(x, y) = |x − y| for all x, y ∈ R has the following properties:
a. |x − y| ≥ 0 for all x, y ∈ R, and |x − y| = 0 if and only if x = y.
b. |x − y| = |y − x| for any x, y ∈ R.
c. For any x, y, z ∈ R, we have
|x − y| ≤ |x − z| + |z − y|.
Proof. a. Claim I: |x − y| ≥ 0 for all x, y ∈ R.
For all x, y ∈ R. If x ≥ y, that is, x − y ≥ 0, so
|x − y| = x − y ≥ 0.
If x ≤ y, that is, x − y ≤ 0, so y − x ≥ 0. Hence
|x − y| = y − x ≥ 0.
By the arbitrary of x, y ∈ R., we get
|x − y| ≥ 0.
Claim II: |x − y| = 0 if and only if x = y.
If x = y, then x − y = 0, so |x − y| = 0. If |x − y| = 0, by the definition of the absolute | &middot; |, we get
that x − y = 0, that is, x = y. Therefore, we know that |x − y| = 0 if and only if x = y.
b. For all x, y ∈ R. If x ≥ y, that is, x − y ≥ 0, so
|x − y| = x − y.
1
2
MINGFENG ZHAO
Since x − y ≥ 0, then y − x ≤ 0, so
|y − x| = −(y − x) = x − y = |x − y|.
If x ≤ y, that is, x − y ≤ 0, so y − x ≥ 0. Hence
|x − y| = y − x.
Since x − y ≤ 0, then y − x ≥ 0. Hence
|y − x| = y − x = |x − y|.
By the arbitrary of x, y ∈ R., we get
|x − y| = |y − x|.
c. Claim I: For all x ∈ R, we have x ≤ |x|.
For all x ∈ R, if x ≥ 0, then
|x| = x.
If x ≤ 0, then −x ≥ 0. So
|x| = −x ≥ 0 ≥ x.
Therefore, we get that for all x ∈ R, we have x ≤ |x|.
Claim II: For any x, y, z ∈ R, we have
|x − y| ≤ |x − z| + |z − y|.
For any x, y, z ∈ R, if x ≥ y, then x − y ≥ 0. So
|x − y| =
x−y
=
x−z+z−y
≤
|x − z| + |z − y| By the Claim I.
SOLUTION OF HW1
3
If x ≤ y, then x − y ≤ 0, that is, y − x ≥ 0. So
|x − y| = y − x
= y−z+z−x
≤
|y − z| + |z − x| By the Claim I
= |x − z| + |z − y| By the result of b).
Therefore, we conclude that for any x, y, z ∈ R, we have
|x − y| ≤ |x − z| + |z − y|.
2. [Page 28, Problem 4] If x is an arbitrary real number, prove that there is exactly one integer n
which satisfies the inequalities n ≤ x &lt; n + 1. This n is called the greatest integer in x and is denoted
by [x]. For example, [5] = 5,
5
2
= 2, − 52 = −3.
Proof. Existence: For any x ∈ R, and we fix x. Consider the set
X = {m ∈ Z : m ≤ x}.
Then we know that X 6= ∅, and
n = sup m &lt; ∞.
m∈X
Since for all m ∈ X, we have m ≤ x, and n is the supremum in X, then
n ≤ x.
Since n is the supremum in X, and n + 1 &gt; n, then n + 1 ∈
/ X, that is,
n + 1 &gt; x.
4
MINGFENG ZHAO
So we get
n ≤ x &lt; n + 1.
Uniqueness: If we have two integers n1 , n2 ∈ Z such that
n1 ≤ x &lt; n1 + 1,
and n2 ≤ x &lt; n2 + 1.
Then we get
n1 ≤ x &lt; n1 + 1,
and
− n2 − 1 &lt; −x ≤ −n2 .
By adding the above two inequalities together, we can get
n1 − n2 − 1 &lt; 0 &lt; n1 + 1 − n2 .
So we have
−1 &lt; n2 − n1 &lt; 1.
But n1 , n2 ∈ Z, then n2 − n1 ∈ Z. Since only 0 is the integer which is larger then -1, and less then
1. So we get n2 − n1 = 0. That is, n1 = n2 .
Therefore, there is exactly one integer n which satisfies the inequalities n ≤ x &lt; n + 1.
3. [Page 28, Problem 10] An integer n is called even if n = 2m for some integer m, and odd if n + 1
is even. Prove the following statements:
a. An integer can not be both even and odd.
b. Every integer is either even or odd.
c. The sum or product of two even integers is even. What can you say about the sum or product
of two odd integers?
d. If n2 is even, so is n. If a2 = 2b2 , where a and b are integers, then both a and b are even.
e. Every rational number can be expressed in the form
one of which is odd.
a
b,
where a and b are integers, at least
SOLUTION OF HW1
5
Proof. a. Assume there is some integer n ∈ Z such that n is both even and odd. Since n is even, then
there exists some k ∈ Z such that
n = 2k.
Since n is odd, then n + 1 is even, which implies that there exists some l ∈ Z such that
n + 1 = 2l.
So we get
n = 2k = 2l − 1.
That is,
1 = 2l − 2k = 2(l − k).
Both sides are divided by 2, we get
l−k =
Since l, k ∈ Z, then l − k ∈ Z, that is,
1
2
1
.
2
∈ Z, contradiction. Therefore, we get that any integer can
not be both even and odd.
b. Firstly, we know that 0 = 2 &middot; 0, then 0 is even. 1 + 1 = 2 = 2 &middot; 1, then 1 is odd.
Claim I: For any n ∈ N, n is either odd or even.
We consider the set
S = {m ∈ N : n is either odd or even}.
Since 1 is odd, then 1 ∈ S. Assume for m ∈ S, then m is odd or even. If m is odd, then there
exists some k ∈ Z such that
m + 1 = 2k.
So m + 1 is even, then m + 1 ∈ S. If m is even, then there exists some l ∈ Z such that
m = 2l.
6
MINGFENG ZHAO
Then we know
(m + 1) + 1 = m + 2 = 2l + 2 = 2(l + 1).
So m + 1 is odd, then m + 1 ∈ S. By mathematical induction, we know that
S = N.
That is, for any n ∈ N, n is odd or even.
Claim II: Every integer is either even or odd.
For any n ∈ Z. If n = 0, since 0 is even, then n is even. If n &gt; 0, then n ∈ N, by the Claim I, we
know that n is either even or odd. If n &lt; 0, then −n &gt; 0, that is, −n ∈ N. By the Claim I, we know
that −n is either even or odd. If −n is even, then there exists some k ∈ Z such that
−n = 2k.
So n = −2k = 2 &middot; (−k), that is, n is even. If −n is odd, then there exists some l ∈ Z such that
−n + 1 = 2k. So n + 1 = −2k + 2 = 2 &middot; (−k + 1), that is, n is odd.
Therefore, by the arbitrary of n ∈ Z, we get that every integer is either even or odd.
c. Claim I: The sum of two even integers is even.
Assume that n, m ∈ Z are two even integers, then there exists some k, l ∈ Z such that
n = 2k,
and m = 2l.
So we get n + m = 2k + 2l = 2(k + l), that is, n + m is even. By the arbitrary of two even numbers
n, m ∈ Z, we get that the sum of two even integers is even.
Claim II: The product of two even integers is even.
Assume that n, m ∈ Z are two even integers, then there exists some k, l ∈ Z such that
n = 2k,
and m = 2l.
SOLUTION OF HW1
7
So we get n &middot; m = (2k) &middot; (2l) = 4kl = 2(2kl), that is, nm is even. By the arbitrary of two even
numbers n, m ∈ Z, we get that the product of two even integers is even.
Claim III: The sum of two odd integers is even.
Assume that n, m ∈ Z are two odd integers, then there exists some k, l ∈ Z such that
n + 1 = 2k,
and m + 1 = 2l.
n = 2k − 1,
and m = 2l − 1.
That is, we get
So we get n + m = 2k − 1 + 2l − 1 = 2k − 2l − 2 = 2(k − l − 1), that is, n + m is even. By the
arbitrary of two odd numbers n, m ∈ Z, we get that the sum of two odd integers is even.
Claim IV: The product of two odd integers is odd.
Assume that n, m ∈ Z are two odd integers, then there exists some k, l ∈ Z such that
n + 1 = 2k,
and m + 1 = 2l.
n = 2k − 1,
and m = 2l − 1.
That is, we get
So we get n &middot; m = (2k − 1) &middot; (2l − 1) = 4kl − 2k − 2l + 1, that is,
nm + 1 = 4kl − 2k − 2l + 2 = 2(2kl − k − l + 1).
So n + m is even. By the arbitrary of two odd numbers n, m ∈ Z, we get that the product of two
odd integers is odd.
d. Claim I: If n2 is even, so is n.
Assume that n2 is even, but n is odd. By the Claim IV in the part c), we know that the product
of two odd numbers is odd. Since n is odd, then n2 = n &middot; n is odd, contradiction. Therefore, n is odd.
Claim II: If a2 = 2b2 , where a and b are integers, then both a and b are even.
8
MINGFENG ZHAO
Since a2 = 2b2 , then a2 is even. By the Claim I, we know that a is even, that is, there exists some
k ∈ Z such that
a = 2k.
Then a2 = (2k)2 = 4k 2 = 2b2 , that is, b2 = 2k 2 , which implies that b2 is even. By the Claim I, we
get b is even. Therefore, we conclude that both a and b are even.
e. Let q ∈ Q be an rational number, then there exists some m, n ∈ Z with n 6= 0 such that
m
.
n
q=
If either m or n is odd, we are done. If both m and n are even, then there exists some m1 , n1 ∈ Z
such that
m = 2m1 ,
So q =
m
n
=
2m1
2n1
=
m1
n1 .
and n = 2n1 .
If either m1 or n1 is odd, we are done. If both m1 and n1 are even, then
there exists some m2 , n2 ∈ Z such that
m1 = 2m2 ,
So q =
m1
n1
=
2m2
2n2
=
m2
n2 .
and n1 = 2n2 .
So by finite many times about the above discussion, we finally can find
some mk , nk ∈ Z such that either mk or nk are odd, and
q=
mk
.
nk
4. [Page 28, Problem 11] Prove that there is no rational number whose square is 2.
Proof. Assume that there exists some rational q ∈ Q such that q 2 = 2. By the result of e), in the
Problem 10, in Page 28, we know that we can find two integers a, b ∈ Z such that either a or b is odd,
and
q=
a
.
b
SOLUTION OF HW1
Then q 2 =
a 2
b
=
a2
b2
9
= 2, that is,
a2 = 2b2 .
By the result of d), in the Problem 10, in Page 28, we know that both a and b are even, which
contradicts with that either a or b is odd. Therefore, there is no rational number whose square is
2.
Department of Mathematics, University of Connecticut, 196 Auditorium Road, Unit 3009, Storrs, CT
06269-3009