Professional Documents
Culture Documents
4 Composition of Functions
1. Combining functions: We have looked at many ways of com-
bining functions: adding, subtracting, multiplying, dividing.
(b) (f · g)(2) =
f
(c) (3) =
g
1
3. Another kind of combination is composition of func-
tions.
We have already looked at examples of this, where
we take one function of x, then another function of the result.
This is called composition of functions.
Problem: If f (x) = x2 and g(x) = 2x what is g(f (3))?
2
4. Example: Finding the composition g(f (x)).
The order here is: first do f , then calculate g of the result. Since
f (x) = x2
then
g(f (x)) =
Now we can answer: what is g(f (3))?
3
5. Two questions:
(a) Question: Can we always do this? Do f ◦ g and g ◦ f make
sense?
Example: If
f (x) = −x2
and
√
g(x) = x
when is g ◦ f defined?
First we find (g ◦ f )(x):
4
(b) Question: Is it true that
g◦f =f ◦g ?
Usually not.
In the example we just looked at
f (x) = −x2
and
√
g(x) = x
what is
f ◦g ?
5
6. Composition of Functions: closed interval case.
Let f : [a, b] → [c, d] and g : [c, d] → R be two functions.
We define a new function F = [a, b] → R by
F (x) = g(f (x)), x ∈ [a, b].
The function F is called the composition of g and f and it
is denoted by F = g ◦ f .
Figure 1: The function composition of the functions f and g associates x from the domain of f
with g(f (x)) from the range of g.
6
7. Example: If f (x) = x2 and g(x) = 2x what is g(f (3))? What
is f (g(3))?
1
(b) f (x) = 2x + 1 and g(x) =
x
7
Dollars to Pounds to Euros
9. You fly from YVR to Paris through London. You want to take
advantage of the shopping at London’s Heathrow airport, so you
decide to buy some pounds. After you are done shopping, you
still (amazingly) have some pounds, and you buy Euros with
them to spend in Paris.
The conversion rates used by the exchange company Travelex
are: 1 CAD buys 0.62 GBP, with a 2 dollar flat fee; and 1 GBP
buys 1.10 EUR with a 1 GBP flat fee.
(a) Write a function P = f (D) giving the cost of P pounds in D
dollars, and a function E = g(P ) giving the cost of E euros
in pounds.
(b) Is the function expressing the conversion of dollars to euros
f ◦ g or g ◦ f ? What is a formula for conversion from dollars
to euros (via pounds in the way described)?
(c) How many Euros do you get for $100 doing the exchange in
this way?
(d) Realistically you would probably just use a credit card, wouldn’t
you? But this is a math question.
8
10. Decomposition of functions: The process of breakdown of
a composite function into less complicated functions.
Outside:
Composition:
9
(b) G(x) = 3x2 + 1
10
12. Identity function: The identity function is the function
I defined by
I(x) = x
for every real number x.
11
14. Definition: Linear function. A linear function is a func-
tion of the form
f (x) = mx + b
where m and b are any real numbers.
15. Examples: Which of the following functions is NOT linear:
(a) I(x) = x
(b) f (x) = −2x + 3
(c) g(x) = x2 + 1
(d) h(x) = −1
12
16. Four graphs:
13
17. Exercise: Prove that the composition of two linear functions a
linear function.
The word prove means: give a mathematical argument using the
definition of a linear function and the definition of composition
to show that you have to get a linear function when you take the
composition of two linear functions.
That is, you need to show that if f is a linear function and g is
a linear function, then f ◦ g is a linear function.
Start by answering: How do you write a general linear function
mathematically? (Hint: it’s on a slide before this one.)
14