Instead of stopping after one function gives an output, we often need to feed that output straight into a second function, or run a function in reverse to get the original input back.
1
Evaluating Composite Functions
Given f(x)=2x+3 and g(x)=x2, we want to find the final output when 4 goes into g first and that result goes into f:
f(g(4))
Evaluating Composite Functions
Text solution
Evaluate the inside function g(4)Because 4 is inside g, apply g(x)=x2 first.
g(4)=42=16
Feed that output into the outside function fReplace g(4) with 16 and plug it into f(x)=2x+3.
f(g(4))=f(16)=2(16)+3=35
So putting 4 into g and feeding its output 16 into f gives a final output of 35.
When you see a small open circle between the function names, that circle means composition rather than multiplication, so rewrite it with nested parentheses right away:
composition(f∘g)(x)=f(g(x))
When f and g are given as a table or a graph instead of formulas, we still work from the inside out. On a graph, find the output height g(x) on the inside curve g, then use that number on the horizontal axis as the new input to find the height f(g(x)) on the outside curve f.
The height of the inside curve g becomes the horizontal spot where you read the outside curve f.
2
Composing Function Formulas
Instead of plugging in one number at a time, we now want a single formula for f(g(x)) and g(f(x)) that works for any input x, using f(x)=2x+3 and g(x)=x2.
Composing Function Formulas
f(x)=2x+3
g(x)=x2
f(g(x))=?
g(f(x))=?
Text solution
Open an empty input slot in the outside function fErase x in f(x)=2x+3 and leave blank parentheses for the new input.
f()=2()+3
Put the inside formula g(x)=x2 into the slotFill both parentheses with g(x) and simplify.
f(g(x))=2(g(x))+3=2(x2)+3=2x2+3
Reverse the order to find g(f(x))Open an input slot in g()=()2 and put the entire expression f(x)=2x+3 inside.
g(f(x))=(f(x))2=(2x+3)2
So f(g(x))=2x2+3 squares the input first before doubling and adding 3, while g(f(x))=(2x+3)2 doubles and adds 3 first before squaring that whole result.
3
Decomposing a Composite Function
Now we run composition backwards: given a combined function like h(x)=5x−1 or h(x)=(x+4)31, we want to split it into an inside function g(x) and an outside function f(x) so that h(x)=f(g(x)).
Decomposing a Composite Function
h(x)=5x−1
h(x)=f(g(x))
g(x)=?,f(x)=?
Text solution
Spot the inside function g(x)Look at the expression inside the square root that you would calculate first if you plugged in a number for x.
g(x)=5x−1
Write the outside function f(x)Replace that inside expression with an empty slot () and put x in the slot.
f(x)=x
Putting g(x)=5x−1 into f(x)=x rebuilds h(x)=5x−1. For a three-step formula like h(x)=(x+4)31, splitting at either g(x)=(x+4)3 with f(x)=x1 or g(x)=x+4 with f(x)=x31 works.
4
Domain of a Composite Function
Simplifying a composite formula can hide numbers that break the first step. For instance, f(g(x))=(x)2−5 simplifies to x−5, even though negative numbers don't work inside x right at the start. For g(x)=x and f(x)=x−31, we want to find the domain of f(g(x)).
Domain of a Composite Function
g(x)=x
f(x)=x2−5
Domain of f(g(x))=?
Text solution
Check 1: Restrict the input to the inside function gThe starting number x goes straight into g(x)=x, which only takes non-negative numbers.
x≥0
Check 2: Exclude any x whose output g(x) doesn't work in the outside function fBecause f(input)=input−31 cannot divide by zero, its input g(x) cannot equal 3.
g(x)xx=3=3=9
Putting both checks together, the domain of f(g(x)) is all real numbers x≥0 except x=9 (which turns into 3 inside g and causes f to divide by zero).
5
Inverse Functions on Tables and Graphs
Instead of feeding the output of f(x)=2x+3 into a second function, suppose we are given an output like 13 and want the inverse function f−1(x) that runs f in reverse to get back the original input 5.
Inverse Functions on Tables and Graphs
5
f(x)=2x+3
13
?
Text solution
Undo the steps of f(x)=2x+3 in reverse orderBecause f doubles x first and adds 3 last, the reverse process subtracts 3 first and divides by 2 last.
inverse of ff−1(x)=2x−3
Read an inverse value from a table or graph by starting at the outputTo find f−1(5) from a table where f(1)=5, find 5 in the f(x) output column and read back to the input x that gave it.
f(1)=5⟹f−1(5)=1
The −1 superscript in f−1(x) means the inverse function rather than the reciprocal f(x)1. Because f−1 swaps inputs and outputs, every point (x,y) on the graph of f becomes (y,x) on the graph of f−1.
Swapping the coordinates of every point (x,y) to (y,x) reflects the graph of f across the diagonal line y=x, and wherever the graph crosses y=x, the point and its reflection stay at the exact same spot.
Swapping input and output flips every point of a function across the diagonal mirror line onto its inverse, and the two curves meet wherever they cross that line.
6
Finding Inverse Formulas and Their Range
When x shows up in two places at once, we can't just undo the steps in our head. For the rational function below, we want to find the inverse formula f−1(x) and use it to find the range of f:
f(x)=x−32x+1
Finding Inverse Formulas and Their Range
f(x)=x−32x+1
f−1(x)=?
Range of f=?
Text solution
Replace f(x) with y and swap x and ySwapping x and y sets up the equation to solve for the original input.
yx=x−32x+1=y−32y+1
Clear the fraction and expandMultiply both sides by y−3 so y is no longer in the denominator.
x(y−3)xy−3x=2y+1=2y+1
Collect all y terms on one side and factor out yMove 2y to the left and 3x to the right, then factor out y.
xy−2yy(x−2)=3x+1=3x+1
If x=2, the last equation gives 0=7, so x=2 and we can divide by x−2:
y=x−23x+1
Swap the domains of f and f−1 to get their rangesFind the value that makes each denominator zero and swap them.
f−1(x)Domain of f:x=3Domain of f−1:x=2=x−23x+1⟺Range of f−1:y=3⟺Range of f:y=2
So the inverse is f−1(x)=x−23x+1, and looking at its denominator tells us right away that the original function f(x) can never output y=2.
7
Verifying Inverses by Composition
To prove algebraically that f(x)=2x+3 and f−1(x)=2x−3 are inverses of each other, we compose them both ways to check that every step cancels out and leaves just the starting input x.
Verifying Inverses by Composition
f(x)=2x+3
f−1(x)=2x−3
x
2x+3
?
Text solution
Compose f−1(f(x)) and simplifyPut f(x)=2x+3 into the blank slot of f−1()=2()−3.
f−1(f(x))=2(2x+3)−3=22x=x
Compose f(f−1(x)) the other wayPut f−1(x)=2x−3 into the blank slot of f()=2()+3.
f(f−1(x))=2(2x−3)+3=(x−3)+3=x
Because composing the two functions in both orders cancels every step and gives back x, they are confirmed to be inverses.
8
One-to-One Functions and the Horizontal Line Test
Not every function can be reversed as it is: we want to see why a parabola like f(x)=x2 fails to have an inverse over all real numbers, and how restricting its domain fixes the problem.
Fails Horizontal Line Test
(not one-to-one)
x
y
3
−3
y=9
(3,9)
(−3,9)
f(x)=x2
One-to-one:
f−1(x)=x
x
y
3
x≥0
y=9
(3,9)
f(x)=x2
One-to-One Functions and the Horizontal Line Test
?
f(x)=x2
9
When two different inputs like −3 and 3 get squared to give the same output 9, a horizontal line at height y=9 hits the graph twice, so a reverse function cannot tell which input to give back. Restricting the domain to x≥0 removes the left half so each output comes from only one input (making the function one-to-one), which lets f−1(x)=x reverse it cleanly.
9
Finding the Inverse of a Restricted Parabola
When a parabola is shifted and restricted to its left half, we want to find the inverse formula f−1(x) along with its domain and range:
f(x)=(x−2)2+3,x≤2
Finding the Inverse of a Restricted Parabola
x
y
f(x)=(x−2)2+3
x≤2
(2,3)
f−1(x)=?
Text solution
Swap the domain and range of the half-parabola before solvingSince the vertex is at (2,3) and the parabola opens upward on x≤2,f has Domain x≤2 and Range y≥3. Swap them to get the Domain and Range of f−1.
Domain of f−1:x≥3,Range of f−1:y≤2
Swap x and y and solve for y using ±Isolate the squared term and take the square root of both sides.
xx−3±x−3y=(y−2)2+3=(y−2)2=y−2=2±x−3
Pick the + or − sign that matches the Range of f−1Because every output of f−1 must have y≤2, we must subtract x−3 from 2 rather than add it.
f−1(x)=2−x−3,Domain: x≥3,Range: y≤2
So restricting the parabola to its left half (x≤2) picks the minus root f−1(x)=2−x−3, keeping the outputs at or below 2.
Reflecting the full parabola across y=x turns its left half (x≤2) and right half (x≥2) into the lower branch 2−x−3 and the upper branch 2+x−3. Restricting the parabola to x≤2 keeps only the lower branch, where y≤2.
Crossing both halves of the parabola gives two stacked outputs on the reflection, so keeping only the left half keeps only the lower branch.
Key concepts
Chaining functions together (f(g(x)))
Work from the inside out. To evaluate a number like (f∘g)(4)=f(g(4)), find the inside output g(4)=16 first and feed 16 into f to get f(16)=35. To combine formulas, open blank parentheses in the outside function f()=2()+3 and put the inside formula g(x)=x2 into the slot to get f(g(x))=2x2+3. Don't trust the final simplified formula for the domain (where (x)2−5=x−5 hides the square root): check first that x is allowed into g(x), and second that the output g(x) is allowed into f.
Running a function in reverse (f−1(x))
An inverse swaps every input x with its output y. Don't plug 13 in for x when asked for f−1(13):13 is already an output of f, so look up 13 in the f(x) column or on the vertical y-axis and read back to the input x=5 that gave it. On a graph, swapping (x,y)↔(y,x) reflects the curve across the line y=x, keeping any point on y=x in the same place, and swaps the domain and range:
Domain of f=Range of f−1,Range of f=Domain of f−1
Finding and checking inverse formulas
When x appears in both the top and bottom of a fraction, like f(x)=x−32x+1, swap x and y, clear the fraction, move all y-terms to one side, and factor out y as y(x−2)=3x+1; the domain of the resulting inverse f−1(x)=x−23x+1 (x=2) gives you the range of f (y=2).
When a parabola fails the Horizontal Line Test, restrict its domain to one half before finding the inverse, and use that restriction (now the range of f−1) to pick between + and − after taking a square root: x≤2 on f(x)=(x−2)2+3 becomes y≤2 on f−1, which picks f−1(x)=2−x−3.
When asked to prove or verify that two given functions are inverses, compose them both ways and show that f(g(x))=x for every x in the domain of g and g(f(x))=x for every x in the domain of f.
10
Practice
1
Using the table {(x=1,f(x)=4,g(x)=2),(x=2,f(x)=7,g(x)=3),(x=3,f(x)=1,g(x)=4),(x=4,f(x)=2,g(x)=1)}, find (f∘g)(2) and f−1(4).
Finding f(2)=7 first, or multiplying f(2)⋅g(2)=21, is the common trap.
Rewrite (f∘g)(2) as f(g(2)) and look up the inside part first; for f−1(4), ask which column the 4 belongs to.
For f(g(2)), the row x=2 gives g(2)=3, and feeding 3 into f gives f(3)=1 (finding f(2)=7 first, or multiplying f(2)⋅g(2)=21, is the common trap). For f−1(4), look for 4 in the f(x) output column rather than the x input column (looking at x=4 gives f(4)=2 instead of the inverse): (f∘g)(2)=f(g(2))=f(3)=1, and f−1(4)=1.
2
Given f(x)=3x−2 and g(x)=x2+1, find the formulas for (f∘g)(x) and (g∘f)(x).
Write the outside function with empty parentheses (f()=3()−2 first, then g()=()2+1 second) before putting the inside formula into the slot.
Putting g(x) into f gives 3(x2+1)−2, where distributing 3 to both terms inside the parentheses (forgetting to multiply +1 by 3 gives the wrong answer 3x2−1) gives 3x2+3−2. Putting f(x) into g puts the whole expression 3x−2 in parentheses before squaring (squaring only x gives 3x2−1): (f∘g)(x)=3x2+1 and (g∘f)(x)=(3x−2)2+1.
3
Write h(x)=(3x−5)41 as a composition f(g(x)) of two simpler functions f(x) and g(x), where neither function is just x.
If you plugged a number in for x, what part in the denominator would you calculate before dividing into 1?
Make g(x) the denominator expression you calculate first, and make f(x) the step of dividing 1 by that result (swapping the two gives f(g(x))=(x3−5)4, which reverses the order of operations): g(x)=(3x−5)4 and f(x)=x1 (or g(x)=3x−5 and f(x)=x41).
4
Given g(x)=x−1 and f(x)=x−41, find the domain of f(g(x)).
Check two places: what values of x are allowed inside x−1, and what value of x makes the output x−1 equal 4, which makes the denominator of f zero?
Inside g(x),x−1≥0 gives x≥1. Then the input to f, which is g(x), cannot equal 4, so set x−1=4 (just looking at f(x) and writing x=4 forgets that f receives x−1 rather than x), which squares to x−1=16:x≥1,x=17.
5
The graph of a one-to-one function f starts at (−3,−1), passes through (2,2), and ends at (4,7), with Domain [−3,4] and Range [−1,7]. Find the corresponding three points on the graph of f−1, identify which point stays in the same place when reflected across y=x, and state the Domain and Range of f−1.
Negating the coordinates to (3,1),(−2,−2),(−4,−7) reflects across the origin instead of y=x.
How do the coordinates (x,y) of each point, along with the domain and range, swap places for f−1?
Swap the two coordinates (x,y)→(y,x) of each point rather than changing their signs (negating the coordinates to (3,1),(−2,−2),(−4,−7) reflects across the origin instead of y=x): the points on f−1 are (−1,−3),(2,2), and (7,4); the point (2,2) stays in place because it lies on y=x; the Domain of f−1 is [−1,7] and the Range of f−1 is [−3,4].
6
For f(x)=x−54x+3, find the formula for f−1(x), and use it to state the Domain and Range of f.
After swapping x and y and multiplying both sides by y−5, move every term with y to the left side and every term without y to the right side so you can factor out y.
From x=y−54y+3, clearing the fraction gives xy−5x=4y+3; moving 4y left and −5x right gives xy−4y=5x+3 (forgetting to flip the signs when moving terms across gives x+43−5x), and factoring y(x−4)=5x+3 isolates y:f−1(x)=x−45x+3; the Domain of f is x=5 and the Range of f is y=4.
7
Prove algebraically using composition that f(x)=4x−5 and g(x)=4x+5 are inverses of each other.
Put g(x) into the blank slot of f()=4()−5 and simplify, then put f(x) into g()=4()+5.
Show the steps canceling out in both orders rather than plugging in a single test number like x=1 (testing one number does not prove it for all x): f(g(x))=4(4x+5)−5=(x+5)−5=x, and g(f(x))=4(4x−5)+5=44x=x.
8
Find the inverse formula f−1(x), along with its Domain and Range, for f(x)=(x+1)2−4 on the restricted domain x≤−1.
Find the Domain and Range of f from its vertex (−1,−4) and swap them first: which sign on ±x+4 gives outputs that match the Range of f−1?
With vertex (−1,−4),f has Domain x≤−1 and Range y≥−4, so f−1 has Domain x≥−4 and Range y≤−1. Solving x=(y+1)2−4 gives y=−1±x+4, and because the Range of f−1 requires y≤−1, we must keep the minus sign rather than automatically picking the positive root (keeping +x+4 gives −1+x+4, which is the inverse of the right half x≥−1): f−1(x)=−1−x+4, with Domain x≥−4 and Range y≤−1.