Suppose that \(y\) is a function of \(x\) and that \(x\), in turn, is a function of \(t\).

For example, let \(y = 5x - 2\) and let \(x = 3 - 2t\). Then, using the principle that equals may be substituted for each other, we arrive at the conclusion that \(y = 5( 3 - 2t ) - 2\). Simplifying the equation then yields the fact that \(y = 13 - 10t\). Thus, \(y\) is a function of \(t\).

Stated as a general principle, if \(y\) is a function of \(x\) and \(x\) is a function of \(t\), then \(y\) is also a function of \(t\).

This is called the principle of **Composition of Functions**, and it follows from the defining characteristic of all functions--that there is only one output number for any given input number. For any given input number \(t\), there is only one output number \(x\), and for any given input number \(x\), there is only one output number \(y\), thus it follows that for any given input number \(t\), there is only one output number \(y\). Thus \(y\) is a function of \(t\) .

Stated in this way, the principle of composition of functions is fairly easy to understand. Furthermore, we can see how it involves the principle of substitution of equals for equals.

Now we need to integrate the principle of composition with the idea of function notation.

In many contexts, all input numbers will be denoted by the variable \(x\) and all output numbers by the variable \(y\), using function notation to distinguish the different functions. In this context, the two functions in the example above would be written as \(y = 5x - 2\) and \(y = 3 - 2x\). We could distinguish between the two by naming the first function \(f\) and the second function \(g\). Thus we could write \(f ( x ) = 5x - 2\) and \(g( x ) = 3 - 2x\). How would the principle of composition apply in the context of function notation?

In the original example, we put the output of the second function into the first function. That's exactly what we will do now. The only difference now is that the output of the second function is the number \(g(x)\). So we want to put \(g(x)\) into \(f(x)\). That is, we want to find \(f(g(x) )\) . Now this is where many students become confused. What does \(f( g(x) )\) mean? Here is where the idea of the blank parenthesis form of a function comes to the rescue. First write the function \(f\) in blank parenthesis form: \(f(~~) = 5(~~) - 2\) . Next, place \(g(x)\) inside each blank parenthesis. This gives us \(f( g(x) ) = 5( g(x) ) - 2\) . Then we use the principle of substitution of equals for equals to replace the \(g(x)\) on the right side of the equation with \(3 - 2x\). This gives us the result \(f( g(x) ) = 5( 3 - 2x) - 2 = 13 - 10x\).

Now \(f ( g(x) )\) is the composition of the functions \(f\) and \(g\), and there is a special symbol \(\circ\) called the **composition** symbol to indicate the composition operation.

Definition: \((f \circ g)(x) = f ( g(x) )\).

For the following exercises, find and simplify the formula for \((f \circ g)(x)\) .

Recall that the domain of a function is the set of all input numbers and the range is the set of all output numbers. Thus the domain of (\(f \circ g)\) will always be a subset of the domain of \(g\). No number can be an input number for \((f \circ g)\) unless it is first an input number of \(g\). In exercise 1.5.2, the domain of \(g\) is the set of all real numbers. But in exercise 1.5.3, the domain of \(g\) is the set of all non-negative real numbers. So for exercise 1.5.2, \((f \circ g)(x) = |x|\) for every real number \(x\), whereas in exercise 1.5.3, \((f \circ g)(x) = x\) for \(x \ge 0\). The domains are different, \((-\infty,\infty)\) versus \([0,\infty)\).

For the final two exercises, find the formula for \((f \circ g)(x)\) and specify the implicit domain using interval notation.