PrecalculusFunctions3 of 3
Functions · 3

Composite and Inverse Functions

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\fn{f}(x) = \fn{2x + 3} and g(x)=x2\gn{g}(x) = \gn{x^2}, we want to find the final output when 44 goes into g\gn{g} first and that result goes into f\fn{f}:

f(g(4))\displaystyle \fn{f}(\gn{g(4)})
Evaluating Composite Functions
g(x)=x2\htmlClass{lc-green}{g}(x) = \htmlClass{lc-green}{x^2}
f(x)=2x+3\htmlClass{lc-blue}{f}(x) = \htmlClass{lc-blue}{2x + 3}
44
g\htmlClass{lc-green}{g}
f\htmlClass{lc-blue}{f}
??
Text solution
Evaluate the inside function g(4)\gn{g(4)}Because 44 is inside g\gn{g}, apply g(x)=x2\gn{g}(x) = \gn{x^2} first.
g(4)\displaystyle \gn{g(4)} =42\displaystyle = 4^{\gn{2}} =16\displaystyle = \gn{16}
Feed that output into the outside function f\fn{f}Replace g(4)\gn{g(4)} with 16\gn{16} and plug it into f(x)=2x+3\fn{f}(x) = \fn{2x + 3}.
f(g(4))=f(16)=2(16)+3=35\displaystyle \begin{aligned} \fn{f}(\gn{g(4)}) &= \fn{f}(\gn{16}) \\ &= \fn{2}(\gn{16}) + \fn{3} \\ &= 35 \end{aligned}

So putting 44 into g\gn{g} and feeding its output 16\gn{16} into f\fn{f} gives a final output of 3535.

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:

(f∘g)(x)⏟composition\displaystyle \underbrace{(\fn{f} \circ \gn{g})(x)}_{\text{composition}} =f(g(x))\displaystyle = \fn{f}(\gn{g(x)})

When f\fn{f} and g\gn{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)\gn{g(x)} on the inside curve g\gn{g}, then use that number on the horizontal axis as the new input to find the height f(g(x))\fn{f}(\gn{g(x)}) on the outside curve f\fn{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))\fn{f}(\gn{g(x)}) and g(f(x))\gn{g}(\fn{f(x)}) that works for any input xx, using f(x)=2x+3\fn{f}(x) = \fn{2x + 3} and g(x)=x2\gn{g}(x) = \gn{x^2}.

Composing Function Formulas
f(x)\displaystyle \hspace{1.9em}\mathllap{\fn{f}(x)} =2x+3\displaystyle = \mathrlap{\fn{2x + 3}}\hspace{2.9em}
g(x)\displaystyle \hspace{1.9em}\mathllap{\gn{g}(x)} =x2\displaystyle = \mathrlap{\gn{x^2}}\hspace{2.9em}
f(g(x))\displaystyle \hspace{3.2em}\mathllap{\fn{f}(\gn{g(x)})} =?\displaystyle = \mathrlap{?}\hspace{0.8em}
g(f(x))\displaystyle \hspace{3.2em}\mathllap{\gn{g}(\fn{f(x)})} =?\displaystyle = \mathrlap{?}\hspace{0.8em}
Text solution
Open an empty input slot in the outside function f\fn{f}Erase xx in f(x)=2x+3\fn{f}(x) = \fn{2x + 3} and leave blank parentheses for the new input.
f(  )\displaystyle \fn{f}(\,\quad\,) =2(  )+3\displaystyle = \fn{2}(\,\quad\,) + \fn{3}
Put the inside formula g(x)=x2\gn{g}(x) = \gn{x^2} into the slotFill both parentheses with g(x)\gn{g(x)} and simplify.
f(g(x))=2(g(x))+3=2(x2)+3=2x2+3\displaystyle \begin{aligned} \fn{f}(\gn{g(x)}) &= \fn{2}(\gn{g(x)}) + \fn{3} \\ &= \fn{2}(\gn{x^2}) + \fn{3} \\ &= 2x^2 + 3 \end{aligned}
Reverse the order to find g(f(x))\gn{g}(\fn{f(x)})Open an input slot in g(  )=(  )2\gn{g}(\,\quad\,) = (\,\quad\,)^{\gn{2}} and put the entire expression f(x)=2x+3\fn{f}(x) = \fn{2x + 3} inside.
g(f(x))=(f(x))2=(2x+3)2\displaystyle \begin{aligned} \gn{g}(\fn{f(x)}) &= (\fn{f(x)})^{\gn{2}} \\ &= (\fn{2x + 3})^{\gn{2}} \end{aligned}

So f(g(x))=2x2+3\fn{f}(\gn{g(x)}) = 2x^2 + 3 squares the input first before doubling and adding 3\fn{3}, while g(f(x))=(2x+3)2\gn{g}(\fn{f(x)}) = (\fn{2x + 3})^{\gn{2}} doubles and adds 3\fn{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−1h(x) = \sqrt{5x - 1} or h(x)=1(x+4)3h(x) = \dfrac{1}{(x + 4)^3}, we want to split it into an inside function g(x)\gn{g(x)} and an outside function f(x)\fn{f(x)} so that h(x)=f(g(x))h(x) = \fn{f}(\gn{g(x)}).

Decomposing a Composite Function
h(x)\displaystyle \hspace{1.9em}\mathllap{h(x)} =5x−1\displaystyle = \mathrlap{\sqrt{5x - 1}}\hspace{3.6em}
h(x)\displaystyle \hspace{1.9em}\mathllap{h(x)} =f(g(x))\displaystyle = \mathrlap{\fn{f}(\gn{g(x)})}\hspace{3.6em}
g(x)\displaystyle \gn{g}(x) =  ?,f(x)\displaystyle = \;?, \quad \fn{f}(x) =  ?\displaystyle = \;?
Text solution
Spot the inside function g(x)\gn{g(x)}Look at the expression inside the square root that you would calculate first if you plugged in a number for xx.
g(x)\displaystyle \gn{g}(x) =5x−1\displaystyle = \gn{5x - 1}
Write the outside function f(x)\fn{f(x)}Replace that inside expression with an empty slot (  )\fn{\sqrt{(\,\quad\,)}} and put xx in the slot.
f(x)\displaystyle \fn{f}(x) =x\displaystyle = \fn{\sqrt{x}}

Putting g(x)=5x−1\gn{g}(x) = \gn{5x - 1} into f(x)=x\fn{f}(x) = \fn{\sqrt{x}} rebuilds h(x)=5x−1h(x) = \fn{\sqrt{\gn{5x - 1}}}. For a three-step formula like h(x)=1(x+4)3h(x) = \dfrac{1}{(x + 4)^3}, splitting at either g(x)=(x+4)3\gn{g}(x) = \gn{(x + 4)^3} with f(x)=1x\fn{f}(x) = \fn{\dfrac{1}{x}} or g(x)=x+4\gn{g}(x) = \gn{x + 4} with f(x)=1x3\fn{f}(x) = \fn{\dfrac{1}{x^3}} 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\fn{f}(\gn{g(x)}) = (\gn{\sqrt{x}})^{\fn{2}} - \fn{5} simplifies to x−5x - 5, even though negative numbers don't work inside x\gn{\sqrt{x}} right at the start. For g(x)=x\gn{g}(x) = \gn{\sqrt{x}} and f(x)=1x−3\fn{f}(x) = \fn{\dfrac{1}{x - 3}}, we want to find the domain of f(g(x))\fn{f}(\gn{g(x)}).

xx
Check 1:\text{Check 1:}
x≥0x \ge 0
g(x)=x\htmlClass{lc-green}{g}(x) = \htmlClass{lc-green}{\sqrt{x}}
x\htmlClass{lc-green}{\sqrt{x}}
Check 2:\text{Check 2:}
x≠3⇒x≠9\htmlClass{lc-green}{\sqrt{x}} \ne \htmlClass{lc-blue}{3} \Rightarrow x \ne 9
f(input)=1input−3\htmlClass{lc-blue}{f}(\text{input}) = \htmlClass{lc-blue}{\dfrac{1}{\text{input} - 3}}
f(g(x))\htmlClass{lc-blue}{f}(\htmlClass{lc-green}{g(x)})
Domain of a Composite Function
g(x)\displaystyle \hspace{1.9em}\mathllap{\gn{g}(x)} =x\displaystyle = \mathrlap{\gn{\sqrt{x}}}\hspace{2.6em}
f(x)\displaystyle \hspace{1.9em}\mathllap{\fn{f}(x)} =x2−5\displaystyle = \mathrlap{\fn{x^2 - 5}}\hspace{2.6em}
Domain of f(g(x))\displaystyle \text{Domain of } \fn{f}(\gn{g(x)}) =  ?\displaystyle = \;?
Text solution
Check 1: Restrict the input to the inside function g\gn{g}The starting number xx goes straight into g(x)=x\gn{g}(x) = \gn{\sqrt{x}}, which only takes non-negative numbers.
x\displaystyle x ≥0\displaystyle \ge 0
Check 2: Exclude any xx whose output g(x)\gn{g(x)} doesn't work in the outside function f\fn{f}Because f(input)=1input−3\fn{f}(\text{input}) = \fn{\dfrac{1}{\text{input} - 3}} cannot divide by zero, its input g(x)\gn{g(x)} cannot equal 3\fn{3}.
g(x)≠3x≠3x≠9\displaystyle \begin{aligned} \gn{g(x)} &\ne \fn{3} \\ \gn{\sqrt{x}} &\ne \fn{3} \\ x &\ne 9 \end{aligned}

Putting both checks together, the domain of f(g(x))\fn{f}(\gn{g(x)}) is all real numbers x≥0x \ge 0 except x=9x = 9 (which turns into 3\gn{3} inside g\gn{g} and causes f\fn{f} to divide by zero).

5

Inverse Functions on Tables and Graphs

Instead of feeding the output of f(x)=2x+3\fn{f}(x) = \fn{2x + 3} into a second function, suppose we are given an output like 13\outp{13} and want the inverse function f−1(x)\finv{f^{-1}}(x) that runs f\fn{f} in reverse to get back the original input 5\inp{5}.

Inverse Functions on Tables and Graphs
5\htmlClass{lc-violet}{5}
f(x)=2x+3\htmlClass{lc-blue}{f}(x) = \htmlClass{lc-blue}{2x + 3}
13\htmlClass{lc-orange}{13}
??
Text solution
Undo the steps of f(x)=2x+3\fn{f}(x) = \fn{2x + 3} in reverse orderBecause f\fn{f} doubles xx first and adds 3\fn{3} last, the reverse process subtracts 3\finv{3} first and divides by 2\finv{2} last.
f−1(x)⏟inverse of f\displaystyle \underbrace{\finv{f^{-1}}(x)}_{\text{inverse of } \fn{f}} =x−32\displaystyle = \finv{\frac{x - 3}{2}}
Read an inverse value from a table or graph by starting at the outputTo find f−1(5)\finv{f^{-1}}(\outp{5}) from a table where f(1)=5\fn{f}(\inp{1}) = \outp{5}, find 5\outp{5} in the f(x)\fn{f}(x) output column and read back to the input x\inp{x} that gave it.
f(1)\displaystyle \fn{f}(\inp{1}) =5  ⟹  f−1(5)\displaystyle = \outp{5} \implies \finv{f^{-1}}(\outp{5}) =1\displaystyle = \inp{1}

The −1-1 superscript in f−1(x)\finv{f^{-1}}(x) means the inverse function rather than the reciprocal 1f(x)\dfrac{1}{\fn{f(x)}}. Because f−1\finv{f^{-1}} swaps inputs and outputs, every point (x,y)(\inp{x}, \outp{y}) on the graph of f\fn{f} becomes (y,x)(\outp{y}, \inp{x}) on the graph of f−1\finv{f^{-1}}.

Swapping the coordinates of every point (x,y)(\inp{x}, \outp{y}) to (y,x)(\outp{y}, \inp{x}) reflects the graph of f\fn{f} across the diagonal line y=xy = x, and wherever the graph crosses y=xy = 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 xx 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)\finv{f^{-1}}(x) and use it to find the range of f\fn{f}:

f(x)\displaystyle \fn{f}(x) =2x+1x−3\displaystyle = \fn{\frac{2x + 1}{x - 3}}
Finding Inverse Formulas and Their Range
f(x)\displaystyle \fn{f}(x) =2x+1x−3\displaystyle = \fn{\dfrac{2x + 1}{x - 3}}
f−1(x)\displaystyle \hspace{4.5em}\mathllap{\finv{f^{-1}}(x)} =?\displaystyle = \mathrlap{?}\hspace{0.8em}
Range of f\displaystyle \hspace{4.5em}\mathllap{\outp{\text{Range of } f}} =?\displaystyle = \mathrlap{?}\hspace{0.8em}
Text solution
Replace f(x)\fn{f}(x) with yy and swap xx and yySwapping xx and yy sets up the equation to solve for the original input.
y=2x+1x−3x=2y+1y−3\displaystyle \begin{aligned} y &= \fn{\frac{2x + 1}{x - 3}} \\ x &= \frac{2\inp{y} + 1}{\inp{y} - 3} \end{aligned}
Clear the fraction and expandMultiply both sides by y−3\inp{y} - 3 so y\inp{y} is no longer in the denominator.
x(y−3)=2y+1xy−3x=2y+1\displaystyle \begin{aligned} x(\inp{y} - 3) &= 2\inp{y} + 1 \\ x\inp{y} - 3x &= 2\inp{y} + 1 \end{aligned}
Collect all y\inp{y} terms on one side and factor out y\inp{y}Move 2y2\inp{y} to the left and 3x3x to the right, then factor out y\inp{y}.
xy−2y=3x+1y(x−2)=3x+1\displaystyle \begin{aligned} x\inp{y} - 2\inp{y} &= 3x + 1 \\ \inp{y}(x - 2) &= 3x + 1 \end{aligned}
If x=2x = 2, the last equation gives 0=70 = 7, so x≠2\outp{x \ne 2} and we can divide by x−2x - 2:
y\displaystyle \inp{y} =3x+1x−2\displaystyle = \frac{3x + 1}{x - 2}
Swap the domains of f\fn{f} and f−1\finv{f^{-1}} to get their rangesFind the value that makes each denominator zero and swap them.
f−1(x)=3x+1x−2Domain of f:x≠3  ⟺  Range of f−1:y≠3Domain of f−1:x≠2  ⟺  Range of f:y≠2\displaystyle \begin{aligned} \finv{f^{-1}}(x) &= \finv{\frac{3x + 1}{x - 2}} \\ \text{Domain of } \fn{f}: \inp{x \ne 3} &\iff \text{Range of } \finv{f^{-1}}: \inp{y \ne 3} \\ \text{Domain of } \finv{f^{-1}}: \outp{x \ne 2} &\iff \text{Range of } \fn{f}: \outp{y \ne 2} \end{aligned}

So the inverse is f−1(x)=3x+1x−2\finv{f^{-1}}(x) = \finv{\dfrac{3x + 1}{x - 2}}, and looking at its denominator tells us right away that the original function f(x)\fn{f}(x) can never output y=2\outp{y = 2}.

7

Verifying Inverses by Composition

To prove algebraically that f(x)=2x+3\fn{f}(x) = \fn{2x + 3} and f−1(x)=x−32\finv{f^{-1}}(x) = \finv{\dfrac{x - 3}{2}} are inverses of each other, we compose them both ways to check that every step cancels out and leaves just the starting input xx.

Verifying Inverses by Composition
f(x)=2x+3\htmlClass{lc-blue}{f}(x) = \htmlClass{lc-blue}{2x + 3}
f−1(x)=x−32\htmlClass{lc-pink}{f^{-1}}(x) = \htmlClass{lc-pink}{\dfrac{x - 3}{2}}
xx
2x+3\htmlClass{lc-blue}{2x + 3}
??
Text solution
Compose f−1(f(x))\finv{f^{-1}}(\fn{f(x)}) and simplifyPut f(x)=2x+3\fn{f}(x) = \fn{2x + 3} into the blank slot of f−1(  )=(  )−32\finv{f^{-1}}(\,\quad\,) = \dfrac{(\,\quad\,) - \finv{3}}{\finv{2}}.
f−1(f(x))=(2x+3)−32=2x2=x\displaystyle \begin{aligned} \finv{f^{-1}}(\fn{f(x)}) &= \frac{(\fn{2x + 3}) - \finv{3}}{\finv{2}} \\ &= \frac{2x}{2} \\ &= x \end{aligned}
Compose f(f−1(x))\fn{f}(\finv{f^{-1}(x)}) the other wayPut f−1(x)=x−32\finv{f^{-1}}(x) = \finv{\dfrac{x - 3}{2}} into the blank slot of f(  )=2(  )+3\fn{f}(\,\quad\,) = \fn{2}(\,\quad\,) + \fn{3}.
f(f−1(x))=2(x−32)+3=(x−3)+3=x\displaystyle \begin{aligned} \fn{f}(\finv{f^{-1}(x)}) &= \fn{2}\left(\finv{\frac{x - 3}{2}}\right) + \fn{3} \\ &= (x - 3) + 3 \\ &= x \end{aligned}

Because composing the two functions in both orders cancels every step and gives back xx, 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\fn{f}(x) = \fn{x^2} fails to have an inverse over all real numbers, and how restricting its domain fixes the problem.

Fails Horizontal Line Test\text{Fails Horizontal Line Test}
(not one-to-one)\text{(not one-to-one)}
xx
yy
3\htmlClass{lc-violet}{3}
−3\htmlClass{lc-violet}{-3}
y=9\htmlClass{lc-orange}{y = 9}
(3, 9)\htmlClass{lc-blue}{(3,\ 9)}
(−3, 9)\htmlClass{lc-blue}{(-3,\ 9)}
f(x)=x2\htmlClass{lc-blue}{f}(x) = \htmlClass{lc-blue}{x^2}
One-to-one:\text{One-to-one:}
f−1(x)=x\htmlClass{lc-pink}{f^{-1}}(x) = \htmlClass{lc-pink}{\sqrt{x}}
xx
yy
3\htmlClass{lc-violet}{3}
x≥0\htmlClass{lc-violet}{x \ge 0}
y=9\htmlClass{lc-orange}{y = 9}
(3, 9)\htmlClass{lc-blue}{(3,\ 9)}
f(x)=x2\htmlClass{lc-blue}{f}(x) = \htmlClass{lc-blue}{x^2}
One-to-One Functions and the Horizontal Line Test
?\htmlClass{lc-violet}{?}
f(x)=x2\htmlClass{lc-blue}{f}(x) = \htmlClass{lc-blue}{x^2}
9\htmlClass{lc-orange}{9}

When two different inputs like −3\inp{-3} and 3\inp{3} get squared to give the same output 9\outp{9}, a horizontal line at height y=9\outp{y = 9} hits the graph twice, so a reverse function cannot tell which input to give back. Restricting the domain to x≥0\inp{x \ge 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\finv{f^{-1}}(x) = \finv{\sqrt{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)\finv{f^{-1}}(x) along with its domain and range:

f(x)\displaystyle \fn{f}(x) =(x−2)2+3,x≤2\displaystyle = \fn{(x - 2)^2 + 3}, \quad \inp{x \le 2}
Finding the Inverse of a Restricted Parabola
xx
yy
f(x)=(x−2)2+3\htmlClass{lc-blue}{f}(x) = \htmlClass{lc-blue}{(x - 2)^2 + 3}
x≤2\htmlClass{lc-violet}{x \le 2}
(2, 3)\htmlClass{lc-blue}{(2,\ 3)}
f−1(x)=  ?\htmlClass{lc-pink}{f^{-1}}(x) = \;?
Text solution
Swap the domain and range of the half-parabola before solvingSince the vertex is at (2,3)(2, 3) and the parabola opens upward on x≤2\inp{x \le 2}, f\fn{f} has Domain x≤2\inp{x \le 2} and Range y≥3\outp{y \ge 3}. Swap them to get the Domain and Range of f−1\finv{f^{-1}}.
Domain of f−1:x≥3,Range of f−1:y≤2\displaystyle \text{Domain of } \finv{f^{-1}}: \outp{x \ge 3}, \qquad \text{Range of } \finv{f^{-1}}: \inp{y \le 2}
Swap xx and yy and solve for y\inp{y} using ±   \pm\sqrt{\,\,\,}Isolate the squared term and take the square root of both sides.
x=(y−2)2+3x−3=(y−2)2±x−3=y−2y=2±x−3\displaystyle \begin{aligned} x &= (\inp{y} - 2)^2 + 3 \\ x - 3 &= (\inp{y} - 2)^2 \\ \pm\sqrt{x - 3} &= \inp{y} - 2 \\ \inp{y} &= 2 \pm \sqrt{x - 3} \end{aligned}
Pick the ++ or −- sign that matches the Range of f−1\finv{f^{-1}}Because every output of f−1\finv{f^{-1}} must have y≤2\inp{y \le 2}, we must subtract x−3\sqrt{x - 3} from 22 rather than add it.
f−1(x)\displaystyle \finv{f^{-1}}(x) =2−x−3,Domain: x≥3,Range: y≤2\displaystyle = \finv{2 - \sqrt{x - 3}}, \qquad \text{Domain: } \outp{x \ge 3}, \quad \text{Range: } \inp{y \le 2}

So restricting the parabola to its left half (x≤2\inp{x \le 2}) picks the minus root f−1(x)=2−x−3\finv{f^{-1}}(x) = \finv{2 - \sqrt{x - 3}}, keeping the outputs at or below 22.

Reflecting the full parabola across y=xy = x turns its left half (x≤2\inp{x \le 2}) and right half (x≥2x \ge 2) into the lower branch 2−x−3\finv{2 - \sqrt{x - 3}} and the upper branch 2+x−32 + \sqrt{x - 3}. Restricting the parabola to x≤2\inp{x \le 2} keeps only the lower branch, where y≤2\inp{y \le 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))\fn{f}(\gn{g(x)}))

Work from the inside out. To evaluate a number like (f∘g)(4)=f(g(4))(\fn{f} \circ \gn{g})(4) = \fn{f}(\gn{g(4)}), find the inside output g(4)=16\gn{g(4)} = \gn{16} first and feed 16\gn{16} into f\fn{f} to get f(16)=35\fn{f}(\gn{16}) = 35. To combine formulas, open blank parentheses in the outside function f(  )=2(  )+3\fn{f}(\,\quad\,) = \fn{2}(\,\quad\,) + \fn{3} and put the inside formula g(x)=x2\gn{g}(x) = \gn{x^2} into the slot to get f(g(x))=2x2+3\fn{f}(\gn{g(x)}) = 2x^2 + 3. Don't trust the final simplified formula for the domain (where (x)2−5=x−5(\gn{\sqrt{x}})^{\fn{2}} - \fn{5} = x - 5 hides the square root): check first that xx is allowed into g(x)\gn{g(x)}, and second that the output g(x)\gn{g(x)} is allowed into f\fn{f}.

Running a function in reverse (f−1(x)\finv{f^{-1}}(x))

An inverse swaps every input x\inp{x} with its output y\outp{y}. Don't plug 1313 in for xx when asked for f−1(13)\finv{f^{-1}}(\outp{13}): 13\outp{13} is already an output of f\fn{f}, so look up 13\outp{13} in the f(x)\fn{f}(x) column or on the vertical yy-axis and read back to the input x=5\inp{x = 5} that gave it. On a graph, swapping (x,y)↔(y,x)(\inp{x}, \outp{y}) \leftrightarrow (\outp{y}, \inp{x}) reflects the curve across the line y=xy = x, keeping any point on y=xy = x in the same place, and swaps the domain and range:

Domain of f\displaystyle \inp{\text{Domain of }} \fn{f} =Range of f−1,Range of f\displaystyle = \inp{\text{Range of }} \finv{f^{-1}}, \qquad \outp{\text{Range of }} \fn{f} =Domain of f−1\displaystyle = \outp{\text{Domain of }} \finv{f^{-1}}

Finding and checking inverse formulas

  • When xx appears in both the top and bottom of a fraction, like f(x)=2x+1x−3\fn{f}(x) = \fn{\dfrac{2x + 1}{x - 3}}, swap xx and yy, clear the fraction, move all yy-terms to one side, and factor out y\inp{y} as y(x−2)=3x+1\inp{y}(x - 2) = 3x + 1; the domain of the resulting inverse f−1(x)=3x+1x−2\finv{f^{-1}}(x) = \finv{\dfrac{3x + 1}{x - 2}} (x≠2\outp{x \ne 2}) gives you the range of f\fn{f} (y≠2\outp{y \ne 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\finv{f^{-1}}) to pick between ++ and −- after taking a square root: x≤2\inp{x \le 2} on f(x)=(x−2)2+3\fn{f}(x) = \fn{(x - 2)^2 + 3} becomes y≤2\inp{y \le 2} on f−1\finv{f^{-1}}, which picks f−1(x)=2−x−3\finv{f^{-1}}(x) = \finv{2 - \sqrt{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\fn{f}(\gn{g(x)}) = x for every xx in the domain of g\gn{g} and g(f(x))=x\gn{g}(\fn{f(x)}) = x for every xx in the domain of f\fn{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)}\{(x = 1, \fn{f}(x) = 4, \gn{g}(x) = 2), (x = 2, \fn{f}(x) = 7, \gn{g}(x) = 3), (x = 3, \fn{f}(x) = 1, \gn{g}(x) = 4), (x = 4, \fn{f}(x) = 2, \gn{g}(x) = 1)\}, find (f∘g)(2)(\fn{f} \circ \gn{g})(2) and f−1(4)\finv{f^{-1}}(4).

Rewrite (f∘g)(2)(\fn{f} \circ \gn{g})(2) as f(g(2))\fn{f}(\gn{g(2)}) and look up the inside part first; for f−1(4)\finv{f^{-1}}(4), ask which column the 44 belongs to.

For f(g(2))\fn{f}(\gn{g(2)}), the row x=2x = 2 gives g(2)=3\gn{g(2)} = \gn{3}, and feeding 3\gn{3} into f\fn{f} gives f(3)=1\fn{f}(\gn{3}) = 1 (finding f(2)=7\fn{f}(2) = 7 first, or multiplying f(2)⋅g(2)=21\fn{f}(2) \cdot \gn{g}(2) = 21, is the common trap). For f−1(4)\finv{f^{-1}}(\outp{4}), look for 4\outp{4} in the f(x)\fn{f}(x) output column rather than the xx input column (looking at x=4x = 4 gives f(4)=2\fn{f}(4) = 2 instead of the inverse): (f∘g)(2)=f(g(2))=f(3)=1(\fn{f} \circ \gn{g})(2) = \fn{f}(\gn{g(2)}) = \fn{f}(\gn{3}) = 1, and f−1(4)=1\finv{f^{-1}}(4) = 1.
2

Given f(x)=3x−2\fn{f}(x) = \fn{3x - 2} and g(x)=x2+1\gn{g}(x) = \gn{x^2 + 1}, find the formulas for (f∘g)(x)(\fn{f} \circ \gn{g})(x) and (g∘f)(x)(\gn{g} \circ \fn{f})(x).

Write the outside function with empty parentheses (f(  )=3(  )−2\fn{f}(\,\quad\,) = \fn{3}(\,\quad\,) - \fn{2} first, then g(  )=(  )2+1\gn{g}(\,\quad\,) = (\,\quad\,)^{\gn{2}} + \gn{1} second) before putting the inside formula into the slot.

Putting g(x)\gn{g(x)} into f\fn{f} gives 3(x2+1)−2\fn{3}(\gn{x^2 + 1}) - \fn{2}, where distributing 3\fn{3} to both terms inside the parentheses (forgetting to multiply +1+1 by 33 gives the wrong answer 3x2−13x^2 - 1) gives 3x2+3−23x^2 + 3 - 2. Putting f(x)\fn{f(x)} into g\gn{g} puts the whole expression 3x−2\fn{3x - 2} in parentheses before squaring (squaring only xx gives 3x2−13x^2 - 1): (f∘g)(x)=3x2+1(\fn{f} \circ \gn{g})(x) = 3x^2 + 1 and (g∘f)(x)=(3x−2)2+1(\gn{g} \circ \fn{f})(x) = (3x - 2)^2 + 1.
3

Write h(x)=1(3x−5)4h(x) = \dfrac{1}{(3x - 5)^4} as a composition f(g(x))\fn{f}(\gn{g(x)}) of two simpler functions f(x)\fn{f}(x) and g(x)\gn{g}(x), where neither function is just xx.

If you plugged a number in for xx, what part in the denominator would you calculate before dividing into 11?

Make g(x)\gn{g(x)} the denominator expression you calculate first, and make f(x)\fn{f(x)} the step of dividing 11 by that result (swapping the two gives f(g(x))=(3x−5)4\fn{f}(\gn{g(x)}) = \left(\frac{3}{x} - 5\right)^4, which reverses the order of operations): g(x)=(3x−5)4\gn{g}(x) = (3x - 5)^4 and f(x)=1x\fn{f}(x) = \dfrac{1}{x} (or g(x)=3x−5\gn{g}(x) = 3x - 5 and f(x)=1x4\fn{f}(x) = \dfrac{1}{x^4}).
4

Given g(x)=x−1\gn{g}(x) = \gn{\sqrt{x - 1}} and f(x)=1x−4\fn{f}(x) = \fn{\dfrac{1}{x - 4}}, find the domain of f(g(x))\fn{f}(\gn{g(x)}).

Check two places: what values of xx are allowed inside x−1\gn{\sqrt{x - 1}}, and what value of xx makes the output x−1\gn{\sqrt{x - 1}} equal 4\fn{4}, which makes the denominator of f\fn{f} zero?

Inside g(x)\gn{g(x)}, x−1≥0x - 1 \ge 0 gives x≥1x \ge 1. Then the input to f\fn{f}, which is g(x)\gn{g(x)}, cannot equal 4\fn{4}, so set x−1≠4\gn{\sqrt{x - 1}} \ne \fn{4} (just looking at f(x)\fn{f}(x) and writing x≠4x \ne 4 forgets that f\fn{f} receives x−1\gn{\sqrt{x - 1}} rather than xx), which squares to x−1≠16x - 1 \ne 16: x≥1,x≠17x \ge 1, x \ne 17.
5

The graph of a one-to-one function f\fn{f} starts at (−3,−1)(-3, -1), passes through (2,2)(2, 2), and ends at (4,7)(4, 7), with Domain [−3,4][-3, 4] and Range [−1,7][-1, 7]. Find the corresponding three points on the graph of f−1\finv{f^{-1}}, identify which point stays in the same place when reflected across y=xy = x, and state the Domain and Range of f−1\finv{f^{-1}}.

How do the coordinates (x,y)(x, y) of each point, along with the domain and range, swap places for f−1\finv{f^{-1}}?

Swap the two coordinates (x,y)→(y,x)(\inp{x}, \outp{y}) \to (\outp{y}, \inp{x}) of each point rather than changing their signs (negating the coordinates to (3,1),(−2,−2),(−4,−7)(3, 1), (-2, -2), (-4, -7) reflects across the origin instead of y=xy = x): the points on f−1\finv{f^{-1}} are (−1,−3)(-1, -3), (2,2)(2, 2), and (7,4)(7, 4); the point (2,2)(2, 2) stays in place because it lies on y=xy = x; the Domain of f−1\finv{f^{-1}} is [−1,7][-1, 7] and the Range of f−1\finv{f^{-1}} is [−3,4][-3, 4].
6

For f(x)=4x+3x−5\fn{f}(x) = \fn{\dfrac{4x + 3}{x - 5}}, find the formula for f−1(x)\finv{f^{-1}}(x), and use it to state the Domain and Range of f\fn{f}.

After swapping xx and yy and multiplying both sides by y−5y - 5, move every term with yy to the left side and every term without yy to the right side so you can factor out yy.

From x=4y+3y−5x = \dfrac{4\inp{y} + 3}{\inp{y} - 5}, clearing the fraction gives xy−5x=4y+3x\inp{y} - 5x = 4\inp{y} + 3; moving 4y4\inp{y} left and −5x-5x right gives xy−4y=5x+3x\inp{y} - 4\inp{y} = 5x + 3 (forgetting to flip the signs when moving terms across gives 3−5xx+4\dfrac{3 - 5x}{x + 4}), and factoring y(x−4)=5x+3\inp{y}(x - 4) = 5x + 3 isolates y\inp{y}: f−1(x)=5x+3x−4\finv{f^{-1}}(x) = \dfrac{5x + 3}{x - 4}; the Domain of f\fn{f} is x≠5x \ne 5 and the Range of f\fn{f} is y≠4y \ne 4.
7

Prove algebraically using composition that f(x)=4x−5\fn{f}(x) = \fn{4x - 5} and g(x)=x+54\gn{g}(x) = \gn{\dfrac{x + 5}{4}} are inverses of each other.

Put g(x)\gn{g(x)} into the blank slot of f(  )=4(  )−5\fn{f}(\,\quad\,) = \fn{4}(\,\quad\,) - \fn{5} and simplify, then put f(x)\fn{f(x)} into g(  )=(  )+54\gn{g}(\,\quad\,) = \dfrac{(\,\quad\,) + \gn{5}}{\gn{4}}.

Show the steps canceling out in both orders rather than plugging in a single test number like x=1x = 1 (testing one number does not prove it for all xx): f(g(x))=4(x+54)−5=(x+5)−5=x\fn{f}(\gn{g(x)}) = \fn{4}\left(\gn{\dfrac{x + 5}{4}}\right) - \fn{5} = (x + 5) - 5 = x, and g(f(x))=(4x−5)+54=4x4=x\gn{g}(\fn{f(x)}) = \dfrac{(\fn{4x - 5}) + \gn{5}}{\gn{4}} = \dfrac{4x}{4} = x.
8

Find the inverse formula f−1(x)\finv{f^{-1}}(x), along with its Domain and Range, for f(x)=(x+1)2−4\fn{f}(x) = \fn{(x + 1)^2 - 4} on the restricted domain x≤−1x \le -1.

Find the Domain and Range of f\fn{f} from its vertex (−1,−4)(-1, -4) and swap them first: which sign on ±x+4\pm\sqrt{x + 4} gives outputs that match the Range of f−1\finv{f^{-1}}?

With vertex (−1,−4)(-1, -4), f\fn{f} has Domain x≤−1\inp{x \le -1} and Range y≥−4\outp{y \ge -4}, so f−1\finv{f^{-1}} has Domain x≥−4\outp{x \ge -4} and Range y≤−1\inp{y \le -1}. Solving x=(y+1)2−4x = (\inp{y} + 1)^2 - 4 gives y=−1±x+4\inp{y} = -1 \pm \sqrt{x + 4}, and because the Range of f−1\finv{f^{-1}} requires y≤−1\inp{y \le -1}, we must keep the minus sign rather than automatically picking the positive root (keeping +x+4+\sqrt{x + 4} gives −1+x+4-1 + \sqrt{x + 4}, which is the inverse of the right half x≥−1x \ge -1): f−1(x)=−1−x+4\finv{f^{-1}}(x) = -1 - \sqrt{x + 4}, with Domain x≥−4x \ge -4 and Range y≤−1y \le -1.