{"id":13685,"date":"2018-08-23T22:38:48","date_gmt":"2018-08-23T22:38:48","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/precalcone\/?post_type=chapter&#038;p=13685"},"modified":"2026-01-23T17:35:18","modified_gmt":"2026-01-23T17:35:18","slug":"composition-of-functions","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/precalculus\/chapter\/composition-of-functions\/","title":{"raw":"Composition of Functions","rendered":"Composition of Functions"},"content":{"raw":"<div class=\"bcc-box bcc-highlight\">\r\n<h3>Learning Outcomes<\/h3>\r\n<ul>\r\n \t<li>Combine functions using algebraic operations.<\/li>\r\n \t<li>Create a new function by composition of functions.<\/li>\r\n \t<li>Evaluate composite functions.<\/li>\r\n \t<li>Find the domain of a composite function.<\/li>\r\n \t<li>Decompose a composite function into its component functions.<\/li>\r\n<\/ul>\r\n<\/div>\r\n<p id=\"fs-id1165134094620\">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.<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"487\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010513\/CNX_Precalc_Figure_01_04_0062.jpg\" alt=\"Explanation of C(T(5)), which is the cost for the temperature and T(5) is the temperature on day 5.\" width=\"487\" height=\"140\" \/> <b>Figure 1<\/b>[\/caption]\r\n<p id=\"fs-id1165134038788\">Using descriptive variables, we can notate these two functions. The function [latex]C\\left(T\\right)[\/latex] gives the cost [latex]C[\/latex] of heating a house for a given average daily temperature in [latex]T[\/latex] degrees Celsius. The function [latex]T\\left(d\\right)[\/latex] gives the average daily temperature on day [latex]d[\/latex] of the year. For any given day, [latex]\\text{Cost}=C\\left(T\\left(d\\right)\\right)[\/latex] means that the cost depends on the temperature, which in turns depends on the day of the year. Thus, we can evaluate the cost function at the temperature [latex]T\\left(d\\right)[\/latex]. For example, we could evaluate [latex]T\\left(5\\right)[\/latex] to determine the average daily temperature on the 5th day of the year. Then, we could evaluate the <strong>cost function<\/strong> at that temperature. We would write [latex]C\\left(T\\left(5\\right)\\right)[\/latex].<span id=\"fs-id1165137424478\">\r\n<\/span><\/p>\r\n<p id=\"fs-id1165137460512\">By combining these two relationships into one function, we have performed function composition, which is the focus of this section.<\/p>\r\n\r\n<h2>Combining Functions Using Algebraic Operations<\/h2>\r\n<p id=\"fs-id1165137446477\">Function composition is only one way to combine existing functions. Another way is to carry out the usual algebraic operations on functions, such as addition, subtraction, multiplication and division. We do this by performing the operations with the function outputs, defining the result as the output of our new function.<\/p>\r\n<p id=\"fs-id1165135533159\">Suppose we need to add two columns of numbers that represent a husband and wife\u2019s separate annual incomes over a period of years, with the result being their total household income. We want to do this for every year, adding only that year\u2019s incomes and then collecting all the data in a new column. If [latex]w\\left(y\\right)[\/latex] is the wife\u2019s income and [latex]h\\left(y\\right)[\/latex] is the husband\u2019s income in year [latex]y[\/latex], and we want [latex]T[\/latex] to represent the total income, then we can define a new function.<\/p>\r\n\r\n<div id=\"fs-id1165137641862\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]T\\left(y\\right)=h\\left(y\\right)+w\\left(y\\right)[\/latex]<\/div>\r\n<p id=\"fs-id1165135347766\">If this holds true for every year, then we can focus on the relation between the functions without reference to a year and write<\/p>\r\n\r\n<div id=\"fs-id1165137665765\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]T=h+w[\/latex]<\/div>\r\n<p id=\"fs-id1165132957142\">Just as for this sum of two functions, we can define difference, product, and ratio functions for any pair of functions that have the same kinds of inputs (not necessarily numbers) and also the same kinds of outputs (which do have to be numbers so that the usual operations of algebra can apply to them, and which also must have the same units or no units when we add and subtract). In this way, we can think of adding, subtracting, multiplying, and dividing functions.<\/p>\r\n<p id=\"fs-id1165137424116\">For two functions [latex]f\\left(x\\right)[\/latex] and [latex]g\\left(x\\right)[\/latex] with real number outputs, we define new functions [latex]f+g,f-g,fg[\/latex], and [latex]\\frac{f}{g}[\/latex] by the relations<\/p>\r\n\r\n<div id=\"fs-id1165137543139\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]\\begin{gathered}\\left(f+g\\right)\\left(x\\right)=f\\left(x\\right)+g\\left(x\\right) \\\\[2mm] \\left(f-g\\right)\\left(x\\right)=f\\left(x\\right)-g\\left(x\\right) \\\\[2mm] \\left(fg\\right)\\left(x\\right)=f\\left(x\\right) \\cdot g\\left(x\\right) \\\\[2mm] \\left(\\frac{f}{g}\\right)\\left(x\\right)=\\frac{f\\left(x\\right)}{g\\left(x\\right)} \\\\[5mm]\\text{ } \\end{gathered}[\/latex]<\/div>\r\n<div id=\"Example_01_04_01\" class=\"example\">\r\n<div id=\"fs-id1165137585443\" class=\"exercise\">\r\n<div id=\"fs-id1165137573272\" class=\"problem textbox shaded\">\r\n<h3>Example 1: Performing Algebraic Operations on Functions<\/h3>\r\n<p id=\"fs-id1165135304963\">Find and simplify the functions [latex]\\left(g-f\\right)\\left(x\\right)[\/latex] and [latex]\\left(\\frac{g}{f}\\right)\\left(x\\right)[\/latex], given [latex]f\\left(x\\right)=x - 1[\/latex] and [latex]g\\left(x\\right)={x}^{2}-1[\/latex]. Are they the same function?<\/p>\r\n[reveal-answer q=\"516326\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"516326\"]\r\n<p id=\"fs-id1165137466263\">Begin by writing the general form, and then substitute the given functions.<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{align}\\left(g-f\\right)\\left(x\\right)&amp;=g\\left(x\\right)-f\\left(x\\right) \\\\[1.5mm] &amp;={x}^{2}-1-\\left(x - 1\\right)\\\\[1.5mm] &amp;={x}^{2}-x \\\\[1.5mm] &amp;=x\\left(x - 1\\right) \\end{align}[\/latex]\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 [latex]\\begin{align} \\left(\\frac{g}{f}\\right)\\left(x\\right)&amp;=\\frac{g\\left(x\\right)}{f\\left(x\\right)} \\\\[1.5mm] &amp;=\\frac{{x}^{2}-1}{x - 1}\\\\[1.5mm] &amp;=\\frac{\\left(x+1\\right)\\left(x - 1\\right)}{x - 1}\\text{ where }x\\ne 1 \\\\[1.5mm] &amp;=x+1 \\end{align}[\/latex]<\/p>\r\n<p id=\"fs-id1165137553743\">No, the functions are not the same.<\/p>\r\n<p id=\"fs-id1165135351612\">Note: For [latex]\\left(\\frac{g}{f}\\right)\\left(x\\right)[\/latex], the condition [latex]x\\ne 1[\/latex] is necessary because when [latex]x=1[\/latex], the denominator is equal to 0, which makes the function undefined.<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div class=\"bcc-box bcc-success\">\r\n<h3 id=\"fs-id1165135333576\">Try It<\/h3>\r\nFind and simplify the functions [latex]\\left(fg\\right)\\left(x\\right)[\/latex] and [latex]\\left(f-g\\right)\\left(x\\right)[\/latex].\r\n<div id=\"fs-id1165137434994\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]f\\left(x\\right)=x - 1\\text{ and }g\\left(x\\right)={x}^{2}-1[\/latex]<\/div>\r\n<p id=\"fs-id1165137434911\">Are they the same function?<\/p>\r\n[reveal-answer q=\"34616\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"34616\"]\r\n\r\n[latex]\\left(fg\\right)\\left(x\\right)=f\\left(x\\right)\\cdot g\\left(x\\right)=\\left(x - 1\\right)\\left({x}^{2}-1\\right)={x}^{3}-{x}^{2}-x+1\\\\[4mm] \\left(f-g\\right)\\left(x\\right)=f\\left(x\\right)-g\\left(x\\right)=\\left(x - 1\\right)-\\left({x}^{2}-1\\right)=x-{x}^{2}[\/latex]\r\n\r\nNo, the functions are not the same.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<h2 id=\"fs-id1165137619426\" class=\"solution\">Create a Function by Composition of Functions<\/h2>\r\nPerforming algebraic operations on functions combines them into a new function, but we can also create functions by composing functions. When we wanted to compute a heating cost from a day of the year, we created a new function that takes a day as input and yields a cost as output. 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. We represent this combination by the following notation:\r\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)=f\\left(g\\left(x\\right)\\right)[\/latex]<\/p>\r\nWe 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]\r\n\r\nThe two sides of the equation above have the same mathematical meaning and are equal. 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. Composition is a binary operation that takes two functions and forms a new function, much as addition or multiplication takes two numbers and gives a new number. However, it is important not to confuse function composition with multiplication because, as we learned above, in most cases [latex]f\\left(g\\left(x\\right)\\right)\\ne f\\left(x\\right)g\\left(x\\right)[\/latex].\r\n\r\nIt 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. In the equation above, the function [latex]g[\/latex] takes the input [latex]x[\/latex] first and yields an output [latex]g\\left(x\\right)[\/latex]. Then the function [latex]f[\/latex] takes [latex]g\\left(x\\right)[\/latex] as an input and yields an output [latex]f\\left(g\\left(x\\right)\\right)[\/latex].\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"487\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010513\/CNX_Precalc_Figure_01_04_0012.jpg\" alt=\"Explanation of the composite function. g(x), the output of g is the input of f. X is the input of g.\" width=\"487\" height=\"171\" \/> <b>Figure 2<\/b>[\/caption]\r\n\r\n<div class=\"note precalculus try\">\r\n\r\nIn 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]. We will also see that sometimes two functions can be composed only in one specific order.\r\n\r\nFor example, if [latex]f\\left(x\\right)={x}^{2}[\/latex] and [latex]g\\left(x\\right)=x+2[\/latex], then\r\n<p style=\"text-align: center;\">[latex]\\begin{align}f\\left(g\\left(x\\right)\\right)&amp;=f\\left(x+2\\right) \\\\ &amp;={\\left(x+2\\right)}^{2} \\\\ &amp;={x}^{2}+4x+4 \\end{align}[\/latex]<\/p>\r\n<p style=\"text-align: left;\">but<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{align} g\\left(f\\left(x\\right)\\right)&amp;=g\\left({x}^{2}\\right)\\\\ &amp;={x}^{2}+2 \\end{align}[\/latex]<\/p>\r\nThese expressions are not equal for all values of [latex]x[\/latex], so the two functions are not equal.\r\n\r\nNote 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.\r\n<div class=\"textbox\">\r\n<h3>A General Note: Composition of Functions<\/h3>\r\nWhen the output of one function is used as the input of another, we call the entire operation a composition of functions. For any input [latex]x[\/latex] and functions [latex]f[\/latex] and [latex]g[\/latex], this action defines a composite function, which we write as [latex]f\\circ g[\/latex] such that\r\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)=f\\left(g\\left(x\\right)\\right)[\/latex]<\/p>\r\nThe domain of the composite function [latex]f\\circ g[\/latex] is all [latex]x[\/latex] such that [latex]x[\/latex] is in the domain of [latex]g[\/latex] and [latex]g\\left(x\\right)[\/latex] is in the domain of [latex]f[\/latex].\r\n\r\nIt is important to realize that the product of functions [latex]fg[\/latex] is not the same as the function composition [latex]f\\left(g\\left(x\\right)\\right)[\/latex], because, in general, [latex]f\\left(x\\right)g\\left(x\\right)\\ne f\\left(g\\left(x\\right)\\right)[\/latex].\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example 2: Determining whether Composition of Functions is Commutative<\/h3>\r\nUsing the functions below, find [latex]f\\left(g\\left(x\\right)\\right)[\/latex] and [latex]g\\left(f\\left(x\\right)\\right)[\/latex]. Determine whether the composition of the functions is commutative.\r\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=2x+1[\/latex]\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 [latex]g\\left(x\\right)=3-x[\/latex]<\/p>\r\n[reveal-answer q=\"513486\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"513486\"]\r\n\r\nLet\u2019s begin by substituting [latex]g\\left(x\\right)[\/latex] into [latex]f\\left(x\\right)[\/latex].\r\n<p style=\"text-align: center;\">[latex]\\begin{align}f\\left(g\\left(x\\right)\\right)&amp;=2\\left(3-x\\right)+1 \\\\ &amp;=6 - 2x+1 \\\\ &amp;=7 - 2x \\end{align}[\/latex]<\/p>\r\n<p style=\"text-align: left;\">Now we can substitute [latex]f\\left(x\\right)[\/latex] into [latex]g\\left(x\\right)[\/latex].<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{align}g\\left(f\\left(x\\right)\\right)&amp;=3-\\left(2x+1\\right) \\\\ &amp;=3 - 2x - 1 \\\\ &amp;=-2x+2 \\end{align}[\/latex]<\/p>\r\nWe find that [latex]g\\left(f\\left(x\\right)\\right)\\ne f\\left(g\\left(x\\right)\\right)[\/latex], so the operation of function composition is not commutative.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example 3: Interpreting Composite Functions<\/h3>\r\nThe 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].\r\n\r\n[reveal-answer q=\"813025\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"813025\"]\r\n\r\nThe inside expression in the composition is [latex]s\\left(3\\right)[\/latex]. Because the input to the s-function is time, [latex]t=3[\/latex] represents 3 minutes, and [latex]s\\left(3\\right)[\/latex] is the number of sit-ups completed in 3 minutes.\r\n\r\nUsing [latex]s\\left(3\\right)[\/latex] as the input to the function [latex]c\\left(s\\right)[\/latex] gives us the number of calories burned during the number of sit-ups that can be completed in 3 minutes, or simply the number of calories burned in 3 minutes (by doing sit-ups).\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox shaded\">\r\n<h3>Example 4: Investigating the Order of Function Composition<\/h3>\r\nSuppose [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]\r\n\r\n[reveal-answer q=\"115223\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"115223\"]\r\n\r\nThe function [latex]y=f\\left(x\\right)[\/latex] is a function whose output is the number of miles driven corresponding to the number of hours driven.\r\n<p style=\"text-align: center;\">[latex]\\text{number of miles }=f\\left(\\text{number of hours}\\right)[\/latex]<\/p>\r\nThe function [latex]g\\left(y\\right)[\/latex] is a function whose output is the number of gallons used corresponding to the number of miles driven. This means:\r\n<p style=\"text-align: center;\">[latex]\\text{number of gallons }=g\\left(\\text{number of miles}\\right)[\/latex]<\/p>\r\nThe expression [latex]g\\left(y\\right)[\/latex] takes miles as the input and a number of gallons as the output. The function [latex]f\\left(x\\right)[\/latex] requires a number of hours as the input. Trying to input a number of gallons does not make sense. The expression [latex]f\\left(g\\left(y\\right)\\right)[\/latex] is meaningless.\r\n\r\nThe expression [latex]f\\left(x\\right)[\/latex] takes hours as input and a number of miles driven as the output. The function [latex]g\\left(y\\right)[\/latex] requires a number of miles as the input. Using [latex]f\\left(x\\right)[\/latex] (miles driven) as an input value for [latex]g\\left(y\\right)[\/latex], where gallons of gas depends on miles driven, does make sense. The expression [latex]g\\left(f\\left(x\\right)\\right)[\/latex] makes sense, and will yield the number of gallons of gas used, [latex]g[\/latex], driving a certain number of miles, [latex]f\\left(x\\right)[\/latex], in [latex]x[\/latex] hours.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox\">\r\n<h3>Q &amp; A<\/h3>\r\n<strong>Are there any situations where [latex]f\\left(g\\left(y\\right)\\right)[\/latex] and [latex]g\\left(f\\left(x\\right)\\right)[\/latex] would both be meaningful or useful expressions?<\/strong>\r\n\r\n<em>Yes. For many pure mathematical functions, both compositions make sense, even though they usually produce different new functions. In real-world problems, functions whose inputs and outputs have the same units also may give compositions that are meaningful in either order.<\/em>\r\n\r\n<\/div>\r\n<div class=\"bcc-box bcc-success\">\r\n<h3>Try It<\/h3>\r\nThe gravitational force on a planet a distance r from the sun is given by the function [latex]G\\left(r\\right)[\/latex]. The acceleration of a planet subjected to any force [latex]F[\/latex] is given by the function [latex]a\\left(F\\right)[\/latex]. Form a meaningful composition of these two functions, and explain what it means.\r\n\r\n[reveal-answer q=\"502863\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"502863\"]\r\n\r\nA gravitational force is still a force, so [latex]a\\left(G\\left(r\\right)\\right)[\/latex] makes sense as the acceleration of a planet at a distance r from the Sun (due to gravity), but [latex]G\\left(a\\left(F\\right)\\right)[\/latex] does not make sense.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<h2>Evaluating Composite Functions<\/h2>\r\n<p id=\"fs-id1165135168147\">Once we compose a new function from two existing functions, we need to be able to evaluate it for any input in its domain. We will do this with specific numerical inputs for functions expressed as tables, graphs, and formulas and with variables as inputs to functions expressed as formulas. In each case, we evaluate the inner function using the starting input and then use the inner function\u2019s output as the input for the outer function.<\/p>\r\n\r\n<section id=\"fs-id1165137760886\">\r\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Evaluating Composite Functions Using Tables<\/span><\/h2>\r\n<p id=\"fs-id1165137725253\">When working with functions given as tables, we read input and output values from the table entries and always work from the inside to the outside. We evaluate the inside function first and then use the output of the inside function as the input to the outside function.<\/p>\r\n\r\n<div id=\"Example_01_04_05\" class=\"example\">\r\n<div id=\"fs-id1165137416770\" class=\"exercise\">\r\n<div id=\"fs-id1165137465672\" class=\"problem textbox shaded\">\r\n<h3>Example 5: Using a Table to Evaluate a Composite Function<\/h3>\r\n<p id=\"fs-id1165135177664\">Using the table below,\u00a0evaluate [latex]f\\left(g\\left(3\\right)\\right)[\/latex] and [latex]g\\left(f\\left(3\\right)\\right)[\/latex].<\/p>\r\n\r\n<table id=\"Table_01_04_01\" summary=\"Five rows and three columns. The first column is labeled, \"><colgroup> <col \/> <col \/> <col \/><\/colgroup>\r\n<thead>\r\n<tr>\r\n<th>[latex]x[\/latex]<\/th>\r\n<th>[latex]f\\left(x\\right)[\/latex]<\/th>\r\n<th>[latex]g\\left(x\\right)[\/latex]<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>1<\/td>\r\n<td>6<\/td>\r\n<td>3<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>2<\/td>\r\n<td>8<\/td>\r\n<td>5<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>3<\/td>\r\n<td>3<\/td>\r\n<td>2<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>4<\/td>\r\n<td>1<\/td>\r\n<td>7<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n[reveal-answer q=\"542531\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"542531\"]\r\n<p id=\"fs-id1165135582221\">To evaluate [latex]f\\left(g\\left(3\\right)\\right)[\/latex], we start from the inside with the input value 3. We then evaluate the inside expression [latex]g\\left(3\\right)[\/latex] using the table that defines the function [latex]g:[\/latex] [latex]g\\left(3\\right)=2[\/latex]. We can then use that result as the input to the function [latex]f[\/latex], so [latex]g\\left(3\\right)[\/latex] is replaced by 2 and we get [latex]f\\left(2\\right)[\/latex]. Then, using the table that defines the function [latex]f[\/latex], we find that [latex]f\\left(2\\right)=8[\/latex].<\/p>\r\n<p style=\"text-align: center;\">[latex]g\\left(3\\right)=2[\/latex]<\/p>\r\n<p style=\"text-align: center;\">[latex]f\\left(g\\left(3\\right)\\right)=f\\left(2\\right)=8[\/latex]<\/p>\r\n<p id=\"fs-id1165134259282\">To evaluate [latex]g\\left(f\\left(3\\right)\\right)[\/latex], we first evaluate the inside expression [latex]f\\left(3\\right)[\/latex] using the first table: [latex]f\\left(3\\right)=3[\/latex]. Then, using the table for [latex]g[\/latex] we can evaluate<\/p>\r\n<p style=\"text-align: center;\">[latex]g\\left(f\\left(3\\right)\\right)=g\\left(3\\right)=2[\/latex]<\/p>\r\n<p id=\"fs-id1165134231482\">The table below shows the composite functions [latex]f\\circ g[\/latex] and [latex]g\\circ f[\/latex] as tables.<\/p>\r\n\r\n<table id=\"Table_01_04_02\" summary=\"Two rows and five columns. When x=3, g(3)=2, f(g(3))=8, f(3)=3, and g(f(3))=2.\"><colgroup> <col \/> <col \/> <col \/> <col \/> <col \/><\/colgroup>\r\n<tbody>\r\n<tr>\r\n<td>[latex]x[\/latex]<\/td>\r\n<td>[latex]g\\left(x\\right)[\/latex]<\/td>\r\n<td>[latex]f\\left(g\\left(x\\right)\\right)[\/latex]<\/td>\r\n<td>[latex]f\\left(x\\right)[\/latex]<\/td>\r\n<td>[latex]g\\left(f\\left(x\\right)\\right)[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>3<\/td>\r\n<td>2<\/td>\r\n<td>8<\/td>\r\n<td>3<\/td>\r\n<td>2<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div class=\"bcc-box bcc-success\">\r\n<h3 id=\"fs-id1165134297603\">Try It<\/h3>\r\nUsing the table below, evaluate [latex]f\\left(g\\left(1\\right)\\right)[\/latex] and [latex]g\\left(f\\left(4\\right)\\right)[\/latex].\r\n<table id=\"Table_01_04_01\" summary=\"Five rows and three columns. The first column is labeled, \"><colgroup> <col \/> <col \/> <col \/><\/colgroup>\r\n<thead>\r\n<tr>\r\n<th>[latex]x[\/latex]<\/th>\r\n<th>[latex]f\\left(x\\right)[\/latex]<\/th>\r\n<th>[latex]g\\left(x\\right)[\/latex]<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>1<\/td>\r\n<td>6<\/td>\r\n<td>3<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>2<\/td>\r\n<td>8<\/td>\r\n<td>5<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>3<\/td>\r\n<td>3<\/td>\r\n<td>2<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>4<\/td>\r\n<td>1<\/td>\r\n<td>7<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n[reveal-answer q=\"407008\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"407008\"]\r\n\r\n[latex]f\\left(g\\left(1\\right)\\right)=f\\left(3\\right)=3[\/latex] and [latex]g\\left(f\\left(4\\right)\\right)=g\\left(1\\right)=3[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/section><section id=\"fs-id1165137756068\">\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try it 4<\/h3>\r\n[ohm_question hide_question_numbers=1]165741[\/ohm_question]\r\n\r\n<\/div>\r\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Evaluating Composite Functions Using Graphs<\/span><\/h2>\r\n<p id=\"fs-id1165137428192\">When we are given individual functions as graphs, the procedure for evaluating composite functions is similar to the process we use for evaluating tables. We read the input and output values, but this time, from the [latex]x\\text{-}[\/latex] and [latex]y\\text{-}[\/latex] axes of the graphs.<\/p>\r\n\r\n<div id=\"fs-id1165137634364\" class=\"note precalculus howto textbox\">\r\n<h3 id=\"fs-id1165137660530\">How To: Given a composite function and graphs of its individual functions, evaluate it using the information provided by the graphs.<strong>\r\n<\/strong><\/h3>\r\n<ol id=\"fs-id1165133248553\">\r\n \t<li>Locate the given input to the inner function on the [latex]x\\text{-}[\/latex] axis of its graph.<\/li>\r\n \t<li>Read off the output of the inner function from the [latex]y\\text{-}[\/latex] axis of its graph.<\/li>\r\n \t<li>Locate the inner function output on the [latex]x\\text{-}[\/latex] axis of the graph of the outer function.<\/li>\r\n \t<li>Read the output of the outer function from the [latex]y\\text{-}[\/latex] axis of its graph. This is the output of the composite function.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<div id=\"fs-id1165137758196\" class=\"problem textbox shaded\">\r\n<h3>Example 6: Using a Graph to Evaluate a Composite Function<\/h3>\r\nUsing the graphs in Figure 3, evaluate [latex]f\\left(g\\left(1\\right)\\right)[\/latex].\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"975\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010513\/CNX_Precalc_Figure_01_04_002ab2.jpg\" alt=\"Explanation of the composite function.\" width=\"975\" height=\"543\" \/> <b>Figure 3<\/b>[\/caption]\r\n\r\n[reveal-answer q=\"516132\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"516132\"]\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"975\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010514\/CNX_Precalc_Figure_01_04_0042.jpg\" alt=\"Two graphs of a positive parabola (g(x)) and a negative parabola (f(x)). The following points are plotted: g(1)=3 and f(3)=6.\" width=\"975\" height=\"543\" \/> <b>Figure 4<\/b>[\/caption]\r\n<p id=\"fs-id1165135545948\">To evaluate [latex]f\\left(g\\left(1\\right)\\right)[\/latex], we start with the inside evaluation.<span id=\"fs-id1165137644158\">\r\n<\/span><\/p>\r\n<p id=\"fs-id1165137566106\">We evaluate [latex]g\\left(1\\right)[\/latex] using the graph of [latex]g\\left(x\\right)[\/latex], finding the input of 1 on the [latex]x\\text{-}[\/latex] axis and finding the output value of the graph at that input. Here, [latex]g\\left(1\\right)=3[\/latex]. We use this value as the input to the function [latex]f[\/latex].<\/p>\r\n<p style=\"text-align: center;\">[latex]f\\left(g\\left(1\\right)\\right)=f\\left(3\\right)[\/latex]<\/p>\r\n<p id=\"fs-id1165137831420\">We can then evaluate the composite function by looking to the graph of [latex]f\\left(x\\right)[\/latex], finding the input of 3 on the [latex]x\\text{-}[\/latex] axis and reading the output value of the graph at this input. Here, [latex]f\\left(3\\right)=6[\/latex], so [latex]f\\left(g\\left(1\\right)\\right)=6[\/latex].<\/p>\r\n\r\n<h4>Analysis of the Solution<\/h4>\r\nFigure 5\u00a0shows how we can mark the graphs with arrows to trace the path from the input value to the output value.\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"975\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010514\/CNX_Precalc_Figure_01_04_0052.jpg\" alt=\"Two graphs of a positive and negative parabola.\" width=\"975\" height=\"520\" \/> <b>Figure 5<\/b>[\/caption]\r\n\r\n[\/hidden-answer]<b><\/b><b><\/b>\r\n\r\n<\/div>\r\n<div class=\"bcc-box bcc-success\">\r\n<h3>Try It<\/h3>\r\n<p id=\"fs-id1165137423742\">Using Figure 6, evaluate [latex]g\\left(f\\left(2\\right)\\right)[\/latex].<\/p>\r\n\r\n\r\n[caption id=\"\" align=\"aligncenter\" width=\"975\"]<img src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010514\/CNX_Precalc_Figure_01_04_0042.jpg\" alt=\"Two graphs of a positive parabola (g(x)) and a negative parabola (f(x)). The following points are plotted: g(1)=3 and f(3)=6.\" width=\"975\" height=\"543\" \/> <b>Figure 6<\/b>[\/caption]\r\n\r\n[reveal-answer q=\"68844\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"68844\"]\r\n\r\n[latex]g\\left(f\\left(2\\right)\\right)=g\\left(5\\right)=3[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/section><section id=\"fs-id1165137452389\">\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\n[ohm_question hide_question_numbers=1]32890[\/ohm_question]\r\n\r\n<\/div>\r\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Evaluating Composite Functions Using Formulas<\/span><\/h2>\r\n<p id=\"fs-id1165137432176\">When evaluating a composite function where we have either created or been given formulas, the rule of working from the inside out remains the same. The input value to the outer function will be the output of the inner function, which may be a numerical value, a variable name, or a more complicated expression.<\/p>\r\n<p id=\"fs-id1165137567159\">While we can compose the functions for each individual input value, it is sometimes helpful to find a single formula that will calculate the result of a composition [latex]f\\left(g\\left(x\\right)\\right)[\/latex]. To do this, we will extend our idea of function evaluation. Recall that, when we evaluate a function like [latex]f\\left(t\\right)={t}^{2}-t[\/latex], we substitute the value inside the parentheses into the formula wherever we see the input variable.<\/p>\r\n\r\n<div id=\"fs-id1165137584280\" class=\"note precalculus howto textbox\">\r\n<h3 id=\"fs-id1165137676972\">How To: Given a formula for a composite function, evaluate the function.<strong>\r\n<\/strong><\/h3>\r\n<ol id=\"fs-id1165137564125\">\r\n \t<li>Evaluate the inside function using the input value or variable provided.<\/li>\r\n \t<li>Use the resulting output as the input to the outside function.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<div id=\"Example_01_04_07\" class=\"example\">\r\n<div id=\"fs-id1165134070851\" class=\"exercise\">\r\n<div id=\"fs-id1165134070853\" class=\"problem textbox shaded\">\r\n<h3>Example 7: Evaluating a Composition of Functions Expressed as Formulas with a Numerical Input<\/h3>\r\n<p id=\"fs-id1165137447886\">Given [latex]f\\left(t\\right)={t}^{2}-{t}[\/latex] and [latex]h\\left(x\\right)=3x+2[\/latex], evaluate [latex]f\\left(h\\left(1\\right)\\right)[\/latex].<\/p>\r\n[reveal-answer q=\"905220\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"905220\"]\r\n<p id=\"fs-id1165135528526\">Because the inside expression is [latex]h\\left(1\\right)[\/latex], we start by evaluating [latex]h\\left(x\\right)[\/latex] at 1.<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{align}h\\left(1\\right)&amp;=3\\left(1\\right)+2\\\\ &amp;=5\\end{align}[\/latex]<\/p>\r\n<p id=\"fs-id1165137445352\">Then [latex]f\\left(h\\left(1\\right)\\right)=f\\left(5\\right)[\/latex], so we evaluate [latex]f\\left(t\\right)[\/latex] at an input of 5.<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{align}f\\left(h\\left(1\\right)\\right)&amp;=f\\left(5\\right)\\\\ &amp;={5}^{2}-5\\\\ &amp;=20\\end{align}[\/latex]<\/p>\r\n\r\n<h4>Analysis of the Solution<\/h4>\r\n<p id=\"fs-id1165137714335\">It makes no difference what the input variables [latex]t[\/latex] and [latex]x[\/latex] were called in this problem because we evaluated for specific numerical values.<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div class=\"bcc-box bcc-success\">\r\n<h3>Try It<\/h3>\r\n<p id=\"fs-id1165134544990\">Given [latex]f\\left(t\\right)={t}^{2}-t[\/latex] and [latex]h\\left(x\\right)=3x+2[\/latex], evaluate<\/p>\r\n<p style=\"padding-left: 60px;\">A) [latex]h\\left(f\\left(2\\right)\\right)[\/latex]<\/p>\r\n<p style=\"padding-left: 60px;\">B) [latex]h\\left(f\\left(-2\\right)\\right)[\/latex]<\/p>\r\n[reveal-answer q=\"348291\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"348291\"]\r\n\r\nA. 8; B. 20\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\n[ohm_question hide_question_numbers=1]69935[\/ohm_question]\r\n\r\n<\/div>\r\n<h2>Finding the Domain of a Composite Function<\/h2>\r\n<p id=\"fs-id1165135519324\">As we discussed previously, the <strong>domain of a composite function<\/strong> such as [latex]f\\circ g[\/latex] is dependent on the domain of [latex]g[\/latex] and the domain of [latex]f[\/latex]. It is important to know when we can apply a composite function and when we cannot, that is, to know the domain of a function such as [latex]f\\circ g[\/latex]. Let us assume we know the domains of the functions [latex]f[\/latex] and [latex]g[\/latex] separately. If we write the composite function for an input [latex]x[\/latex] as [latex]f\\left(g\\left(x\\right)\\right)[\/latex], we can see right away that [latex]x[\/latex] must be a member of the domain of [latex]g[\/latex] in order for the expression to be meaningful, because otherwise we cannot complete the inner function evaluation. However, we also see that [latex]g\\left(x\\right)[\/latex] must be a member of the domain of [latex]f[\/latex], otherwise the second function evaluation in [latex]f\\left(g\\left(x\\right)\\right)[\/latex] cannot be completed, and the expression is still undefined. Thus the domain of [latex]f\\circ g[\/latex] consists of only those inputs in the domain of [latex]g[\/latex] that produce outputs from [latex]g[\/latex] belonging to the domain of [latex]f[\/latex]. Note that the domain of [latex]f[\/latex] composed with [latex]g[\/latex] is the set of all [latex]x[\/latex] such that [latex]x[\/latex] is in the domain of [latex]g[\/latex] and [latex]g\\left(x\\right)[\/latex] is in the domain of [latex]f[\/latex].<\/p>\r\n\r\n<div id=\"fs-id1165135547254\" class=\"note textbox\">\r\n<h3 class=\"title\">A General Note: Domain of a Composite Function<\/h3>\r\n<p id=\"fs-id1165135426375\">The domain of a composite function [latex]f\\left(g\\left(x\\right)\\right)[\/latex] is the set of those inputs [latex]x[\/latex] in the domain of [latex]g[\/latex] for which [latex]g\\left(x\\right)[\/latex] is in the domain of [latex]f[\/latex].<\/p>\r\n\r\n<\/div>\r\n<div id=\"fs-id1165137663970\" class=\"note precalculus howto textbox\">\r\n<h3 id=\"fs-id1165135203267\">How To: Given a function composition [latex]f\\left(g\\left(x\\right)\\right)[\/latex], determine its domain.<\/h3>\r\n<ol id=\"fs-id1165137714200\">\r\n \t<li>Find the domain of [latex]g[\/latex].<\/li>\r\n \t<li>Find the domain of [latex]f[\/latex].<\/li>\r\n \t<li>Find those inputs, [latex]x[\/latex],\u00a0in the domain of [latex]g[\/latex]\u00a0for which [latex]g(x)[\/latex]\u00a0is in the domain of [latex]f[\/latex]. That is, exclude those inputs, [latex]x[\/latex], from the domain of [latex]g[\/latex]\u00a0for which [latex]g(x)[\/latex]\u00a0is not in the domain of [latex]f[\/latex]. The resulting set is the domain of [latex]f\\circ g[\/latex].<\/li>\r\n<\/ol>\r\n<\/div>\r\n<div id=\"Example_01_04_08\" class=\"example\">\r\n<div id=\"fs-id1165137646695\" class=\"exercise\">\r\n<div id=\"fs-id1165137646697\" class=\"problem textbox shaded\">\r\n<h3>Example 8: Finding the Domain of a Composite Function<\/h3>\r\n<p id=\"fs-id1165135640630\">Find the domain of<\/p>\r\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)\\text{ where}f\\left(x\\right)=\\frac{5}{x - 1}\\text{ and }g\\left(x\\right)=\\frac{4}{3x - 2}[\/latex]<\/p>\r\n[reveal-answer q=\"262512\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"262512\"]\r\n<p id=\"fs-id1165137627922\">The domain of [latex]g\\left(x\\right)[\/latex] consists of all real numbers except [latex]x=\\frac{2}{3}[\/latex], since that input value would cause us to divide by 0. Likewise, the domain of [latex]f[\/latex] consists of all real numbers except 1. So we need to exclude from the domain of [latex]g\\left(x\\right)[\/latex] that value of [latex]x[\/latex] for which [latex]g\\left(x\\right)=1[\/latex].<\/p>\r\n<p style=\"text-align: center;\">[latex]\\begin{align}\\frac{4}{3x - 2}&amp;=1 \\\\ 4&amp;=3x - 2 &amp;&amp;\\text{Multiply by } 3x-2 \\\\ 6&amp;=3x &amp;&amp;\\text{Add }2 \\\\ x&amp;=2 &amp;&amp; \\text{Divide by }3 \\end{align}[\/latex]<\/p>\r\n<p id=\"fs-id1165137891240\">So the domain of [latex]f\\circ g[\/latex] is the set of all real numbers except [latex]\\frac{2}{3}[\/latex] and [latex]2[\/latex]. This means that<\/p>\r\n<p style=\"text-align: center;\">[latex]x\\ne \\frac{2}{3}\\text{or}x\\ne 2[\/latex]<\/p>\r\n<p id=\"fs-id1165135152098\">We can write this in interval notation as<\/p>\r\n<p style=\"text-align: center;\">[latex]\\left(-\\infty ,\\frac{2}{3}\\right)\\cup \\left(\\frac{2}{3},2\\right)\\cup \\left(2,\\infty \\right)[\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div id=\"Example_01_04_09\" class=\"example\">\r\n<div id=\"fs-id1165135353057\" class=\"exercise\">\r\n<div id=\"fs-id1165137444218\" class=\"problem textbox shaded\">\r\n<h3>Example 9: Finding the Domain of a Composite Function Involving Radicals<\/h3>\r\n<p id=\"fs-id1165135547426\">Find the domain of<\/p>\r\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)\\text{ where}f\\left(x\\right)=\\sqrt{x+2}\\text{ and }g\\left(x\\right)=\\sqrt{3-x}[\/latex]<\/p>\r\n[reveal-answer q=\"959136\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"959136\"]\r\n<p id=\"fs-id1165137812353\">Because we cannot take the square root of a negative number, the domain of [latex]g[\/latex] is [latex]\\left(-\\infty ,3\\right][\/latex]. Now we check the domain of the composite function<\/p>\r\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)=\\sqrt{3-x+2}\\text{ or }\\left(f\\circ g\\right)\\left(x\\right)=\\sqrt{5-x}[\/latex]<\/p>\r\n<p id=\"fs-id1165137871761\">The domain of this function is [latex]\\left(-\\infty ,5\\right][\/latex]. To find the domain of [latex]f\\circ g[\/latex], we ask ourselves if there are any further restrictions offered by the domain of the composite function. The answer is no, since [latex]\\left(-\\infty ,3\\right][\/latex] is a proper subset of the domain of [latex]f\\circ g[\/latex]. This means the domain of [latex]f\\circ g[\/latex] is the same as the domain of [latex]g[\/latex], namely, [latex]\\left(-\\infty ,3\\right][\/latex].<\/p>\r\n\r\n<h4>Analysis of the Solution<\/h4>\r\n<p id=\"fs-id1165135241313\">This example shows that knowledge of the range of functions (specifically the inner function) can also be helpful in finding the domain of a composite function. It also shows that the domain of [latex]f\\circ g[\/latex] can contain values that are not in the domain of [latex]f[\/latex], though they must be in the domain of [latex]g[\/latex].<\/p>\r\n[\/hidden-answer]\r\n\r\n&nbsp;\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div id=\"fs-id1165135435597\" class=\"note precalculus try\">\r\n<div id=\"ti_01_04_07\" class=\"exercise\">\r\n<div id=\"fs-id1165137937116\" class=\"problem\">\r\n<div class=\"bcc-box bcc-success\">\r\n<h3>Try It<\/h3>\r\n<p id=\"fs-id1165137937117\">Find the domain of<\/p>\r\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)\\text{ where}f\\left(x\\right)=\\frac{1}{x - 2}\\text{ and }g\\left(x\\right)=\\sqrt{x+4}[\/latex]<\/p>\r\n[reveal-answer q=\"645634\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"645634\"]\r\n\r\n[latex]\\left[-4,0\\right)\\cup \\left(0,\\infty \\right)[\/latex]\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\n[ohm_question hide_question_numbers=1]165745[\/ohm_question]\r\n\r\n<\/div>\r\n<h2>Decomposing a Composite Function into its Component Functions<\/h2>\r\n<p id=\"fs-id1165135185936\">In some cases it is necessary to decompose a complicated function. In other words we can write it as a composition of two simpler functions. There are multiple ways to <span class=\"no-emphasis\">decompose a composite function<\/span>, but often one is the most obvious.<\/p>\r\n\r\n<div id=\"Example_01_04_10\" class=\"example\">\r\n<div id=\"fs-id1165134319721\" class=\"exercise\">\r\n<div id=\"fs-id1165134319723\" class=\"problem textbox shaded\">\r\n<h3>Example 10: Decomposing a Function<\/h3>\r\n<p id=\"fs-id1165137771903\">Write [latex]f\\left(x\\right)=\\sqrt{5-{x}^{2}}[\/latex] as the composition of two functions.<\/p>\r\n[reveal-answer q=\"841209\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"841209\"]\r\n<p id=\"fs-id1165135194522\">We are looking for two functions, [latex]g[\/latex] and [latex]h[\/latex], so [latex]f\\left(x\\right)=g\\left(h\\left(x\\right)\\right)[\/latex]. To do this, we look for a function inside a function in the formula for [latex]f\\left(x\\right)[\/latex]. As one possibility, we might notice that the expression [latex]5-{x}^{2}[\/latex] is the inside of the square root. We could then decompose the function as<\/p>\r\n<p style=\"text-align: center;\">[latex]h\\left(x\\right)=5-{x}^{2}\\text{ and }g\\left(x\\right)=\\sqrt{x}[\/latex]<\/p>\r\n<p id=\"fs-id1165135250635\">We can check our answer by recomposing the functions.<\/p>\r\n<p style=\"text-align: center;\">[latex]g\\left(h\\left(x\\right)\\right)=g\\left(5-{x}^{2}\\right)=\\sqrt{5-{x}^{2}}[\/latex]<\/p>\r\nAnother solution would be\r\n<p style=\"text-align: center;\">[latex]h\\left(x\\right)={x}^{2}\\text{ and }g\\left(x\\right)=\\sqrt{5-x}[\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div class=\"bcc-box bcc-success\">\r\n<h3>Try It<\/h3>\r\nWrite [latex]f\\left(x\\right)=\\frac{4}{3-\\sqrt{4+{x}^{2}}}[\/latex] as the composition of two functions.\r\n\r\n[reveal-answer q=\"637567\"]Show Solution[\/reveal-answer]\r\n[hidden-answer a=\"637567\"]\r\n\r\nPossible answer:\r\n<p id=\"fs-id1165135333608\" style=\"padding-left: 30px;\">[latex]g\\left(x\\right)=\\sqrt{4+{x}^{2}}[\/latex]<\/p>\r\n<p style=\"padding-left: 30px;\">[latex]h\\left(x\\right)=\\frac{4}{3-x}[\/latex]<\/p>\r\n<p style=\"padding-left: 30px;\">[latex]f=h\\circ g[\/latex]<\/p>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<section id=\"fs-id1165135388428\" class=\"key-equations\">\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Try It<\/h3>\r\n[ohm_question hide_question_numbers=1]32917[\/ohm_question]\r\n\r\n<\/div>\r\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Key Equation<\/span><\/h2>\r\n<table id=\"eip-id1165134118229\" summary=\"..\"><colgroup> <col \/> <col \/><\/colgroup>\r\n<tbody>\r\n<tr>\r\n<td>Composite function<\/td>\r\n<td>[latex]\\left(f\\circ g\\right)\\left(x\\right)=f\\left(g\\left(x\\right)\\right)[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/section><section id=\"fs-id1165137768015\" class=\"key-concepts\">\r\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Key Concepts<\/span><\/h2>\r\n<ul id=\"fs-id1165137754842\">\r\n \t<li>We can perform algebraic operations on functions.<\/li>\r\n \t<li>When functions are combined, the output of the first (inner) function becomes the input of the second (outer) function.<\/li>\r\n \t<li>The function produced by combining two functions is a composite function.<\/li>\r\n \t<li>The order of function composition must be considered when interpreting the meaning of composite functions.<\/li>\r\n \t<li>A composite function can be evaluated by evaluating the inner function using the given input value and then evaluating the outer function taking as its input the output of the inner function.<\/li>\r\n \t<li>A composite function can be evaluated from a table.<\/li>\r\n \t<li>A composite function can be evaluated from a graph.<\/li>\r\n \t<li>A composite function can be evaluated from a formula.<\/li>\r\n \t<li>The domain of a composite function consists of those inputs in the domain of the inner function that correspond to outputs of the inner function that are in the domain of the outer function.<\/li>\r\n \t<li>Just as functions can be combined to form a composite function, composite functions can be decomposed into simpler functions.<\/li>\r\n \t<li>Functions can often be decomposed in more than one way.<\/li>\r\n<\/ul>\r\n<\/section><section id=\"fs-id1165137611819\" class=\"section-exercises\"><\/section><section class=\"section-exercises\"><\/section><section class=\"section-exercises\">\r\n<div>\r\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Glossary<\/span><\/h2>\r\n<dl id=\"fs-id1165137832421\" class=\"definition\">\r\n \t<dt>composite function<\/dt>\r\n \t<dd id=\"fs-id1165137832426\">the new function formed by function composition, when the output of one function is used as the input of another<\/dd>\r\n<\/dl>\r\n<\/div>\r\n<\/section><\/div>\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>","rendered":"<div class=\"bcc-box bcc-highlight\">\n<h3>Learning Outcomes<\/h3>\n<ul>\n<li>Combine functions using algebraic operations.<\/li>\n<li>Create a new function by composition of functions.<\/li>\n<li>Evaluate composite functions.<\/li>\n<li>Find the domain of a composite function.<\/li>\n<li>Decompose a composite function into its component functions.<\/li>\n<\/ul>\n<\/div>\n<p id=\"fs-id1165134094620\">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.<\/p>\n<div style=\"width: 497px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010513\/CNX_Precalc_Figure_01_04_0062.jpg\" alt=\"Explanation of C(T(5)), which is the cost for the temperature and T(5) is the temperature on day 5.\" width=\"487\" height=\"140\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 1<\/b><\/p>\n<\/div>\n<p id=\"fs-id1165134038788\">Using descriptive variables, we can notate these two functions. The function [latex]C\\left(T\\right)[\/latex] gives the cost [latex]C[\/latex] of heating a house for a given average daily temperature in [latex]T[\/latex] degrees Celsius. The function [latex]T\\left(d\\right)[\/latex] gives the average daily temperature on day [latex]d[\/latex] of the year. For any given day, [latex]\\text{Cost}=C\\left(T\\left(d\\right)\\right)[\/latex] means that the cost depends on the temperature, which in turns depends on the day of the year. Thus, we can evaluate the cost function at the temperature [latex]T\\left(d\\right)[\/latex]. For example, we could evaluate [latex]T\\left(5\\right)[\/latex] to determine the average daily temperature on the 5th day of the year. Then, we could evaluate the <strong>cost function<\/strong> at that temperature. We would write [latex]C\\left(T\\left(5\\right)\\right)[\/latex].<span id=\"fs-id1165137424478\"><br \/>\n<\/span><\/p>\n<p id=\"fs-id1165137460512\">By combining these two relationships into one function, we have performed function composition, which is the focus of this section.<\/p>\n<h2>Combining Functions Using Algebraic Operations<\/h2>\n<p id=\"fs-id1165137446477\">Function composition is only one way to combine existing functions. Another way is to carry out the usual algebraic operations on functions, such as addition, subtraction, multiplication and division. We do this by performing the operations with the function outputs, defining the result as the output of our new function.<\/p>\n<p id=\"fs-id1165135533159\">Suppose we need to add two columns of numbers that represent a husband and wife\u2019s separate annual incomes over a period of years, with the result being their total household income. We want to do this for every year, adding only that year\u2019s incomes and then collecting all the data in a new column. If [latex]w\\left(y\\right)[\/latex] is the wife\u2019s income and [latex]h\\left(y\\right)[\/latex] is the husband\u2019s income in year [latex]y[\/latex], and we want [latex]T[\/latex] to represent the total income, then we can define a new function.<\/p>\n<div id=\"fs-id1165137641862\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]T\\left(y\\right)=h\\left(y\\right)+w\\left(y\\right)[\/latex]<\/div>\n<p id=\"fs-id1165135347766\">If this holds true for every year, then we can focus on the relation between the functions without reference to a year and write<\/p>\n<div id=\"fs-id1165137665765\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]T=h+w[\/latex]<\/div>\n<p id=\"fs-id1165132957142\">Just as for this sum of two functions, we can define difference, product, and ratio functions for any pair of functions that have the same kinds of inputs (not necessarily numbers) and also the same kinds of outputs (which do have to be numbers so that the usual operations of algebra can apply to them, and which also must have the same units or no units when we add and subtract). In this way, we can think of adding, subtracting, multiplying, and dividing functions.<\/p>\n<p id=\"fs-id1165137424116\">For two functions [latex]f\\left(x\\right)[\/latex] and [latex]g\\left(x\\right)[\/latex] with real number outputs, we define new functions [latex]f+g,f-g,fg[\/latex], and [latex]\\frac{f}{g}[\/latex] by the relations<\/p>\n<div id=\"fs-id1165137543139\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]\\begin{gathered}\\left(f+g\\right)\\left(x\\right)=f\\left(x\\right)+g\\left(x\\right) \\\\[2mm] \\left(f-g\\right)\\left(x\\right)=f\\left(x\\right)-g\\left(x\\right) \\\\[2mm] \\left(fg\\right)\\left(x\\right)=f\\left(x\\right) \\cdot g\\left(x\\right) \\\\[2mm] \\left(\\frac{f}{g}\\right)\\left(x\\right)=\\frac{f\\left(x\\right)}{g\\left(x\\right)} \\\\[5mm]\\text{ } \\end{gathered}[\/latex]<\/div>\n<div id=\"Example_01_04_01\" class=\"example\">\n<div id=\"fs-id1165137585443\" class=\"exercise\">\n<div id=\"fs-id1165137573272\" class=\"problem textbox shaded\">\n<h3>Example 1: Performing Algebraic Operations on Functions<\/h3>\n<p id=\"fs-id1165135304963\">Find and simplify the functions [latex]\\left(g-f\\right)\\left(x\\right)[\/latex] and [latex]\\left(\\frac{g}{f}\\right)\\left(x\\right)[\/latex], given [latex]f\\left(x\\right)=x - 1[\/latex] and [latex]g\\left(x\\right)={x}^{2}-1[\/latex]. Are they the same function?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q516326\">Show Solution<\/span><\/p>\n<div id=\"q516326\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1165137466263\">Begin by writing the general form, and then substitute the given functions.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{align}\\left(g-f\\right)\\left(x\\right)&=g\\left(x\\right)-f\\left(x\\right) \\\\[1.5mm] &={x}^{2}-1-\\left(x - 1\\right)\\\\[1.5mm] &={x}^{2}-x \\\\[1.5mm] &=x\\left(x - 1\\right) \\end{align}[\/latex]\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 [latex]\\begin{align} \\left(\\frac{g}{f}\\right)\\left(x\\right)&=\\frac{g\\left(x\\right)}{f\\left(x\\right)} \\\\[1.5mm] &=\\frac{{x}^{2}-1}{x - 1}\\\\[1.5mm] &=\\frac{\\left(x+1\\right)\\left(x - 1\\right)}{x - 1}\\text{ where }x\\ne 1 \\\\[1.5mm] &=x+1 \\end{align}[\/latex]<\/p>\n<p id=\"fs-id1165137553743\">No, the functions are not the same.<\/p>\n<p id=\"fs-id1165135351612\">Note: For [latex]\\left(\\frac{g}{f}\\right)\\left(x\\right)[\/latex], the condition [latex]x\\ne 1[\/latex] is necessary because when [latex]x=1[\/latex], the denominator is equal to 0, which makes the function undefined.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"bcc-box bcc-success\">\n<h3 id=\"fs-id1165135333576\">Try It<\/h3>\n<p>Find and simplify the functions [latex]\\left(fg\\right)\\left(x\\right)[\/latex] and [latex]\\left(f-g\\right)\\left(x\\right)[\/latex].<\/p>\n<div id=\"fs-id1165137434994\" class=\"equation unnumbered\" style=\"text-align: center;\">[latex]f\\left(x\\right)=x - 1\\text{ and }g\\left(x\\right)={x}^{2}-1[\/latex]<\/div>\n<p id=\"fs-id1165137434911\">Are they the same function?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q34616\">Show Solution<\/span><\/p>\n<div id=\"q34616\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]\\left(fg\\right)\\left(x\\right)=f\\left(x\\right)\\cdot g\\left(x\\right)=\\left(x - 1\\right)\\left({x}^{2}-1\\right)={x}^{3}-{x}^{2}-x+1\\\\[4mm] \\left(f-g\\right)\\left(x\\right)=f\\left(x\\right)-g\\left(x\\right)=\\left(x - 1\\right)-\\left({x}^{2}-1\\right)=x-{x}^{2}[\/latex]<\/p>\n<p>No, the functions are not the same.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<h2 id=\"fs-id1165137619426\" class=\"solution\">Create a Function by Composition of Functions<\/h2>\n<p>Performing algebraic operations on functions combines them into a new function, but we can also create functions by composing functions. When we wanted to compute a heating cost from a day of the year, we created a new function that takes a day as input and yields a cost as output. 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. We represent this combination by the following notation:<\/p>\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)=f\\left(g\\left(x\\right)\\right)[\/latex]<\/p>\n<p>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]<\/p>\n<p>The two sides of the equation above have the same mathematical meaning and are equal. 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. Composition is a binary operation that takes two functions and forms a new function, much as addition or multiplication takes two numbers and gives a new number. However, it is important not to confuse function composition with multiplication because, as we learned above, in most cases [latex]f\\left(g\\left(x\\right)\\right)\\ne f\\left(x\\right)g\\left(x\\right)[\/latex].<\/p>\n<p>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. In the equation above, the function [latex]g[\/latex] takes the input [latex]x[\/latex] first and yields an output [latex]g\\left(x\\right)[\/latex]. Then the function [latex]f[\/latex] takes [latex]g\\left(x\\right)[\/latex] as an input and yields an output [latex]f\\left(g\\left(x\\right)\\right)[\/latex].<\/p>\n<div style=\"width: 497px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010513\/CNX_Precalc_Figure_01_04_0012.jpg\" alt=\"Explanation of the composite function. g(x), the output of g is the input of f. X is the input of g.\" width=\"487\" height=\"171\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 2<\/b><\/p>\n<\/div>\n<div class=\"note precalculus try\">\n<p>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]. We will also see that sometimes two functions can be composed only in one specific order.<\/p>\n<p>For example, if [latex]f\\left(x\\right)={x}^{2}[\/latex] and [latex]g\\left(x\\right)=x+2[\/latex], then<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{align}f\\left(g\\left(x\\right)\\right)&=f\\left(x+2\\right) \\\\ &={\\left(x+2\\right)}^{2} \\\\ &={x}^{2}+4x+4 \\end{align}[\/latex]<\/p>\n<p style=\"text-align: left;\">but<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{align} g\\left(f\\left(x\\right)\\right)&=g\\left({x}^{2}\\right)\\\\ &={x}^{2}+2 \\end{align}[\/latex]<\/p>\n<p>These expressions are not equal for all values of [latex]x[\/latex], so the two functions are not equal.<\/p>\n<p>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.<\/p>\n<div class=\"textbox\">\n<h3>A General Note: Composition of Functions<\/h3>\n<p>When the output of one function is used as the input of another, we call the entire operation a composition of functions. For any input [latex]x[\/latex] and functions [latex]f[\/latex] and [latex]g[\/latex], this action defines a composite function, which we write as [latex]f\\circ g[\/latex] such that<\/p>\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)=f\\left(g\\left(x\\right)\\right)[\/latex]<\/p>\n<p>The domain of the composite function [latex]f\\circ g[\/latex] is all [latex]x[\/latex] such that [latex]x[\/latex] is in the domain of [latex]g[\/latex] and [latex]g\\left(x\\right)[\/latex] is in the domain of [latex]f[\/latex].<\/p>\n<p>It is important to realize that the product of functions [latex]fg[\/latex] is not the same as the function composition [latex]f\\left(g\\left(x\\right)\\right)[\/latex], because, in general, [latex]f\\left(x\\right)g\\left(x\\right)\\ne f\\left(g\\left(x\\right)\\right)[\/latex].<\/p>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example 2: Determining whether Composition of Functions is Commutative<\/h3>\n<p>Using the functions below, find [latex]f\\left(g\\left(x\\right)\\right)[\/latex] and [latex]g\\left(f\\left(x\\right)\\right)[\/latex]. Determine whether the composition of the functions is commutative.<\/p>\n<p style=\"text-align: center;\">[latex]f\\left(x\\right)=2x+1[\/latex]\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 [latex]g\\left(x\\right)=3-x[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q513486\">Show Solution<\/span><\/p>\n<div id=\"q513486\" class=\"hidden-answer\" style=\"display: none\">\n<p>Let\u2019s begin by substituting [latex]g\\left(x\\right)[\/latex] into [latex]f\\left(x\\right)[\/latex].<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{align}f\\left(g\\left(x\\right)\\right)&=2\\left(3-x\\right)+1 \\\\ &=6 - 2x+1 \\\\ &=7 - 2x \\end{align}[\/latex]<\/p>\n<p style=\"text-align: left;\">Now we can substitute [latex]f\\left(x\\right)[\/latex] into [latex]g\\left(x\\right)[\/latex].<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{align}g\\left(f\\left(x\\right)\\right)&=3-\\left(2x+1\\right) \\\\ &=3 - 2x - 1 \\\\ &=-2x+2 \\end{align}[\/latex]<\/p>\n<p>We find that [latex]g\\left(f\\left(x\\right)\\right)\\ne f\\left(g\\left(x\\right)\\right)[\/latex], so the operation of function composition is not commutative.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example 3: Interpreting Composite Functions<\/h3>\n<p>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].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q813025\">Show Solution<\/span><\/p>\n<div id=\"q813025\" class=\"hidden-answer\" style=\"display: none\">\n<p>The inside expression in the composition is [latex]s\\left(3\\right)[\/latex]. Because the input to the s-function is time, [latex]t=3[\/latex] represents 3 minutes, and [latex]s\\left(3\\right)[\/latex] is the number of sit-ups completed in 3 minutes.<\/p>\n<p>Using [latex]s\\left(3\\right)[\/latex] as the input to the function [latex]c\\left(s\\right)[\/latex] gives us the number of calories burned during the number of sit-ups that can be completed in 3 minutes, or simply the number of calories burned in 3 minutes (by doing sit-ups).<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox shaded\">\n<h3>Example 4: Investigating the Order of Function Composition<\/h3>\n<p>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]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q115223\">Show Solution<\/span><\/p>\n<div id=\"q115223\" class=\"hidden-answer\" style=\"display: none\">\n<p>The function [latex]y=f\\left(x\\right)[\/latex] is a function whose output is the number of miles driven corresponding to the number of hours driven.<\/p>\n<p style=\"text-align: center;\">[latex]\\text{number of miles }=f\\left(\\text{number of hours}\\right)[\/latex]<\/p>\n<p>The function [latex]g\\left(y\\right)[\/latex] is a function whose output is the number of gallons used corresponding to the number of miles driven. This means:<\/p>\n<p style=\"text-align: center;\">[latex]\\text{number of gallons }=g\\left(\\text{number of miles}\\right)[\/latex]<\/p>\n<p>The expression [latex]g\\left(y\\right)[\/latex] takes miles as the input and a number of gallons as the output. The function [latex]f\\left(x\\right)[\/latex] requires a number of hours as the input. Trying to input a number of gallons does not make sense. The expression [latex]f\\left(g\\left(y\\right)\\right)[\/latex] is meaningless.<\/p>\n<p>The expression [latex]f\\left(x\\right)[\/latex] takes hours as input and a number of miles driven as the output. The function [latex]g\\left(y\\right)[\/latex] requires a number of miles as the input. Using [latex]f\\left(x\\right)[\/latex] (miles driven) as an input value for [latex]g\\left(y\\right)[\/latex], where gallons of gas depends on miles driven, does make sense. The expression [latex]g\\left(f\\left(x\\right)\\right)[\/latex] makes sense, and will yield the number of gallons of gas used, [latex]g[\/latex], driving a certain number of miles, [latex]f\\left(x\\right)[\/latex], in [latex]x[\/latex] hours.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox\">\n<h3>Q &amp; A<\/h3>\n<p><strong>Are there any situations where [latex]f\\left(g\\left(y\\right)\\right)[\/latex] and [latex]g\\left(f\\left(x\\right)\\right)[\/latex] would both be meaningful or useful expressions?<\/strong><\/p>\n<p><em>Yes. For many pure mathematical functions, both compositions make sense, even though they usually produce different new functions. In real-world problems, functions whose inputs and outputs have the same units also may give compositions that are meaningful in either order.<\/em><\/p>\n<\/div>\n<div class=\"bcc-box bcc-success\">\n<h3>Try It<\/h3>\n<p>The gravitational force on a planet a distance r from the sun is given by the function [latex]G\\left(r\\right)[\/latex]. The acceleration of a planet subjected to any force [latex]F[\/latex] is given by the function [latex]a\\left(F\\right)[\/latex]. Form a meaningful composition of these two functions, and explain what it means.<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q502863\">Show Solution<\/span><\/p>\n<div id=\"q502863\" class=\"hidden-answer\" style=\"display: none\">\n<p>A gravitational force is still a force, so [latex]a\\left(G\\left(r\\right)\\right)[\/latex] makes sense as the acceleration of a planet at a distance r from the Sun (due to gravity), but [latex]G\\left(a\\left(F\\right)\\right)[\/latex] does not make sense.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<h2>Evaluating Composite Functions<\/h2>\n<p id=\"fs-id1165135168147\">Once we compose a new function from two existing functions, we need to be able to evaluate it for any input in its domain. We will do this with specific numerical inputs for functions expressed as tables, graphs, and formulas and with variables as inputs to functions expressed as formulas. In each case, we evaluate the inner function using the starting input and then use the inner function\u2019s output as the input for the outer function.<\/p>\n<section id=\"fs-id1165137760886\">\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Evaluating Composite Functions Using Tables<\/span><\/h2>\n<p id=\"fs-id1165137725253\">When working with functions given as tables, we read input and output values from the table entries and always work from the inside to the outside. We evaluate the inside function first and then use the output of the inside function as the input to the outside function.<\/p>\n<div id=\"Example_01_04_05\" class=\"example\">\n<div id=\"fs-id1165137416770\" class=\"exercise\">\n<div id=\"fs-id1165137465672\" class=\"problem textbox shaded\">\n<h3>Example 5: Using a Table to Evaluate a Composite Function<\/h3>\n<p id=\"fs-id1165135177664\">Using the table below,\u00a0evaluate [latex]f\\left(g\\left(3\\right)\\right)[\/latex] and [latex]g\\left(f\\left(3\\right)\\right)[\/latex].<\/p>\n<table id=\"Table_01_04_01\" summary=\"Five rows and three columns. The first column is labeled,\">\n<colgroup>\n<col \/>\n<col \/>\n<col \/><\/colgroup>\n<thead>\n<tr>\n<th>[latex]x[\/latex]<\/th>\n<th>[latex]f\\left(x\\right)[\/latex]<\/th>\n<th>[latex]g\\left(x\\right)[\/latex]<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>6<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>8<\/td>\n<td>5<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>3<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>1<\/td>\n<td>7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q542531\">Show Solution<\/span><\/p>\n<div id=\"q542531\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1165135582221\">To evaluate [latex]f\\left(g\\left(3\\right)\\right)[\/latex], we start from the inside with the input value 3. We then evaluate the inside expression [latex]g\\left(3\\right)[\/latex] using the table that defines the function [latex]g:[\/latex] [latex]g\\left(3\\right)=2[\/latex]. We can then use that result as the input to the function [latex]f[\/latex], so [latex]g\\left(3\\right)[\/latex] is replaced by 2 and we get [latex]f\\left(2\\right)[\/latex]. Then, using the table that defines the function [latex]f[\/latex], we find that [latex]f\\left(2\\right)=8[\/latex].<\/p>\n<p style=\"text-align: center;\">[latex]g\\left(3\\right)=2[\/latex]<\/p>\n<p style=\"text-align: center;\">[latex]f\\left(g\\left(3\\right)\\right)=f\\left(2\\right)=8[\/latex]<\/p>\n<p id=\"fs-id1165134259282\">To evaluate [latex]g\\left(f\\left(3\\right)\\right)[\/latex], we first evaluate the inside expression [latex]f\\left(3\\right)[\/latex] using the first table: [latex]f\\left(3\\right)=3[\/latex]. Then, using the table for [latex]g[\/latex] we can evaluate<\/p>\n<p style=\"text-align: center;\">[latex]g\\left(f\\left(3\\right)\\right)=g\\left(3\\right)=2[\/latex]<\/p>\n<p id=\"fs-id1165134231482\">The table below shows the composite functions [latex]f\\circ g[\/latex] and [latex]g\\circ f[\/latex] as tables.<\/p>\n<table id=\"Table_01_04_02\" summary=\"Two rows and five columns. When x=3, g(3)=2, f(g(3))=8, f(3)=3, and g(f(3))=2.\">\n<colgroup>\n<col \/>\n<col \/>\n<col \/>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr>\n<td>[latex]x[\/latex]<\/td>\n<td>[latex]g\\left(x\\right)[\/latex]<\/td>\n<td>[latex]f\\left(g\\left(x\\right)\\right)[\/latex]<\/td>\n<td>[latex]f\\left(x\\right)[\/latex]<\/td>\n<td>[latex]g\\left(f\\left(x\\right)\\right)[\/latex]<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>2<\/td>\n<td>8<\/td>\n<td>3<\/td>\n<td>2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"bcc-box bcc-success\">\n<h3 id=\"fs-id1165134297603\">Try It<\/h3>\n<p>Using the table below, evaluate [latex]f\\left(g\\left(1\\right)\\right)[\/latex] and [latex]g\\left(f\\left(4\\right)\\right)[\/latex].<\/p>\n<table id=\"Table_01_04_01\" summary=\"Five rows and three columns. The first column is labeled,\">\n<colgroup>\n<col \/>\n<col \/>\n<col \/><\/colgroup>\n<thead>\n<tr>\n<th>[latex]x[\/latex]<\/th>\n<th>[latex]f\\left(x\\right)[\/latex]<\/th>\n<th>[latex]g\\left(x\\right)[\/latex]<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>6<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>8<\/td>\n<td>5<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>3<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>1<\/td>\n<td>7<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q407008\">Show Solution<\/span><\/p>\n<div id=\"q407008\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]f\\left(g\\left(1\\right)\\right)=f\\left(3\\right)=3[\/latex] and [latex]g\\left(f\\left(4\\right)\\right)=g\\left(1\\right)=3[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<section id=\"fs-id1165137756068\">\n<div class=\"textbox key-takeaways\">\n<h3>Try it 4<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm165741\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=165741&theme=oea&iframe_resize_id=ohm165741\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<\/div>\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Evaluating Composite Functions Using Graphs<\/span><\/h2>\n<p id=\"fs-id1165137428192\">When we are given individual functions as graphs, the procedure for evaluating composite functions is similar to the process we use for evaluating tables. We read the input and output values, but this time, from the [latex]x\\text{-}[\/latex] and [latex]y\\text{-}[\/latex] axes of the graphs.<\/p>\n<div id=\"fs-id1165137634364\" class=\"note precalculus howto textbox\">\n<h3 id=\"fs-id1165137660530\">How To: Given a composite function and graphs of its individual functions, evaluate it using the information provided by the graphs.<strong><br \/>\n<\/strong><\/h3>\n<ol id=\"fs-id1165133248553\">\n<li>Locate the given input to the inner function on the [latex]x\\text{-}[\/latex] axis of its graph.<\/li>\n<li>Read off the output of the inner function from the [latex]y\\text{-}[\/latex] axis of its graph.<\/li>\n<li>Locate the inner function output on the [latex]x\\text{-}[\/latex] axis of the graph of the outer function.<\/li>\n<li>Read the output of the outer function from the [latex]y\\text{-}[\/latex] axis of its graph. This is the output of the composite function.<\/li>\n<\/ol>\n<\/div>\n<div id=\"fs-id1165137758196\" class=\"problem textbox shaded\">\n<h3>Example 6: Using a Graph to Evaluate a Composite Function<\/h3>\n<p>Using the graphs in Figure 3, evaluate [latex]f\\left(g\\left(1\\right)\\right)[\/latex].<\/p>\n<div style=\"width: 985px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010513\/CNX_Precalc_Figure_01_04_002ab2.jpg\" alt=\"Explanation of the composite function.\" width=\"975\" height=\"543\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 3<\/b><\/p>\n<\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q516132\">Show Solution<\/span><\/p>\n<div id=\"q516132\" class=\"hidden-answer\" style=\"display: none\">\n<div style=\"width: 985px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010514\/CNX_Precalc_Figure_01_04_0042.jpg\" alt=\"Two graphs of a positive parabola (g(x)) and a negative parabola (f(x)). The following points are plotted: g(1)=3 and f(3)=6.\" width=\"975\" height=\"543\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 4<\/b><\/p>\n<\/div>\n<p id=\"fs-id1165135545948\">To evaluate [latex]f\\left(g\\left(1\\right)\\right)[\/latex], we start with the inside evaluation.<span id=\"fs-id1165137644158\"><br \/>\n<\/span><\/p>\n<p id=\"fs-id1165137566106\">We evaluate [latex]g\\left(1\\right)[\/latex] using the graph of [latex]g\\left(x\\right)[\/latex], finding the input of 1 on the [latex]x\\text{-}[\/latex] axis and finding the output value of the graph at that input. Here, [latex]g\\left(1\\right)=3[\/latex]. We use this value as the input to the function [latex]f[\/latex].<\/p>\n<p style=\"text-align: center;\">[latex]f\\left(g\\left(1\\right)\\right)=f\\left(3\\right)[\/latex]<\/p>\n<p id=\"fs-id1165137831420\">We can then evaluate the composite function by looking to the graph of [latex]f\\left(x\\right)[\/latex], finding the input of 3 on the [latex]x\\text{-}[\/latex] axis and reading the output value of the graph at this input. Here, [latex]f\\left(3\\right)=6[\/latex], so [latex]f\\left(g\\left(1\\right)\\right)=6[\/latex].<\/p>\n<h4>Analysis of the Solution<\/h4>\n<p>Figure 5\u00a0shows how we can mark the graphs with arrows to trace the path from the input value to the output value.<\/p>\n<div style=\"width: 985px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010514\/CNX_Precalc_Figure_01_04_0052.jpg\" alt=\"Two graphs of a positive and negative parabola.\" width=\"975\" height=\"520\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 5<\/b><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><b><\/b><b><\/b><\/p>\n<\/div>\n<div class=\"bcc-box bcc-success\">\n<h3>Try It<\/h3>\n<p id=\"fs-id1165137423742\">Using Figure 6, evaluate [latex]g\\left(f\\left(2\\right)\\right)[\/latex].<\/p>\n<div style=\"width: 985px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images-archive-read-only\/wp-content\/uploads\/sites\/1227\/2015\/04\/03010514\/CNX_Precalc_Figure_01_04_0042.jpg\" alt=\"Two graphs of a positive parabola (g(x)) and a negative parabola (f(x)). The following points are plotted: g(1)=3 and f(3)=6.\" width=\"975\" height=\"543\" \/><\/p>\n<p class=\"wp-caption-text\"><b>Figure 6<\/b><\/p>\n<\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q68844\">Show Solution<\/span><\/p>\n<div id=\"q68844\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]g\\left(f\\left(2\\right)\\right)=g\\left(5\\right)=3[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<section id=\"fs-id1165137452389\">\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm32890\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=32890&theme=oea&iframe_resize_id=ohm32890\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<\/div>\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Evaluating Composite Functions Using Formulas<\/span><\/h2>\n<p id=\"fs-id1165137432176\">When evaluating a composite function where we have either created or been given formulas, the rule of working from the inside out remains the same. The input value to the outer function will be the output of the inner function, which may be a numerical value, a variable name, or a more complicated expression.<\/p>\n<p id=\"fs-id1165137567159\">While we can compose the functions for each individual input value, it is sometimes helpful to find a single formula that will calculate the result of a composition [latex]f\\left(g\\left(x\\right)\\right)[\/latex]. To do this, we will extend our idea of function evaluation. Recall that, when we evaluate a function like [latex]f\\left(t\\right)={t}^{2}-t[\/latex], we substitute the value inside the parentheses into the formula wherever we see the input variable.<\/p>\n<div id=\"fs-id1165137584280\" class=\"note precalculus howto textbox\">\n<h3 id=\"fs-id1165137676972\">How To: Given a formula for a composite function, evaluate the function.<strong><br \/>\n<\/strong><\/h3>\n<ol id=\"fs-id1165137564125\">\n<li>Evaluate the inside function using the input value or variable provided.<\/li>\n<li>Use the resulting output as the input to the outside function.<\/li>\n<\/ol>\n<\/div>\n<div id=\"Example_01_04_07\" class=\"example\">\n<div id=\"fs-id1165134070851\" class=\"exercise\">\n<div id=\"fs-id1165134070853\" class=\"problem textbox shaded\">\n<h3>Example 7: Evaluating a Composition of Functions Expressed as Formulas with a Numerical Input<\/h3>\n<p id=\"fs-id1165137447886\">Given [latex]f\\left(t\\right)={t}^{2}-{t}[\/latex] and [latex]h\\left(x\\right)=3x+2[\/latex], evaluate [latex]f\\left(h\\left(1\\right)\\right)[\/latex].<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q905220\">Show Solution<\/span><\/p>\n<div id=\"q905220\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1165135528526\">Because the inside expression is [latex]h\\left(1\\right)[\/latex], we start by evaluating [latex]h\\left(x\\right)[\/latex] at 1.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{align}h\\left(1\\right)&=3\\left(1\\right)+2\\\\ &=5\\end{align}[\/latex]<\/p>\n<p id=\"fs-id1165137445352\">Then [latex]f\\left(h\\left(1\\right)\\right)=f\\left(5\\right)[\/latex], so we evaluate [latex]f\\left(t\\right)[\/latex] at an input of 5.<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{align}f\\left(h\\left(1\\right)\\right)&=f\\left(5\\right)\\\\ &={5}^{2}-5\\\\ &=20\\end{align}[\/latex]<\/p>\n<h4>Analysis of the Solution<\/h4>\n<p id=\"fs-id1165137714335\">It makes no difference what the input variables [latex]t[\/latex] and [latex]x[\/latex] were called in this problem because we evaluated for specific numerical values.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"bcc-box bcc-success\">\n<h3>Try It<\/h3>\n<p id=\"fs-id1165134544990\">Given [latex]f\\left(t\\right)={t}^{2}-t[\/latex] and [latex]h\\left(x\\right)=3x+2[\/latex], evaluate<\/p>\n<p style=\"padding-left: 60px;\">A) [latex]h\\left(f\\left(2\\right)\\right)[\/latex]<\/p>\n<p style=\"padding-left: 60px;\">B) [latex]h\\left(f\\left(-2\\right)\\right)[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q348291\">Show Solution<\/span><\/p>\n<div id=\"q348291\" class=\"hidden-answer\" style=\"display: none\">\n<p>A. 8; B. 20<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm69935\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=69935&theme=oea&iframe_resize_id=ohm69935\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<\/div>\n<h2>Finding the Domain of a Composite Function<\/h2>\n<p id=\"fs-id1165135519324\">As we discussed previously, the <strong>domain of a composite function<\/strong> such as [latex]f\\circ g[\/latex] is dependent on the domain of [latex]g[\/latex] and the domain of [latex]f[\/latex]. It is important to know when we can apply a composite function and when we cannot, that is, to know the domain of a function such as [latex]f\\circ g[\/latex]. Let us assume we know the domains of the functions [latex]f[\/latex] and [latex]g[\/latex] separately. If we write the composite function for an input [latex]x[\/latex] as [latex]f\\left(g\\left(x\\right)\\right)[\/latex], we can see right away that [latex]x[\/latex] must be a member of the domain of [latex]g[\/latex] in order for the expression to be meaningful, because otherwise we cannot complete the inner function evaluation. However, we also see that [latex]g\\left(x\\right)[\/latex] must be a member of the domain of [latex]f[\/latex], otherwise the second function evaluation in [latex]f\\left(g\\left(x\\right)\\right)[\/latex] cannot be completed, and the expression is still undefined. Thus the domain of [latex]f\\circ g[\/latex] consists of only those inputs in the domain of [latex]g[\/latex] that produce outputs from [latex]g[\/latex] belonging to the domain of [latex]f[\/latex]. Note that the domain of [latex]f[\/latex] composed with [latex]g[\/latex] is the set of all [latex]x[\/latex] such that [latex]x[\/latex] is in the domain of [latex]g[\/latex] and [latex]g\\left(x\\right)[\/latex] is in the domain of [latex]f[\/latex].<\/p>\n<div id=\"fs-id1165135547254\" class=\"note textbox\">\n<h3 class=\"title\">A General Note: Domain of a Composite Function<\/h3>\n<p id=\"fs-id1165135426375\">The domain of a composite function [latex]f\\left(g\\left(x\\right)\\right)[\/latex] is the set of those inputs [latex]x[\/latex] in the domain of [latex]g[\/latex] for which [latex]g\\left(x\\right)[\/latex] is in the domain of [latex]f[\/latex].<\/p>\n<\/div>\n<div id=\"fs-id1165137663970\" class=\"note precalculus howto textbox\">\n<h3 id=\"fs-id1165135203267\">How To: Given a function composition [latex]f\\left(g\\left(x\\right)\\right)[\/latex], determine its domain.<\/h3>\n<ol id=\"fs-id1165137714200\">\n<li>Find the domain of [latex]g[\/latex].<\/li>\n<li>Find the domain of [latex]f[\/latex].<\/li>\n<li>Find those inputs, [latex]x[\/latex],\u00a0in the domain of [latex]g[\/latex]\u00a0for which [latex]g(x)[\/latex]\u00a0is in the domain of [latex]f[\/latex]. That is, exclude those inputs, [latex]x[\/latex], from the domain of [latex]g[\/latex]\u00a0for which [latex]g(x)[\/latex]\u00a0is not in the domain of [latex]f[\/latex]. The resulting set is the domain of [latex]f\\circ g[\/latex].<\/li>\n<\/ol>\n<\/div>\n<div id=\"Example_01_04_08\" class=\"example\">\n<div id=\"fs-id1165137646695\" class=\"exercise\">\n<div id=\"fs-id1165137646697\" class=\"problem textbox shaded\">\n<h3>Example 8: Finding the Domain of a Composite Function<\/h3>\n<p id=\"fs-id1165135640630\">Find the domain of<\/p>\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)\\text{ where}f\\left(x\\right)=\\frac{5}{x - 1}\\text{ and }g\\left(x\\right)=\\frac{4}{3x - 2}[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q262512\">Show Solution<\/span><\/p>\n<div id=\"q262512\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1165137627922\">The domain of [latex]g\\left(x\\right)[\/latex] consists of all real numbers except [latex]x=\\frac{2}{3}[\/latex], since that input value would cause us to divide by 0. Likewise, the domain of [latex]f[\/latex] consists of all real numbers except 1. So we need to exclude from the domain of [latex]g\\left(x\\right)[\/latex] that value of [latex]x[\/latex] for which [latex]g\\left(x\\right)=1[\/latex].<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{align}\\frac{4}{3x - 2}&=1 \\\\ 4&=3x - 2 &&\\text{Multiply by } 3x-2 \\\\ 6&=3x &&\\text{Add }2 \\\\ x&=2 && \\text{Divide by }3 \\end{align}[\/latex]<\/p>\n<p id=\"fs-id1165137891240\">So the domain of [latex]f\\circ g[\/latex] is the set of all real numbers except [latex]\\frac{2}{3}[\/latex] and [latex]2[\/latex]. This means that<\/p>\n<p style=\"text-align: center;\">[latex]x\\ne \\frac{2}{3}\\text{or}x\\ne 2[\/latex]<\/p>\n<p id=\"fs-id1165135152098\">We can write this in interval notation as<\/p>\n<p style=\"text-align: center;\">[latex]\\left(-\\infty ,\\frac{2}{3}\\right)\\cup \\left(\\frac{2}{3},2\\right)\\cup \\left(2,\\infty \\right)[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"Example_01_04_09\" class=\"example\">\n<div id=\"fs-id1165135353057\" class=\"exercise\">\n<div id=\"fs-id1165137444218\" class=\"problem textbox shaded\">\n<h3>Example 9: Finding the Domain of a Composite Function Involving Radicals<\/h3>\n<p id=\"fs-id1165135547426\">Find the domain of<\/p>\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)\\text{ where}f\\left(x\\right)=\\sqrt{x+2}\\text{ and }g\\left(x\\right)=\\sqrt{3-x}[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q959136\">Show Solution<\/span><\/p>\n<div id=\"q959136\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1165137812353\">Because we cannot take the square root of a negative number, the domain of [latex]g[\/latex] is [latex]\\left(-\\infty ,3\\right][\/latex]. Now we check the domain of the composite function<\/p>\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)=\\sqrt{3-x+2}\\text{ or }\\left(f\\circ g\\right)\\left(x\\right)=\\sqrt{5-x}[\/latex]<\/p>\n<p id=\"fs-id1165137871761\">The domain of this function is [latex]\\left(-\\infty ,5\\right][\/latex]. To find the domain of [latex]f\\circ g[\/latex], we ask ourselves if there are any further restrictions offered by the domain of the composite function. The answer is no, since [latex]\\left(-\\infty ,3\\right][\/latex] is a proper subset of the domain of [latex]f\\circ g[\/latex]. This means the domain of [latex]f\\circ g[\/latex] is the same as the domain of [latex]g[\/latex], namely, [latex]\\left(-\\infty ,3\\right][\/latex].<\/p>\n<h4>Analysis of the Solution<\/h4>\n<p id=\"fs-id1165135241313\">This example shows that knowledge of the range of functions (specifically the inner function) can also be helpful in finding the domain of a composite function. It also shows that the domain of [latex]f\\circ g[\/latex] can contain values that are not in the domain of [latex]f[\/latex], though they must be in the domain of [latex]g[\/latex].<\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"fs-id1165135435597\" class=\"note precalculus try\">\n<div id=\"ti_01_04_07\" class=\"exercise\">\n<div id=\"fs-id1165137937116\" class=\"problem\">\n<div class=\"bcc-box bcc-success\">\n<h3>Try It<\/h3>\n<p id=\"fs-id1165137937117\">Find the domain of<\/p>\n<p style=\"text-align: center;\">[latex]\\left(f\\circ g\\right)\\left(x\\right)\\text{ where}f\\left(x\\right)=\\frac{1}{x - 2}\\text{ and }g\\left(x\\right)=\\sqrt{x+4}[\/latex]<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q645634\">Show Solution<\/span><\/p>\n<div id=\"q645634\" class=\"hidden-answer\" style=\"display: none\">\n<p>[latex]\\left[-4,0\\right)\\cup \\left(0,\\infty \\right)[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm165745\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=165745&theme=oea&iframe_resize_id=ohm165745\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<\/div>\n<h2>Decomposing a Composite Function into its Component Functions<\/h2>\n<p id=\"fs-id1165135185936\">In some cases it is necessary to decompose a complicated function. In other words we can write it as a composition of two simpler functions. There are multiple ways to <span class=\"no-emphasis\">decompose a composite function<\/span>, but often one is the most obvious.<\/p>\n<div id=\"Example_01_04_10\" class=\"example\">\n<div id=\"fs-id1165134319721\" class=\"exercise\">\n<div id=\"fs-id1165134319723\" class=\"problem textbox shaded\">\n<h3>Example 10: Decomposing a Function<\/h3>\n<p id=\"fs-id1165137771903\">Write [latex]f\\left(x\\right)=\\sqrt{5-{x}^{2}}[\/latex] as the composition of two functions.<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q841209\">Show Solution<\/span><\/p>\n<div id=\"q841209\" class=\"hidden-answer\" style=\"display: none\">\n<p id=\"fs-id1165135194522\">We are looking for two functions, [latex]g[\/latex] and [latex]h[\/latex], so [latex]f\\left(x\\right)=g\\left(h\\left(x\\right)\\right)[\/latex]. To do this, we look for a function inside a function in the formula for [latex]f\\left(x\\right)[\/latex]. As one possibility, we might notice that the expression [latex]5-{x}^{2}[\/latex] is the inside of the square root. We could then decompose the function as<\/p>\n<p style=\"text-align: center;\">[latex]h\\left(x\\right)=5-{x}^{2}\\text{ and }g\\left(x\\right)=\\sqrt{x}[\/latex]<\/p>\n<p id=\"fs-id1165135250635\">We can check our answer by recomposing the functions.<\/p>\n<p style=\"text-align: center;\">[latex]g\\left(h\\left(x\\right)\\right)=g\\left(5-{x}^{2}\\right)=\\sqrt{5-{x}^{2}}[\/latex]<\/p>\n<p>Another solution would be<\/p>\n<p style=\"text-align: center;\">[latex]h\\left(x\\right)={x}^{2}\\text{ and }g\\left(x\\right)=\\sqrt{5-x}[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"bcc-box bcc-success\">\n<h3>Try It<\/h3>\n<p>Write [latex]f\\left(x\\right)=\\frac{4}{3-\\sqrt{4+{x}^{2}}}[\/latex] as the composition of two functions.<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q637567\">Show Solution<\/span><\/p>\n<div id=\"q637567\" class=\"hidden-answer\" style=\"display: none\">\n<p>Possible answer:<\/p>\n<p id=\"fs-id1165135333608\" style=\"padding-left: 30px;\">[latex]g\\left(x\\right)=\\sqrt{4+{x}^{2}}[\/latex]<\/p>\n<p style=\"padding-left: 30px;\">[latex]h\\left(x\\right)=\\frac{4}{3-x}[\/latex]<\/p>\n<p style=\"padding-left: 30px;\">[latex]f=h\\circ g[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<section id=\"fs-id1165135388428\" class=\"key-equations\">\n<div class=\"textbox key-takeaways\">\n<h3>Try It<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm32917\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=32917&theme=oea&iframe_resize_id=ohm32917\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<\/div>\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Key Equation<\/span><\/h2>\n<table id=\"eip-id1165134118229\" summary=\"..\">\n<colgroup>\n<col \/>\n<col \/><\/colgroup>\n<tbody>\n<tr>\n<td>Composite function<\/td>\n<td>[latex]\\left(f\\circ g\\right)\\left(x\\right)=f\\left(g\\left(x\\right)\\right)[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/section>\n<section id=\"fs-id1165137768015\" class=\"key-concepts\">\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Key Concepts<\/span><\/h2>\n<ul id=\"fs-id1165137754842\">\n<li>We can perform algebraic operations on functions.<\/li>\n<li>When functions are combined, the output of the first (inner) function becomes the input of the second (outer) function.<\/li>\n<li>The function produced by combining two functions is a composite function.<\/li>\n<li>The order of function composition must be considered when interpreting the meaning of composite functions.<\/li>\n<li>A composite function can be evaluated by evaluating the inner function using the given input value and then evaluating the outer function taking as its input the output of the inner function.<\/li>\n<li>A composite function can be evaluated from a table.<\/li>\n<li>A composite function can be evaluated from a graph.<\/li>\n<li>A composite function can be evaluated from a formula.<\/li>\n<li>The domain of a composite function consists of those inputs in the domain of the inner function that correspond to outputs of the inner function that are in the domain of the outer function.<\/li>\n<li>Just as functions can be combined to form a composite function, composite functions can be decomposed into simpler functions.<\/li>\n<li>Functions can often be decomposed in more than one way.<\/li>\n<\/ul>\n<\/section>\n<section id=\"fs-id1165137611819\" class=\"section-exercises\"><\/section>\n<section class=\"section-exercises\"><\/section>\n<section class=\"section-exercises\">\n<div>\n<h2 style=\"text-align: center;\"><span style=\"text-decoration: underline;\">Glossary<\/span><\/h2>\n<dl id=\"fs-id1165137832421\" class=\"definition\">\n<dt>composite function<\/dt>\n<dd id=\"fs-id1165137832426\">the new function formed by function composition, when the output of one function is used as the input of another<\/dd>\n<\/dl>\n<\/div>\n<\/section>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n\n\t\t\t <section class=\"citations-section\" role=\"contentinfo\">\n\t\t\t <h3>Candela Citations<\/h3>\n\t\t\t\t\t <div>\n\t\t\t\t\t\t <div id=\"citation-list-13685\">\n\t\t\t\t\t\t\t <div class=\"licensing\"><div class=\"license-attribution-dropdown-subheading\">CC licensed content, Specific attribution<\/div><ul class=\"citation-list\"><li>Precalculus. <strong>Authored by<\/strong>: OpenStax College. <strong>Provided by<\/strong>: OpenStax. <strong>Located at<\/strong>: <a target=\"_blank\" href=\"http:\/\/cnx.org\/contents\/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175:1\/Preface\">http:\/\/cnx.org\/contents\/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175:1\/Preface<\/a>. <strong>License<\/strong>: <em><a target=\"_blank\" rel=\"license\" href=\"https:\/\/creativecommons.org\/licenses\/by\/4.0\/\">CC BY: Attribution<\/a><\/em><\/li><\/ul><\/div>\n\t\t\t\t\t\t <\/div>\n\t\t\t\t\t <\/div>\n\t\t\t <\/section>","protected":false},"author":23588,"menu_order":4,"template":"","meta":{"_candela_citation":"[{\"type\":\"cc-attribution\",\"description\":\"Precalculus\",\"author\":\"OpenStax College\",\"organization\":\"OpenStax\",\"url\":\"http:\/\/cnx.org\/contents\/fd53eae1-fa23-47c7-bb1b-972349835c3c@5.175:1\/Preface\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"}]","CANDELA_OUTCOMES_GUID":"","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-13685","chapter","type-chapter","status-publish","hentry"],"part":10705,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/13685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/users\/23588"}],"version-history":[{"count":10,"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/13685\/revisions"}],"predecessor-version":[{"id":16190,"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/13685\/revisions\/16190"}],"part":[{"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/parts\/10705"}],"metadata":[{"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapters\/13685\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/media?parent=13685"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/pressbooks\/v2\/chapter-type?post=13685"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/contributor?post=13685"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/precalculus\/wp-json\/wp\/v2\/license?post=13685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}