2-3+4+6-handout
2-3+4+6-handout
∀x (x ∈ A → ∃y (y ∈ B ∧ (x, y ) ∈ f ))
and
f (S) = {f (s) ∣ s ∈ S}
1 f {a, b, c} is ?
Solution: {y , z}
2 f {c, d} is ?
Solution: {z}
“many-to-one”
1 A function can map many elements in the domain on the
same element in the codomain.
2 Such a function is called a many-to-one mapping .
1 As illustrated by the
example on the right, a
function can be surjective
(onto) but not injective
(one-to-one).
2 Vice versa, the example on
the previous slide shows
that a function can be
injective (one-to-one) but
not surjective (onto).
Plan for Part II
1. Functions
1.1 Definition and representation
1.2 Injections
1.3 Surjections
1.4 Bijection
1.5 Inverse Function
1.6 Composition
1.7 Graphs of Functions
1.8 Some Important Functions
2. Sequences and Summations
2.1 Sequences
2.2 Arithmetic and Geometric Progressions
2.3 Recurrence Relations
2.4 Summations
3. Matrices
3.1 Definition
3.2 Matrix Arithmetic
3.3 Transpose of a Matrix
Bijections
Definition: A function f is a one-to-one correspondence , or a
bijection, if it is both one-to-one and onto (injective and
surjective).
Showing that f is one-to-one or onto
1 Let g be the function from the set {a,b,c} to itself such that
g (a) = b, g (b) = c, and g (c) = a.
2 Let f be the function from the set {a,b,c} to the set {1,2,3}
such that f (a)=3, f (b)=2, and f (c)= 1.
3 What is the composition of f with g ?
4 The composition f ○ g is defined by
a f ○ g (a) = f (g (a)) = f (b) = 2.
b f ○ g (b) = f (g (b)) = f (c) = 1.
c f ○ g (c) = f (g (c)) = f (a) = 3.
g ○ f (x) = g (f (x))
= g (2x + 3)
= 3(2x + 3) + 2
= 6x + 11
Plan for Part II
1. Functions
1.1 Definition and representation
1.2 Injections
1.3 Surjections
1.4 Bijection
1.5 Inverse Function
1.6 Composition
1.7 Graphs of Functions
1.8 Some Important Functions
2. Sequences and Summations
2.1 Sequences
2.2 Arithmetic and Geometric Progressions
2.3 Recurrence Relations
2.4 Summations
3. Matrices
3.1 Definition
3.2 Matrix Arithmetic
3.3 Transpose of a Matrix
Graphs of functions
Let f be a function from the set A to the set B. The graph of the
function f is the set of ordered pairs {(a,b) ∣ a ∈ A and f (a) = b}.
4 Case 2: ≥ 1
2
a 2x = 2n + 2 = (2n + 1) + (2 − 1) and ⌊2x⌋ = 2n + 1, since
0 ≤ 2 − 1 < 1.
b ⌊x + 2 ⌋ = ⌊n + ( 2 + )⌋ = ⌊n + 1 + ( − 2 )⌋ = n + 1, since
1 1 1
0 ≤ − 2 < 1.
1
Q.E.D.
The factorial function
f (n) = 1 ⋅ 2 ⋅ ⋅ ⋅ (n − 1) ⋅ n, f (0) = 0! = 1
Stirling’s Formula:
Examples: √ n
g (n) = 2πn( )n
f (1) = 1! = 1 e
f (2) = 2! = 1 ⋅ 2 = 2
f (6) = 6! = 1 ⋅ 2 ⋅ 3 ⋅ 4 ⋅ 5 ⋅ 6 = 720 f (n) = n! ∼ g (n)
an = f (n)
Sequences
Examples:
1 Let a = 1 and r = −1. Then:
Examples:
1 Let a = −1 and d = 4. Then:
Solution:
f0 = 0
f1 = 1
f2 = f1 + f0 = 1 + 0 = 1
f3 = f2 + f1 = 1 + 1 = 2
f4 = f3 + f2 = 2 + 1 = 3
f5 = f4 + f3 = 3 + 2 = 5
f6 = f5 + f4 = 5 + 3 = 8
Solving recurrence relations
a1 =2
a2 =2+3
a3 = (2 + 3) + 3 =2+3⋅2
a4 = (2 + 2 ⋅ 3) + 3 =2+3⋅3
⋮ observed pattern (guess): am = 2 + 3(m − 1)
an = an−1 + 3 = (2 + 3 ⋅ (n − 2)) + 3 = 2 + 3(n − 1)
(confirmed)
an = an−1 + 3
= (an−2 + 3) + 3 = an−2 + 3 ⋅ 2
= (an−3 + 3) + 3 ⋅ 2 = an−3 + 3 ⋅ 3
⋮ pattern: an = an−m + 3 ⋅ m
a2 + 3(n − 2) = (a1 + 3) + 3(n − 2) = 2 + 3(n − 1)
Financial application
P1 = (1.11)P0
P2 = (1.11)P1 = (1.11)2 P0
P3 = (1.11)P2 = (1.11)3 P0
⋮ observed pattern (guess): Pm = (1.11)m P0
Pn = (1.11)Pn−1 = (1.11)(1.11)n−1 P0 = (1.11)n P0
(confirmed)
Pn = (1.11) 10, 000
n
am + am+1 + am+2 + ⋯ + an
∑ aj
j∈S
Examples:
n
1 ∑ rj = r0 + r1 + r2 + r3 + ⋯ + rn
0
∞
2 ∑ 1i = 1 + 1
2 + 1
3 + 1
4 +⋯
1
am × am+1 × am+2 × ⋯ × an
Geometric series
Sums of the terms of a geometric progression:
⎪ ar r −1−a
⎧ n+1
n ⎪ r ≠1
j
∑ ar = ⎨
⎩a(n + 1) r = 1
j=0 ⎪
⎪
Proof:
n
Let Sn = ∑ ar j
j=0
n
rSn = r ∑ ar j Multiply by r.
j=0
n
= ∑ ar j+1 Move new r into exponent.
j=0
Example:
⎡1 0 −1⎤ ⎡ 3 4 −1⎤⎥ ⎡⎢4 4 −2⎤⎥
⎢ ⎥ ⎢
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢2 2 −3⎥ + ⎢ 1 −3 0 ⎥ = ⎢3 −1 −3⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢3 4 0 ⎥ ⎢−1 1 2 ⎥⎦ ⎢⎣2 5 2 ⎥⎦
⎣ ⎦ ⎣
Example:
1 1 2 1
A=[ ] B =[ ]
2 1 1 1
Does AB = BA ?
Solution:
3 2 4 3
AB = [ ] BA = [ ]
5 3 3 2
AB ≠ BA
Identity matrix and powers of matrices
⎡1 0 ⋯ 0⎤
⎢ ⎥
⎢0 1 ⋯ 0⎥ AIn = Im A = A when A is an
⎢ ⎥
In = ⎢ ⎥ m × n matrix
⎢⋮ ⋮ ⋱ ⋮⎥
⎢ ⎥
⎢0 1 ⋯ 1⎥
⎣ ⎦
⎡1 4⎤
⎢ ⎥
1 2 3 ⎢ ⎥
The transpose of the matrix [ ] is the matrix ⎢2 5⎥.
4 5 6 ⎢ ⎥
⎢3 6⎥
⎣ ⎦
Transpose of a matrix