Math1081 Topic1 Notes
Math1081 Topic1 Notes
Math1081 Topic1 Notes
Greenhill
Example. We can specify a set by some property that all elements must have:
S = {x ∈ Z | x2 ≤ 4}
(or S = {x ∈ Z : x2 ≤ 4} ) .
Exercise. What is the difference between the sets ∅, {∅} and {∅, {∅}}?
Example. N ⊆ Z ⊆ Q ⊆ R
Example. Let S = {a, b, c}. The subsets of S are:
∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}.
S has 8 subsets. We can write ∅ ⊆ S, {b} ⊆ S, {a, c} ⊆ S, {a, b, c} ⊆ S, etc.
The power set of S is
P (S) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}.
and |P (S)| = 23 = 8.
We can write ∅ ∈ P (S), {b} ∈ P (S), {a, c} ∈ P (S), {a, b, c} ∈ P (S), etc.
Exercise. Let A = P (P ({1})). Find A and |A|.
Exercise. For B = {∅, 0, {1}}, are the following statements true or false?
1. ∅∈B 8. {{0}} ⊆ P (B)
2. ∅⊆B 9. 1∈B
3. {∅} ∈ B 10. {1} ⊆ B
4. {∅} ⊆ P (B) 11. {1} ∈ P (B)
5. {0} ∈ P (B) 12. {{1}} ⊆ P (B)
6. {∅} ( B 13. ∅ ∈ P (P (P (P (B))))
7. {∅} ∈ P (B)
U
A
complement (c , ) - “not” U
Ac = A = U \ A = {x ∈ U | x ∈
/ A} A
C++
Python Java
Exercise. In a survey of 200 people asked about whether they like
apples (A), bananas (B), and cherries (C), the following data was obtained:
|A| = 112, |B| = 89, |C| = 71,
|A ∩ B| = 32, |A ∩ C| = 26, |B ∩ C| = 43,
|A ∩ B ∩ C| = 20.
a) How many people like apples or bananas?
b) How many people like exactly one of these fruit?
c) How many people like none of these fruit?
Exercise. Is the statement A∩(B ∪C) = (A∩B)∪C true (for all sets A, B, C)?
Provide a proof if it is true or give a counter example if it is false.
U U Exampl
B A B A
Solution:
S = {A ∈ U | A ∈
/ A}.
Is S an element of itself?
i) If S ∈ S, then the definition of S implies that S ∈
/ S, a contradiction.
ii) If S ∈
/ S, then the definition of S implies that S ∈ S, also a contradiction.
Hence neither S ∈ S nor S ∈
/ S.
Usual Solution:
Key Point: Set theory is very subtle, and the notion of “set” must be carefully
defined. In this course, we can mostly ignore these subtleties.
When X and Y are small finite sets, we can use an arrow diagram to represent
a subset S of X × Y : we list the elements of X and the elements of Y , and
then we draw an arrow from x to y for each pair (x, y) ∈ S.
Example. Let X = {a, b, c}, Y = {1, 2, 3, 4}, and S = {(a, 2), (a, 3), (c, 1)}
which is a subset of X × Y , then the arrow diagram for S is
1
a
2
b
3
c
4
Ahmed f
1
Belinda
2
Changhao
3
Dan
4
Eve
X Y
Exercise. What are the ranges of the floor and ceiling functions?
Plot the graphs of the floor and the ceiling functions.
Exercise. Determine whether or not each of the following definitions
corresponds to a function. If it does, then write down its range.
1
f : R → R, f (x) = x
g : R+ → R, g(x) = 1
x
h : R → R, h(x) = ⌊x2 − x⌋
j : R → Z j(x) = 2x
a
1
b
2
c
3
d
4
e
The image of {a, b, e} under f is f ({a, b, e}) = {f (a), f (b), f (e)} = {2, 3}.
The inverse image of {1, 2} under f is f −1 ({1, 2}) = {b, d}.
Exercise. Let f : R → R be given by f (x) = x2 . Find
√
(a) The image of the set {2, −2, π, 2} under f .
(b) The inverse image of the set {9, −9, π} under f
(c) The inverse image of the set {−2, −9} under f .
a 1 a 1 a 1
2 2 2
b b b
c 3 c 3 c 3
f1 4 f2 4 f3 4
a 1 a a 1
1
2 2
b b 2 b
c 3 c c 3
3
f4 4 f5 f6 4
a a a a
1 1 1
b b b b 1
c 2 c 2 c 2 c
f7 f8 f9 f10
f1 f2 f3 f4 f5 f6 f7 f8 f9 f10
function
one-to-one
onto
bijection
Exercise. Which of the following definitions correspond to functions?
Which of the functions are one-to-one? onto? a bijection?
√
f1 : R → R, f1 (x) = x
f2 : R → R, f2 (x) = x2
f3 : R → (R+ ∪ {0}), f3 (x) = x2
f4 : R+ → R+ , f4 (x) = x2
f5 : (R − {0}) → R, f5 (x) = x1
f6 : R → R, f6 (x) = x2 − 2x − 2
Plot the graph in each case, and give reasons for your answers.
f1 f2 f3 f4 f5 f6
function
one-to-one
onto
bijection
(f ◦ g)(y) = f (g(y)) = f (y 2 ) = y 2 + 3.
Exercise. For each of the following functions, find its inverse if it is invertible.
f : R → Z, f (x) = ⌊x⌋
g : R → R+ , g(x) = e3x−2
h : {1, 2, 3} → {a, b, c}, h = {(1, b), (2, c), (3, a)}.
a0 , a1 , a2 , . . . , ak , . . . ,
where each object ak is called a term, and the subscript k is called an index
(typically starting from 0 or 1). We denote the sequence by {ak }.
If all terms ak lie in a set A, we can think of the sequence as a function
a : N → A : k 7→ ak .
Example.
An arithmetic progression is a sequence {bk } where bk = a + kd for all k ∈ N
for some fixed numbers a ∈ R and d ∈ R. Its terms are
a, a + d, a + 2d, a + 3d, . . . .
Properties of summation:
n
X n
X n
X n
X n
X
(ak + bk ) = ak + bk and (λ ak ) = λ ak ,
k=m k=m k=m k=m k=m
but in general ! !
n
X n
X n
X
ak bk 6= ak bk .
k=m k=m k=m
Example. The sum of the first n+1 terms of the arithmetic progression {a+kd}
is
n
X (2a+nd)(n+1)
(a+kd) = a + (a+d) + (a+2d) + · · · + (a+nd) = .
k=0
2
Why?
Example. The sum of the first n + 1 terms of the geometric progression {ark }
is n
X
k 2 n a(rn+1 − 1)
ar = a + ar + ar + · · · + ar = .
k=0
r − 1
Why?
evaluate
10
X
(k − 3)(k + 2)
k=1
Exercise. Use the formula for the geometric progression to evaluate
40
X
(3k + 2)2
k=11
For example,
3
X 4
X 2
X
a1 + a2 + a3 = ak = aj−1 = aℓ+1 = · · · .
k=1 j=2 ℓ=0
Exercise. Simplify
n+1
X n−1
X n−1
X
k−2 k
x − x + xk+1
k=2 k=1 k=0
Properties of product:
n n
! n
! n n n
Y Y Y Y Y Y
ak bk = ak bk but (ak + bk ) 6= ak + bk .
k=m k=m k=m k=m k=m k=m
Exercise. Simplify
n
Y k
k=1
k+3