Professional Documents
Culture Documents
Functions and Sequences: Bruno Carpentieri Bruno - Carpentieri@unibz - It
Functions and Sequences: Bruno Carpentieri Bruno - Carpentieri@unibz - It
Bruno Carpentieri
bruno.carpentieri@unibz.it
Outline Notes
Cartesian Products
Functions
Properties of Functions
Sequences
Outline Notes
Cartesian Products
Functions
Properties of Functions
Sequences
4 Exercise.
4 Solution.
4 Exercise. Let A1 = {x, y }, A2 = {1, 2, 3}, and A3 = {a, b}. Find the following
cartesian products:
(a) A1 × A2
(b) (A1 × A2 ) × A3
(c) A1 × A2 × A3
4 Solutions.
(a) A1 × A2 = {(x, 1), (x, 2), (x, 3), (y , 1), (y , 2), (y , 3)}.
(b) The Cartesian product of A1 and A2 is a set, so it may be used as one of the
sets making up another Cartesian product. This is the case for (A1 × A2 ) × A3
= {(u, v ) | u ∈ A1 × A2 and v ∈ A3 } (by definition of Cartesian product)
= {((x, 1), a), ((x, 2), a), ((x, 3), a), ((y , 1), a), ((y , 2), a), ((y , 3), a)
((x, 1), b), ((x, 2), b), ((x, 3), b), ((y , 1), b), ((y , 2), b), ((y , 3), b)}
(c) The Cartesian product A1 × A2 × A3 is superficially similar to, but is not
quite the same mathematical object as, (A1 × A2 ) × A3 .
(A1 × A2 ) × A3 is a set of ordered pairs of which one element is itself an
ordered pair, whereas A1 × A2 × A3 is a set of ordered triples.
By definition of Cartesian product, A1 × A2 × A3
= {(u, v , w ) | u ∈ A1 , v ∈ A2 , w ∈ A3 }
= {(x, 1, a), (x, 1, b), (x, 2, a), (x, 2, b), (x, 3, a), (x, 3, b)
(y , 1, a), (y , 1, b), (y , 2, a), (y , 2, b), (y , 3, a), (y , 3, b)}
Example 3.
Let X = {a, b, c} and Y = {1, 2, 3, 4}. Define a function f from X to Y by the
arrow diagram below:
1. Write the domain and co-domain of f .
2. Find f (a), f (b), and f (c).
3. What is the range of f ?
4. Is c an inverse image of 2? Is b an
inverse image of 3?
5. Find the inverse images of 2, 4, and 1.
4 Solutions.
4 Exercise.
Define f : R → R and g : R → R by the following formulas:
Does f = g ?
4 Solution.
Yes. Because √
the absolute value of any real number equals the square root of its
square, |x| = x 2 for all x ∈ R. Hence f = g .
4 Exercise.
Let f : R → R and g : R → R be functions. Define new functions (f + g ) : R → R
and (g + f ) : R → R as follows:
4 Solution.
Yes. For all real numbers x,
(f + g )(x) = f (x) + g (x) by definition of (f+g)
= g (x) + f (x) by the commutative law for addition of real
numbers
= (g + f )(x) by definition of (g + f )
Hence (f + g ) = (g + f ).
4 Exercise:
Define a function M : R × R → R such that for all ordered pairs (a, b) of integers,
M(a, b) = ab.
Then M is the multiplication function that sends each pair of real numbers to the
product of the two. Calculate
1. M(−1, −1)
1 1
2. M ,
2 2
√ √
3. M = ( 2, 2)
4 Solution:
1. (−1)(−1) = 1
1 1 1
2. =
2 2 4
√ √
3. 2 2 = 2
4 Given a function from a set X to a set Y , you can consider the set of images in
Y of all the elements in a subset of X and the set of the inverse images in X of
all the elements in a subset of Y .
4 Exercise.
Let X = {1, 2, 3, 4} and Y = {a, b, c, d, e} and define F : X → Y by the following
arrow diagram:
Let A = {1, 4}, C = {a, b}, and D = {c, e}. Find F (A), F (X ), F −1 (C ), F −1 (D).
4 Solution.
F (A) = {b}, F (X ) = {a, b, d}, F −1 (C ) = {1, 2, 4}, F −1 (D) = ∅.
Outline Notes
Cartesian Products
Functions
Properties of Functions
Sequences
4 For a one-to-one (or injective) function , each element of the range is the image
of at most one element of the domain.
4 To prove that f is one-to-one, you will generally use the method of direct proof :
4 We have noted that there may be an element of the co-domain of a function that
is not the image of any element in the domain.
That is, there is some element in Y that is not the image of any element in X .
4 Now suppose f is a function defined from a set X to a set Y , and that Y is infinite.
By definition, f is onto if, and only if, the following universal statement is true:
4 Thus, to prove f is onto, you will ordinarily use the method of generalising from
the generic particular:
4 Thus, a function that is one-to-one and onto defines a unique pairing between the
elements of X and the elements of Y .
4 The pairing in the picture below, for example, shows that there are 5 elements in
the set X that is the domain of F .
Definition
The function F −1 defined in the previous theorem is called the inverse function for F .
4 The diagram below illustrates the fact that an inverse function sends each element
back to where it came from:
4 Consider two functions, the “successor function” and the “squaring function”,
defined from the set Z to Z, and imagine that each is represented by a machine.
4 If the two machines are hooked up so that the output from the successor function
is used as input to the squaring function, then they operate as one larger machine.
4 Combining functions in this way is called composing them; the resulting function is
called the composition of two functions.
Draw the arrow diagram for the composition g ◦ f . What is the range of g ◦ f ?
4 Solution.
To find the arrow diagram for g ◦ f just trace the arrows all the way across from X
to Z through Y . The result is shown below
Outline Notes
Cartesian Products
Functions
Properties of Functions
Sequences
Sequences Notes
Sequences Notes
4 The notation:
am , am+1 , am+2 , . . .
denotes an infinite sequence .
4 An explicit formula (or general formula ) for a sequence is a rule that shows
how the value ak depends on k for any possible k.
4 In 1772 the French mathematician Joseph Louis Lagrange introduced the capital
Greek letter sigma, Σ , to denote the word sum (or summation) . He defined
the summation notation as follows:
4 Solution.
P5
1. k=1 = a1 + a2 + a3 + a4 + a5 = (−2) + (−1) + 0 + 1 + 2 = 0
P2
2. k=2 ak = a2 = −1
P2
3. k=1 a2k = a2·1 + a2·2 = a2 + a4 = −1 + 1 = 0
4 Exercise. Often, the terms of a summation are expressed using an explicit formula.
For instance, it is common to see summations such as
5 8
X X (−1)i
k2 or .
i=0
i +1
k=1
n
X (−1)i
Write the summation in expanded form.
i=0
i +1
4 Solution.
n
X (−1)i (−1)0 (−1)1 (−1)2 (−1)3 (−1)n
= + + + + ... +
i=0
i +1 0+1 1+1 2+1 3+1 n+1
1 −1 1 −1 (−1)n
= + + + + ... +
1 2 3 4 n+1
1 1 1 (−1)n
=1− + − + ... + .
2 3 4 n+1
1 2 3 n+1
+ + + ... +
n n+1 n+2 2n
4 Solution.
n
1 2 3 n+1 X k +1
+ + + ... + = .
n n+1 n+2 2n n+k
k=0
4 Exercise.
n+1
X 1
1. Rewrite the sum by separating off the final term.
i=1
i2
n
X
2. Write the sum 2k + 2n+1 as a single summation.
k=0
4 Solutions.
n+1 n
X 1 X 1 1
1. 2
= + .
i=1
i i=1
i2 (n + 1)2
n
X n+1
X
2. 2k + 2n+1 = 2k .
k=0 k=0
4 Exercise. In certain sums, each term is the difference of two quantities. When such
sums is written in expanded form, all the terms cancel except the first and the last
ones. Successive cancellation of terms collapses like a telescope.
1 1 (k + 1) − k
By observing that − = , find a simple expression for the sum
k k +1 k(k + 1)
n
X 1
k(k + 1)
k=1
n n
X 1 X 1 1
4 Solution. = ( − )=
k(k + 1) k k +1
k=1 k=1
1 1 1 1 1 1 1 1 1 1 1
( − ) + ( − ) + ( − ) + . . . + ( − ) + ( − )=1− .
1 2 2 3 3 4 n−1 n n n + 1 n+1
4 The notation for the product of a sequence of numbers is analogous to the notation
for their sum. The Greek capital letter pi, Π , denotes a product . For example,
5
Y
ak = a1 a2 a3 a4 a5 .
k=1
1
Y k
2.
k +1
k=1
4 Solutions.
5
Y
1. k = 1 · 2 · 3 · 4 · 5 = 120
k=1
1
Y 1 1
2. =
1+1 2
k=1
n
X n
X
4 Solution for (a): ak + 2 bk
k=m k=m
n
X n
X
= (k + 1) + 2 · (k − 1) (by substitution)
k=m k=m
Xn n
X
= (k + 1) + 2 · (k − 1) (by Property 2)
k=m k=m
Xn
= ((k + 1) + 2 · (k − 1)) (by Property 1)
k=m
Xn
= (3 · k − 1) (by algebraic simplification)
k=m
n
! n
!
Y Y
4 Solution for (b): ak · bk
k=m k=m
n
! n
!
Y Y
= (k + 1) · (k − 1) (by substitution)
k=m k=m
n
Y
= (k + 1)(k − 1) (by Property 3)
k=m
Yn
= (k 2 − 1). (by algebraic simplification)
k=m
4 Example: 5! = 5 · 4 · 3 · 2 · 1 = 120.
An important use for the factorial notation is in calculating values of quantities, called
n choose r , that occur in many branches of discrete mathematics and computer
science, especially those connected with the study of counting techniques and
probability. E.g., pick exactly two from the set of choices {a, b, c}
n
Observe that the definition implies r
will always be an integer because it is a number
of subsets.
!
n
4 The quantities are also called combinations . Sometimes they are referred
r
to as binomial coefficients because of their connection to the binomial theorem
and Pascal’s triangle
2 n−2
4 E.g., the binomial
! coefficient x y
6
for n = 6 is (’6 choose 2’) and is
2
n!
computed as: =
m!(n − m)!
6! 6·5· 4! 30
= = = 15
2!(6 − 2)! 2·1· 4! 2
!
8 8! 8! 8·7· 6·5!
Solution to (a). = = = = 56.
5 5!(8 − 5)! 5!3! 5! ·
3 ·
2 ·1
always cancel common factors before multiplying
!
4 4! 4! 4 ·(
3 ·(
2·1
( 1
(
Solution to (b). = = = ( = 1 = 1.
0 0!(4 − 0)! 0!4! 1·( · 3(
(4 ( · 2(
· 1)
!
n+1 (n + 1)! (n + 1)! (n + 1) · n!
Solution to (c). = = = = n + 1.
n n!((n + 1) − n)! n! · 1! n! · 1!
Notes
Notes