Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Notes

Functions and Sequences

Bruno Carpentieri
bruno.carpentieri@unibz.it

3rd floor - Room 3.10 - Phone +39 047 101 6027

Course: Preparatory Course Mathematics


Academic year: 2021-2022
Version: September 21, 2021

B. Carpentieri (UniBZ) Linear Algebra 1 / 54

Outline Notes

Cartesian Products

Functions

Properties of Functions

Sequences

B. Carpentieri (UniBZ) Linear Algebra 2 / 54

Cartesian Products Functions Properties of Functions Sequences

Outline Notes

Cartesian Products

Functions

Properties of Functions

Sequences

B. Carpentieri (UniBZ) Linear Algebra 3 / 54

Cartesian Products Functions Properties of Functions Sequences

Ordered n-Tuples Notes

B. Carpentieri (UniBZ) Linear Algebra 4 / 54


Cartesian Products Functions Properties of Functions Sequences

Example 1: Ordered n-Tuples Notes

4 Exercise.

(a) Is (1, 2, 3, 4) = (1, 2, 4, 3) ?



   
1 3
(b) Is 3, (−2)2 , = 9, 4, ?
2 6

4 Solution.

(a) No. By defintion of equality of ordered 4-tuples,


(1, 2, 3, 4) = (1, 2, 4, 3) ⇔ 1 = 1, 2 = 2, 3 = 4, and 4 = 3
But 3 6= 4, and so the ordered 4-tuples are not equal.
(b) Yes. By definition of equality
 of ordered triples,
 √ √
3, (−2)2 , 21 = 9, 4, 63 ⇔ 3 = 9 and (−2)2 = 4 and 21 = 36 .
Because these equations are all true, the two ordered triples are equal.

B. Carpentieri (UniBZ) Linear Algebra 5 / 54

Cartesian Products Functions Properties of Functions Sequences

Cartesian Products Notes

4 Note: This is a general construction, collecting n-tuples for arbitrary sets.

B. Carpentieri (UniBZ) Linear Algebra 6 / 54

Cartesian Products Functions Properties of Functions Sequences

Example 2: Cartesian Products Notes

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

B. Carpentieri (UniBZ) Linear Algebra 7 / 54

Cartesian Products Functions Properties of Functions Sequences

Solutions to Example 2 Notes

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)}

B. Carpentieri (UniBZ) Linear Algebra 8 / 54


Cartesian Products Functions Properties of Functions Sequences

Functions Defined on General Sets Notes

B. Carpentieri (UniBZ) Linear Algebra 9 / 54

Cartesian Products Functions Properties of Functions Sequences

Arrow Diagrams Notes

4 If X and Y are finite sets, we can define a function f : X → Y by drawing an


arrow diagram .

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.

6. Represent f as a set of ordered pairs.

B. Carpentieri (UniBZ) Linear Algebra 10 / 54

Cartesian Products Functions Properties of Functions Sequences

Solution to Example 3 Notes

4 Solutions.

1. Domain of f = {a, b, c}, co-domain of f = {1, 2, 3, 4}.


2. f (a) = 2, f (b) = 4, f (c) = 2.
3. Range of f = {2, 4}.
4. Yes. No.
5. Inverse image of 2 = {a, c}.
Inverse image of 4 = {b}.
Inverse image of 1 = ∅.
6. {(a, 2), (b, 4), (c, 2)}.

B. Carpentieri (UniBZ) Linear Algebra 11 / 54

Cartesian Products Functions Properties of Functions Sequences

Function Equality Notes

4 A relation is a subset of a Cartesian product and a function is a special kind of


relation.

Specifically, if f and g are functions from a set A to a set B, then

f = {(x, y ) ∈ A × B | y = f (x)} and g = {(x, y ) ∈ A × B | y = g (x)}

It follows that f equals g , written f = g , iff, f (x) = g (x) ∀x ∈ A

We formalize this justification in a theorem:

B. Carpentieri (UniBZ) Linear Algebra 12 / 54


Cartesian Products Functions Properties of Functions Sequences

Example 4: Function Equality Notes

4 Exercise.
Define f : R → R and g : R → R by the following formulas:

f (x) = |x| for all x ∈ R



g (x) = x 2 for all x ∈ R

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 .

B. Carpentieri (UniBZ) Linear Algebra 13 / 54

Cartesian Products Functions Properties of Functions Sequences

Example 5: Function Equality Notes

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:

for all x ∈ R: (f + g )(x) = f (x) + g (x) and (g + f )(x) = g (x) + f (x).


Does (f + g ) = (g + f ) ?

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 ).

B. Carpentieri (UniBZ) Linear Algebra 14 / 54

Cartesian Products Functions Properties of Functions Sequences

Example 6: Function over Cartesian Products Notes

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

B. Carpentieri (UniBZ) Linear Algebra 15 / 54

Cartesian Products Functions Properties of Functions Sequences

Examples 7: Boolean Functions Notes

B. Carpentieri (UniBZ) Linear Algebra 16 / 54


Cartesian Products Functions Properties of Functions Sequences

Functions Acting on Subsets Notes

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 .

B. Carpentieri (UniBZ) Linear Algebra 17 / 54

Cartesian Products Functions Properties of Functions Sequences

Example 8: Function Acting on Subsets Notes

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) = ∅.

B. Carpentieri (UniBZ) Linear Algebra 18 / 54

Cartesian Products Functions Properties of Functions Sequences

Outline Notes

Cartesian Products

Functions

Properties of Functions

Sequences

B. Carpentieri (UniBZ) Linear Algebra 19 / 54

Cartesian Products Functions Properties of Functions Sequences

Injective Functions Notes

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 obtain a precise statement of what it means for a function not to be one-to-one,


take the negation of one of the equivalent versions of the definition above.

B. Carpentieri (UniBZ) Linear Algebra 20 / 54


Cartesian Products Functions Properties of Functions Sequences

Injective Functions Notes

4 Remark: a function F : X → Y is not one-to-one ⇔ ∃ elements x1 and x2 in X


with F (x1 ) = F (x2 ) and x1 6= x2 . This is illustrated below.

A one-to-one function separates points:

A function that is not one-to-one collapses points together:

B. Carpentieri (UniBZ) Linear Algebra 21 / 54

Cartesian Products Functions Properties of Functions Sequences

Injective Functions on Infinite Sets Notes

4 Now suppose f is a function defined on an infinite set X . By definition, f is


one-to-one if, and only if, the following universal statement is true:

∀x1 , x2 ∈ X , if f (x1 ) = f (x2 ) then x1 = x2 .

4 To prove that f is one-to-one, you will generally use the method of direct proof :

suppose x1 and x2 are elements of X such that f (x1 ) = f (x2 )


and show that x1 = x2 .

4 To show that f is not one-to-one, you will ordinarily

find elements x1 and x2 in X so that f (x1 ) = f (x2 ) but x1 6= x2

B. Carpentieri (UniBZ) Linear Algebra 22 / 54

Cartesian Products Functions Properties of Functions Sequences

Surjective Functions Notes

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.

4 A function is called onto or surjective if its range is equal to its co-domain.

B. Carpentieri (UniBZ) Linear Algebra 23 / 54

Cartesian Products Functions Properties of Functions Sequences

Surjective Functions Notes

4 A function F : X → Y is not onto ⇔ ∃y ∈ Y such that ∀x ∈ X , F (x) 6= y .

That is, there is some element in Y that is not the image of any element in X .

4 In terms of arrow diagrams: a function is onto if each element of the co-domain


has an arrow pointing to it from some element in the domain.

4 Therefore, in terms of arrow diagrams: a function is not onto if at least one


element in its co-domain does not have an arrow pointing to it.

B. Carpentieri (UniBZ) Linear Algebra 24 / 54


Cartesian Products Functions Properties of Functions Sequences

Surjective Functions Notes

4 A function that is onto :

4 A function that is not onto :

B. Carpentieri (UniBZ) Linear Algebra 25 / 54

Cartesian Products Functions Properties of Functions Sequences

Surjective Functions on Infinite Sets Notes

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:

∀y ∈ Y , ∃x ∈ X such that f (x) = y

4 Thus, to prove f is onto, you will ordinarily use the method of generalising from
the generic particular:

suppose that y is any element of Y and show that there is an


element x of X with f (x) = y .

4 To prove that f is not onto, you will usually:

find an element y of Y such that y 6= f (x) for any x in X

B. Carpentieri (UniBZ) Linear Algebra 26 / 54

Cartesian Products Functions Properties of Functions Sequences

Bijective Functions Notes

4 Let a function F : X → Y be both one-to-one (injective) and onto (surjective).

1. Since F is a function, given any element x in X , there is a unique element


y = F (x) in Y .
2. Since F is onto/surjective, given any element y in Y , there is an element x
in X such that F (x) = y , and
3. since F is one-to-one/injective, there is only one such x.

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 Such a pairing is called one-to-one correspondence or bijection and is


illustrated by the following arrow diagram.

B. Carpentieri (UniBZ) Linear Algebra 27 / 54

Cartesian Products Functions Properties of Functions Sequences

Bijective Functions Notes

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 .

B. Carpentieri (UniBZ) Linear Algebra 28 / 54


Cartesian Products Functions Properties of Functions Sequences

Inverse Functions Notes

4 If F is a bijection from a set X to a set Y , then we can define a function from Y


to X that “undoes” the actions of F . This function, called the inverse function
of F , sends each element of Y back to the element of X that it came from.

4 The proof follows immediately. Given an element y in Y , there is an element x in


X with f (x) = y because f is surjective; x is unique, because f is injective.

B. Carpentieri (UniBZ) Linear Algebra 29 / 54

Cartesian Products Functions Properties of Functions Sequences

Inverse Functions Notes

4 The following definition is given.

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:

B. Carpentieri (UniBZ) Linear Algebra 30 / 54

Cartesian Products Functions Properties of Functions Sequences

Function Composition Notes

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 In this larger machine, an integer n is first increased by 1 to obtain n + 1; then the


quantity n + 1 is squared to obtain (n + 1)2 .

4 Combining functions in this way is called composing them; the resulting function is
called the composition of two functions.

B. Carpentieri (UniBZ) Linear Algebra 31 / 54

Cartesian Products Functions Properties of Functions Sequences

Function Composition Notes


st
4 Functions can be composed only if the output of the 1 one is an acceptable input
to the 2nd one (the range of the 1st one is contained in the domain of the 2nd one).

4 The definition is shown schematically below:

B. Carpentieri (UniBZ) Linear Algebra 32 / 54


Cartesian Products Functions Properties of Functions Sequences

Example 9: Function Composition Notes

4 Exercise. let X = {1, 2, 3}, Y 0 = {a, b, c, d}, Y = {a, b, c, d, e}, and


Z = {x, y , z}. Define functions f : X → Y 0 and g : Y → Z by the arrow diagrams
below.

Draw the arrow diagram for the composition g ◦ f . What is the range of g ◦ f ?

B. Carpentieri (UniBZ) Linear Algebra 33 / 54

Cartesian Products Functions Properties of Functions Sequences

Solution to Example 5 Notes

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

(g ◦ f )(1) = g (f (1)) = g (c) = z


(g ◦ f )(2) = g (f (2)) = g (b) = y
(g ◦ f )(3) = g (f (3)) = g (a) = y

The range of g ◦ f is {y , z}.

B. Carpentieri (UniBZ) Linear Algebra 34 / 54

Cartesian Products Functions Properties of Functions Sequences

Outline Notes

Cartesian Products

Functions

Properties of Functions

Sequences

B. Carpentieri (UniBZ) Linear Algebra 35 / 54

Cartesian Products Functions Properties of Functions Sequences

Sequences Notes

4 We introduce the mathematical definition of a sequence:

4 We typically represent a sequence as a set of elements written in a row.


am , am+1 , am+2 , . . . , an ,
Each individual element ak of the sequence (read ”a sub k”) is called a term .

The k in ak is called a subscript or index , m (which may be any integer) is the


subscript of the initial term, and n ≥ m is called the subscript of the final term.

In such a finite sequence, the elements are ordered.

B. Carpentieri (UniBZ) Linear Algebra 36 / 54


Cartesian Products Functions Properties of Functions Sequences

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 It is possible that two different formulas can generate identical sequences


consisting of exactly the same terms. This is shown in the following example.

B. Carpentieri (UniBZ) Linear Algebra 37 / 54

Cartesian Products Functions Properties of Functions Sequences

Example 1: Sequences Notes

4 Exercise. Compute the first five terms of the sequences a1 , a2 , a3 , . . . and


b2 , b3 , b4 , . . . defined by the following explicit formulas:
k
ak = for all integers k ≥ 1,
k +1
i −1
bi = for all integers i ≥ 2.
i
4 Solution.
1 1 2−1 1
1. a1 = 1+1
= 2
b2 = 2
= 2
2 2 3−1 2
2. a2 = 2+1
= 3
b3 = 3
= 3
3 3 4−1 3
3. a3 = 3+1
= 4
b4 = 4
= 4
4 4 5−1 4
4. a4 = 4+1
= 5
b5 = 5
= 5
5 5 6−1 5
5. a5 = 5+1
= 6
b6 = 6
= 6

As we can see, the first terms of both sequences are 12 , 32 , 43 , 45 , and 56 .


In fact, it can be shown that all terms of both sequences are identical.

B. Carpentieri (UniBZ) Linear Algebra 38 / 54

Cartesian Products Functions Properties of Functions Sequences

Summation Notation Notes

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:

B. Carpentieri (UniBZ) Linear Algebra 39 / 54

Cartesian Products Functions Properties of Functions Sequences

Example 2: Summation Notation Notes

4 Exercise. Let a1 = −2, a2 = −1, a3 = 0, a4 = 1, a5 = 2. Compute the following:


P5
1. k=1 ak
P2
2. k=2 ak
P2
3. k=1 a2k

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

B. Carpentieri (UniBZ) Linear Algebra 40 / 54


Cartesian Products Functions Properties of Functions Sequences

Example 3: From Summation Notation to Expanded Form Notes

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

B. Carpentieri (UniBZ) Linear Algebra 41 / 54

Cartesian Products Functions Properties of Functions Sequences

Example 4: From Expanded Form to Summation Notation Notes

4 Exercise. Express the following sum using summation notation:

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

B. Carpentieri (UniBZ) Linear Algebra 42 / 54

Cartesian Products Functions Properties of Functions Sequences

Example 5: Separating and Adding the Final Term Notes

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

B. Carpentieri (UniBZ) Linear Algebra 43 / 54

Cartesian Products Functions Properties of Functions Sequences

Example 6: A Telescoping Sum Notes

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

B. Carpentieri (UniBZ) Linear Algebra 44 / 54


Cartesian Products Functions Properties of Functions Sequences

Product Notation Notes

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

B. Carpentieri (UniBZ) Linear Algebra 45 / 54

Cartesian Products Functions Properties of Functions Sequences

Example 6: Computing Products Notes

4 Exercise. Compute the following products:


Y 5
1. k
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

B. Carpentieri (UniBZ) Linear Algebra 46 / 54

Cartesian Products Functions Properties of Functions Sequences

Properties of Summations and Products Notes

4 The following theorem states general properties of summations and products.

B. Carpentieri (UniBZ) Linear Algebra 47 / 54

Cartesian Products Functions Properties of Functions Sequences

Example 7: Properties of Summations and Products Notes


4 Exercise: let ak = k + 1 and bk = k − 1 for all k ∈ Z. Write each of the following
expressions as a single summation or product:
n n n
! n
!
X X Y Y
(a) ak + 2 bk (b) ak · bk
k=m k=m k=m k=m

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

B. Carpentieri (UniBZ) Linear Algebra 48 / 54


Cartesian Products Functions Properties of Functions Sequences

Example 7: Properties of Summation and Product Notes

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

B. Carpentieri (UniBZ) Linear Algebra 49 / 54

Cartesian Products Functions Properties of Functions Sequences

Factorial and ‘n Choose r’ Notation Notes

4 The product of all consecutive integers up to a given integer occurs so often in


mathematics that it is given a special notation - factorial notation.

4 A recursive definition for factorial is the following: Given a nonnegative integer n


(
1, if n = 0
n! =
n · (n − 1)! if n ≥ 1.

4 Example: 5! = 5 · 4 · 3 · 2 · 1 = 120.

B. Carpentieri (UniBZ) Linear Algebra 50 / 54

Cartesian Products Functions Properties of Functions Sequences

Factorial and ‘n Choose r’ Notation Notes

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.

B. Carpentieri (UniBZ) Linear Algebra 51 / 54

Cartesian Products Functions Properties of Functions Sequences

Computing ‘n Choose r’ Notes

!
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

B. Carpentieri (UniBZ) Linear Algebra 52 / 54


Cartesian Products Functions Properties of Functions Sequences

Pascal’s triangle Notes

4 In mathematics, the expression: (x + y )n = (x + y ) · (x + y ) · . . . · (x + y ) can be


n
am x m y n−m where the coefficient am is for x m y n−m (with 0 ≤ m ≤ n)
P
written as
m=0 !
n
is called binomial coefficient and is denoted as .
m

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

B. Carpentieri (UniBZ) Linear Algebra 53 / 54

Cartesian Products Functions Properties of Functions Sequences

Computing ‘n choose r’ by hand Notes


!
n
Exercise. Use the formula for computing to evaluate the following expressions:
r
! ! !
8 4 n+1
(a) (b) (c)
5 0 n

!
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!


B. Carpentieri (UniBZ) Linear Algebra 54 / 54

Notes

Notes

You might also like