In the previous section, we completed a discussion on one-one and onto functions. In this section, we will see Composition of functions.
Composition of functions
Composition of functions can be explained using an example. It can be written in 8 steps:
1. The display board of a textile shop reads: 14% discount on all items.
2. A person wants to buy a shirt. The marked price of the shirt is Rs 400/-. He wants to know whether he can afford it. He has to consider both the discount and the tax. The tax is to be paid at the rate of 8%.
3. For solving this problem, first we consider the discount.
• We know that:
If x is the marked price, then the cost after 14% discount will be 0.86x
• We can write this as a function: f(x) = 0.86x
This function can be used for all items in that shop.
♦ Input ‘x’ is the marked price.
♦ Output ‘f(x)’ is the cost after discount.
• In our present case, we can put x1 = 400
So the cost after discount = f(x1) = 0.86 × 400 = 344
4. Next we consider the tax.
• We know that:
If x is the cost of an item, the payment to be made considering 8% tax will be 1.08x
• We can write this as a new function: g(x) = 1.08x
This function can be used for all items in that shop.
♦ Input ‘x’ is the cost after discount.
♦ Output ‘g(x)’ is the payment to be made.
♦ In our present case, we can put x2 = 344
So the payment = g(x2) = 1.08 × 344 = 371.52
5. Note that, we did two separate calculations:
(i) In the first calculation, we found out the cost after discount.
(ii) In the second calculation, we found out the payment to be made after considering the tax.
6. The two calculations can be done together. It can be explained in 4 steps:
(i) Output of the first function is the input of the second function.
• Output of the first function is 0.86x. Here x is the marked price.
(ii) So input of the second function is 0.86x
• The second function is: g(x) = 1.08x
So we get: g(0.86x) = 1.08(0.86x) = 0.9288x
• Check:
0.9288 × 400 = 371.52
This is the same result that we obtained in (4)
(iii) Now we can write the general form:
• From the above steps, it is clear that:
♦ Output of f
♦ is the
♦ Input of g
• Using symbols, this can be written in two ways:
♦ (g∘f)(x)
♦ g(f(x))
We can use any one of the above two ways. Both are read as "g of f of x"
(iv) Note that, the small circle between g and f should not be a filled circle. Then it would look like a dot. If it is a dot, then it means multiplication.
7. (g∘f)(x) is actually a function. It can be plotted just like any other function. The plot in our present case is the magenta line in fig.17.6 below:
Fig.17.6 |
An explanation of the graph can be written in 5 steps:
(i) Draw the three graphs:
♦ f(x) = 0.86x
♦ g(x) = 1.08x
♦ (g∘f)(x) = 0.9288x
(ii) We want the payment amount when the marked price is 400. So draw a vertical cyan dashed line through 400 on the x-axis.
• This vertical line meets f(x) at a point. Draw a horizontal cyan dashed line through this meeting point.
• This horizontal cyan dashed line meets the y-axis at 344. This is the price after discount.
(iii) We want the payment amount when the cost is 344. So draw a vertical brown dashed line through 344 on the x-axis.
• This vertical line meets g(x) at a point. Draw a horizontal brown dashed line through this point.
• This horizontal brown dashed line meets the y-axis at 371.52. This is the payment amount.
(iv) The horizontal cyan dashed line and vertical brown dashed line, together with the axes, form a square. Why?
(v) In practice, we need not plot f(x) and g(x). All we need is the plot of (g∘f)(x).
• This is because:
The vertical dashed line through 400 meets the magenta line at the white dot. The horizontal dashed line through this white dot meets the y-axis at the same 371.52.
8. (g∘f)(x) can be explained using set theory also. It can be written in 5 steps:
(i) We write set M which contains the marked prices of the various items in the shop. This is shown in fig.17.7(a) below:
Fig.17.7 |
(ii) Each element of M becomes input of the function f. The outputs are the costs after discount. These outputs become elements of set D. Let us see an example:
• 735 is an input for function f. We get: f(735) = 0.86 × 735 = 632.1
• So there is an arrow connecting 735 (in set M) and 632.1 (in set D).
• We can define the function f using sets M and D:
f: M→D defined as f(x) = 0.86x
(iii) Each element of D becomes input of the function g. The outputs are the payment amounts. These outputs become elements of set P. Let us see an example:
• 632.1 is an input for function g. We get: g(632.1) = 1.08 × 632.1 = 682.668
• So there is an arrow connecting 632.1 (in set D) and 682.668 (in set P).
• We can define the function g using sets D and P:
g: D→P defined as g(x) = 1.08x
(iv) Instead of applying two separate functions, we can apply the single function (g∘f). This is shown in fig.17.7(b) above. Let us see an example:
• (g∘f)(735) = 0.9288 × 735 = 682.668
We get the same result as above.
• We see an arrow directly connecting 725 (in set M) and 682.668 (in set P).
• We can define the function (g∘f) using sets M and P:
(g∘f): M→P defined as (g∘f)(x) = 0.9288x
• Note that, M is the domain of the first function and P is the codomain of the second function. So we can write:
The composite function connects the domain of the first function to the codomain of the second function.
(v) So it is clear that, by using composite functions, we can obtain the answers in a single step.
Solved example 17.15
Let f : {2, 3, 4, 5} → {3, 4, 5, 9} and g : {3, 4, 5, 9} → {7, 11, 15} be functions defined as:
f(2) = 3,
f(3) = 4,
f(4) = f(5) = 5
and
g(3) = g(4) = 7,
g(5) = g(9) = 11.
Find g∘f.
Solution:
1. We can name the given sets as shown below:
A = {2, 3, 4, 5}
B = {3, 4, 5, 9}
C = {7, 11, 15}
• So the functions can be indicated as:
f : A → B
g : B → C
2. The Venn diagram is shown in fig.17.8(a) below:
Fig.17.8 |
Let us see an example from the diagram.
• Given that, f(3) = 4,
So there is an arrow connecting 3 (in set A) and 4 (in set B).
• Given that, g(4) = 7,
So there is an arrow connecting 4 (in set B) and 7 (in set C).
3. By following the arrows in fig.a, we get the connection between elements in A and C. This is shown in fig.b above.
• So we can write:
(g∘f)(2) = 7
(g∘f)(3) = 7
(g∘f)(4) = 11
(g∘f)(5) = 11
Alternate method:
(g∘f) means, "output of f" is used as "input of g".
1. Given that, f(2) = 3
So output of f for the input 2 is 3
• This 3 is the input for g.
• Given that, g(3) = 7
So when the input for (g∘f) is 2, the output will be 7
We can write: (g∘f)(2) = 7
2. Given that, f(3) = 4
• Given that, g(4) = 7
So (g∘f)(3) = 7
3. Given that, f(4) = 5
• Given that, g(5) = 11
So (g∘f)(4) = 11
4. Given that, f(5) = 5
• Given that, g(5) = 11
So (g∘f)(5) = 11
Solved example 17.16
Find g∘f and f∘g, if f : R → R and g : R → R are given by f(x) = cos x and g(x) = 3x2 . Show that g∘f ≠ f∘g.
Solution:
Part (i): Finding g∘f
1. g∘f means, "output of f" is used as "input of g".
2. Output of f is cos x.
So we can write:
g∘f = g(cos x) = 3(cos x)2 = 3 cos2x
Part (ii): Finding f∘g
1. f∘g means, "output of g" is used as "input of f".
2. Output of g is 3x2.
So we can write:
f∘g = f(3x2) = cos (3x2)
Part (iii): proving that, g∘f ≠ f∘g
1. We have: g∘f = 3 cos2x
Put x = 0. We get:
g∘f = 3 cos20 = 3 × 12 = 3
2. We have f∘g = cos (3x2)
Put x = 0. We get:
f∘g = cos (3 × 0) = cos 0 = 1
3. So we can write: g∘f ≠ f∘g
Solved example 17.17
Show that,
• if $f: R- \left \{\frac{7}{5} \right\}~\to~R- \left \{\frac{3}{5} \right\}$ is defined by $f(x)~=~\frac{3x+4}{5x-7}$
• and $g: R- \left \{\frac{3}{5} \right\}~\to~R- \left \{\frac{7}{5} \right\}$ is defined by $f(x)~=~\frac{7x+4}{5x-3}$,
• then f∘g = IA and g∘f = IB,
• where
♦ $A = R- \left \{\frac{3}{5} \right\}$
♦ $B = R- \left \{\frac{7}{5} \right\}$
♦ $I_A (x) = x, \forall x \in A$
♦ $I_B (x) = x, \forall x \in B$
Solution:
Details about identity function can be seen here.
Part (i): To prove that (f∘g)(x) = IA(x).
1. First we find (f∘g)
• (f∘g) means, "output of g" is used as "input of f".
Output of g is $\frac{7x+4}{5x-3}$.
So we get:
$$\begin{array}{ll}{} &{(f \circ g)(x)} & {~=~} &{f \left(\frac{7x+4}{5x-3} \right)} &{} \\
{}
&{} & {~=~} &{\frac{3\left(\frac{7x+4}{5x-3}
\right)+4}{5\left(\frac{7x+4}{5x-3} \right)-3}} &{} \\
{} &{} & {~=~} &{\frac{21x+12 + 20x – 12}{35x + 20 -35x + 21}} &{} \\
{} &{} & {~=~} &{\frac{41x}{41}} &{} \\
{} &{} & {~=~} &{x} &{} \\
\end{array}
$$
2. We see that, (f∘g)(x) is an identity function. This is because, what ever input x we give, the output will be same as the input.
• But we need to specify the the set from which the input values can be taken. In other words, we need to specify the domain.
• We wrote that: $(f \circ g)(x)~=~f \left(\frac{7x+4}{5x-3} \right)$
• When x is $\frac{3}{5}$, the denominator will become zero. So x can be any real number other that $\frac{3}{5}$.
• That means, the domain is $R- \left \{\frac{3}{5} \right\}$
• But we are given that $A = R- \left \{\frac{3}{5} \right\}$.
So the domain is set A.
• We can write:
(f∘g)(x) is an identity function whose domain is A.
• Using symbols, we write this as:
(f∘g)(x) = IA(x).
Part (ii): To prove that (g∘f)(x) = IB(x)
1. First we find (g∘f)
• (g∘f) means, "output of f" is used as "input of g".
Output of f is $\frac{3x+4}{5x-7}$.
So we get:
$$\begin{array}{ll}{} &{(g \circ f)(x)} & {~=~} &{g \left(\frac{3x+4}{5x-7} \right)} &{} \\
{} &{} & {~=~} &{\frac{7\left(\frac{3x+4}{5x-7} \right)+4}{5\left(\frac{3x+4}{5x-7} \right)-3}} &{} \\
{} &{} & {~=~} &{\frac{21x+28 + 20x – 28}{15x + 20 -15x + 21}} &{} \\
{} &{} & {~=~} &{\frac{41x}{41}} &{} \\
{} &{} & {~=~} &{x} &{} \\
\end{array}
$$
2. We see that, (g∘f)(x) is an identity function. This is because, what ever input x we give, the output will be same as the input.
• But we need to specify the the set from which the input values can be taken. In other words, we need to specify the domain.
• We wrote that: $(g \circ f)(x)~=~g \left(\frac{3x+4}{5x-7} \right)$
• When x is $\frac{7}{5}$, the denominator will become zero. So x can be any real number other that $\frac{7}{5}$.
• That means, the domain is $R- \left \{\frac{7}{5} \right\}$
• But we are given that $B = R- \left \{\frac{7}{5} \right\}$.
So the domain is set B.
• We can write:
(g∘f)(x) is an identity function whose domain is B.
• Using symbols, we write this as:
(g∘f)(x) = IB(x)
In the next section, we will see a few more solved examples. We will also see some important properties of composite functions.
No comments:
Post a Comment