The idea behind composite functions is best explained with an example.
Let's think about the function given by $f\left(x\right)=2x+1$f(x)=2x+1. We understand that the function takes values of $x$x in the domain and maps them to values $y=2x+1$y=2x+1 in the range.
Suppose however that this is only the first part of a two-stage treatment of $x$x. We now take these function values and map them using another function, say $g\left(x\right)=x^2$g(x)=x2. This means that the $y$y values given by $\left(2x+1\right)$(2x+1) become the squared values $\left(2x+1\right)^2$(2x+1)2. The diagram below captures the idea.
The output, or function values, of the function $f\left(x\right)$f(x) have become the input, or $x$x values, of the function $g\left(x\right)$g(x). We can describe the complete two-stage process by the expression $g\left(f\left(x\right)\right)$g(f(x)). This is sometimes written as $(g\circ f)(x)$(g∘f)(x).
Algebraically, we can write $g\left(f\left(x\right)\right)=g\left(2x+1\right)=\left(2x+1\right)^2$g(f(x))=g(2x+1)=(2x+1)2.
Note that if we reversed the order of the two-stage processing, we would, in this instance, develop a different composite function. Here, $f\left(g\left(x\right)\right)=(f\circ g)(x)=f\left(x^2\right)=2\left(x^2\right)+1=2x^2+1$f(g(x))=(f∘g)(x)=f(x2)=2(x2)+1=2x2+1.
Using our understanding of function notation and evaluation, we are able to create and simplify the equations of composite functions as well as evaluate substitutions into them.
Consider the functions $f\left(x\right)=-2x-3$f(x)=−2x−3 and $g\left(x\right)=-2x-6$g(x)=−2x−6.
Find $f\left(7\right)$f(7).
Hence, or otherwise, evaluate $g\left(f\left(7\right)\right)$g(f(7)).
Now find $g\left(7\right)$g(7).
Hence, evaluate $f\left(g\left(7\right)\right)$f(g(7)).
Is it true that $f\left(g\left(x\right)\right)=g\left(f\left(x\right)\right)$f(g(x))=g(f(x)) for all $x$x?
Yes
No
Find the composite function $f\left(g\left(x\right)\right)$f(g(x)) given that $f\left(x\right)=\sqrt{x}$f(x)=√x and $g\left(x\right)=4x-3$g(x)=4x−3.
Consider the functions $f\left(x\right)=4x-6$f(x)=4x−6 and $g\left(x\right)=2x-1$g(x)=2x−1.
The function $r\left(x\right)$r(x) is defined as $r\left(x\right)=f\left(x^2\right)$r(x)=f(x2). Define $r\left(x\right)$r(x).
Using the results of the previous part, define $q\left(x\right)$q(x), which is $g\left(f\left(x^2\right)\right)$g(f(x2)).