Combinations and Compositions of Functions: Learn It 2

Create a Function by Composition of Functions

Suppose we want to calculate how much it costs to heat a house on a particular day of the year. The cost to heat a house will depend on the average daily temperature, and in turn, the average daily temperature depends on the particular day of the year. Notice how we have just defined two relationships: The cost depends on the temperature, and the temperature depends on the day.

Explanation of C(T(5)), which is the cost for the temperature and T(5) is the temperature on day 5.

The process of combining functions so that the output of one function becomes the input of another is known as a composition of functions. The resulting function is known as a composite function.

composite function

The composition of functions is a way of combining two functions to form a new function.

 

If we have two functions [latex]f[/latex] and [latex]g[/latex], the composition of [latex]f[/latex] and [latex]g[/latex], written as [latex]f\circ g[/latex], is defined by:

[latex](f \circ g)(x) = f(g(x))[/latex]

 

We read the left-hand side as “[latex]f[/latex] composed with [latex]g[/latex] at [latex]x[/latex], ” and the right-hand side as “[latex]f[/latex] of [latex]g[/latex] of [latex]x[/latex].”

 

The domain of [latex]f\circ g[/latex] is the set of all [latex]x[/latex] in the domain of [latex]g[/latex] such that [latex]g(x)[/latex] is in the domain of [latex]f[/latex]. In other words, [latex]x[/latex] must satisfy both the domain requirements of [latex]g[/latex] and the domain requirements of [latex]f(g(x))[/latex]

The open circle symbol [latex]\circ[/latex] is called the composition operator. We use this operator mainly when we wish to emphasize the relationship between the functions themselves without referring to any particular input value.
The function [latex]c\left(s\right)[/latex] gives the number of calories burned completing [latex]s[/latex] sit-ups, and [latex]s\left(t\right)[/latex] gives the number of sit-ups a person can complete in [latex]t[/latex] minutes. Interpret [latex]c\left(s\left(3\right)\right)[/latex].

Note that the range of the inside function (the first function to be evaluated) needs to be within the domain of the outside function. Less formally, the composition has to make sense in terms of inputs and outputs. Additionally, in applied settings, function composition usually only makes sense in one specific order.

Suppose [latex]f\left(x\right)[/latex] gives miles that can be driven in [latex]x[/latex] hours and [latex]g\left(y\right)[/latex] gives the gallons of gas used in driving [latex]y[/latex] miles. Which of these expressions is meaningful: [latex]f\left(g\left(y\right)\right)[/latex] or [latex]g\left(f\left(x\right)\right)?[/latex]

It is also important to understand the order of operations in evaluating a composite function. We follow the usual convention with parentheses by starting with the innermost parentheses first, and then working to the outside.

Explanation of the composite function. g(x), the output of g is the input of f. X is the input of g.

In general [latex]f\circ g[/latex] and [latex]g\circ f[/latex] are different functions. In other words in many cases [latex]f\left(g\left(x\right)\right)\ne g\left(f\left(x\right)\right)[/latex] for all [latex]x[/latex].
Given [latex]f(x) = x^2[/latex] and [latex]g(x) = x + 2[/latex], find [latex]f\circ g[/latex] and [latex]g\circ f[/latex]. Also, find its domain.

It’s important to remember that function composition is not the same as multiplication of functions. When we compose two functions, we are plugging one function into another, not multiplying their outputs.

[latex](f \circ g)(x) \ne (f \cdot g)(x)[/latex]

Given [latex]f(x) = x-3[/latex] and [latex]g(x) = \sqrt{x}[/latex], find [latex](f \circ g)(x)[/latex] and its domain.