Inverse Functions and Composite Functions
Before we take a look at inverse functions and composite functions, we must know the difference between a mapping and a function and how to define the domain and range of a function.
A mapping is any algebraic equation or graph that transforms one set of numbers to another. The diagram shows an example of a manytoone mapping. In a similar way, we also get onetomany and onetoone mappings. For a mapping to be a function, it must be either onetoone or manytoone. For the function to be invertible it must be onetoone only. See more on Inverse Functions below.
Domain & Range
We consider the DOMAIN of a function to be the full set of values that we can successfully enter into the function. Some functions to be aware of:
 SQUARE ROOTING – we can only square root nonnegative numbers (this includes 0)
 LOGARITHMS – we can only log positive numbers (this doesn’t include 0) – see more on logs
 DIVISION BY 0 – we can only divide by numbers that are not zero.
The RANGE of a function is the full set of values that we can get out of the function. It follows that we determine the range from the domain. Note that we may restrict the domain, i.e. we may exclude some values from the domain that are otherwise fine to have. This will then have an effect on the range which will also be restricted. See Example 1 for more on domain, range and restrictions.
Inverse Functions
As above, if a function is onetoone, then it is invertible. We can think of the inverse function as the function that performs the reverse operations. For a onetoone function $f(x)$, the inverse function is $f^{1}(x)$. For example, if $f(x)=2x+5$ then $f^{1}(x)=\frac{x5}{2}$. Note that we perform the reverse operations in the reverse order.
The inverse function for more complicated functions can be found as follows:
 Write the function in explicit form, i.e. $y$ equals expression in terms of $x$.
 Swap the $x$s for $y$s and the $y$s for $x$s.
 Make $y$ the subject of this new expression.
 Label it as $f^{1}(x)$. See Example 2.
Note that if we get the same function back when we find its inverse, the function is known as a selfinverse function. The reciprocal function (1/x) is an example of a selfinverse function.
The graphs of $f(x)$ and $f^{1}(x)$ are reflections of one another across the line $y=x$. It follows that the domain of the inverse function is the range of the original function. Similarly, the domain of the original is the range of the inverse function. The diagram shows the graphs of $y=\ln(x)$ (blue solid), $y=e^x$ (red dotted) and $y=x$ (green dotted). Since $\ln(x)$ snd $e^x$ are inverses of one another, their graphs are reflections of one another in the line $y=x$. See Example 3 for another example.
Note that the graph of a selfinverse function will be the same when reflected in the line $y=x$. For example, the graph of $y=\frac{1}{x}$ has reflectional symmetry in the line $y=x$.
Composite Functions
Composite functions are where we apply a function on top of another function. We often call these chains. For example, $y=\sin(x+5)$ is a composite function since we can identify two separate functions: the function where we add 5, then the function where we sine the result.
Given two functions $f(x)$ and $g(x)$. We can define the composite functions $fg(x)$ and $gf(x)$. These are sometimes denoted $f\circ g(x)$ and $g\circ f(x)$ respectively. Note that we can think of $fg(x)$ as $f(g(x))$, that is, we apply $f$ after we apply $g$ to $x$. Hence, we find the function of $fg(x)$ by applying $g$ to $x$ and applying $f$ afterwards. Usually the function $gf(x)$, which we find by applying $f$ first then $g$, is quite different from the function $fg(x)$. This is because $f(x)$ and $g(x)$ are generally different functions. See Example 3.
Note that $ff^{1}(x)=f^{1}f(x)=x$. We can see that if we apply $f$ to $x$ then apply the inverse of $f$, or vice versa, we will get the original $x$ value back.
Example of Inverse Functions and Composite Functions
 What is the domain and range for the function $f:x\mapsto\sqrt{73x}$?
 Find the domain and range for the function $g(x)=2\ln(5x+2)+4$.
 What is the range of the function $h(x)=6\frac{8}{4x}$ with restricted domain $\left\lbrace x\in{\mathbb R}:x\geq 5\right\rbrace$?
 This is an alternative notation to $f(x)=\sqrt{73x}$. Note that we cannot evaluate this function for all $x\in{\mathbb R}$ as we cannot square root negative numbers. Hence, we must have $73x\geq 0$. It follows that the domain is $\left\lbrace x\in{\mathbb R}:x\leq \frac{7}{3}\right\rbrace$. The $y$ values that come out of the function start from 0 when $x=\frac{7}{3}$ and increase as $x$ decreases. Hence, the range is $\left\lbrace y\in{\mathbb R}:y\geq 0\right\rbrace$.
 We can only evaluate log functions for positive numbers and so we must have $5x+2>0$. It follows that the domain of this function is $\left\lbrace x\in{\mathbb R}:x> \frac{2}{5}\right\rbrace$. We. can obtain all values of $y$ for this domain and so the range is $y\in{\mathbb R}$.
 We can evaluate the original function for all values of $x$ except $x=4$ but we have a domain that has been restricted to $x\geq 5$. Recall that $y=\frac{1}{x}$ has an asymptote at $y=0$ and so $g(x)$ will have an asymptote at $y=6$ as $x\rightarrow \infty$. The value of the function at $x=5$ is $g(5)=14$ and so the function decreases to 6 as $x$ increases from 5. Hence the restricted range is $\left\lbrace y\in{\mathbb R}:6<y\leq 14\right\rbrace$.
Find the inverse functions for $f(x)=\frac{2x}{x3}$, $x\ne 3$.
 Write the function as $y=\frac{2x}{x3}$.
 Swap the $x$s and $y$s: $x=\frac{2y}{y3}$.
 Make $y$ the subject by first multiplying both sides by $y3$, multiplying out the brackets and getting all the $y$ terms on one side: $\begin{array}{c}x(y3)=2y&\Rightarrow& xy3x=2y\\&\Rightarrow& xy2y=3x\end{array}$ Factorising gives $y(x2)=3x$ and so $y=\frac{3x}{x2}$.
 We have found the inverse function to be $f^{1}(x)=\frac{3x}{x2}$, $x\ne 2$ to avoid division by 0.
We define the functions $f$ and $g$ as follows:
$f:x\rightarrow 2^{x}, \hspace{10pt}x\in{\mathbb R}$
$g:x\rightarrow 5(x3), \hspace{10pt}x\in{\mathbb R}$.
 State the range of $f(x)$. State the domain of $f^{1}(x)$.
 Sketch $g(x)$ and $g^{1}(x)$ on the same graph.
 Find the function $gf(x)$.
 Solve the equation $fg(x)=16$.

 Any value of $x$ can be put into the function but only positive values come out. Hence, the range is $\left\lbrace y\in{\mathbb R}:y>0\right\rbrace$. It follows that the domain of the inverse function is $\left\lbrace x\in{\mathbb R}:x>0\right\rbrace$.
 See graph. $g(x)$ can be seen in solid red and $g^{1}(x)$ in solid green. Notice that they are reflections of one another in the line $y=x$ (blue dashed line).
 $gf(x)=g\left(2^{x}\right)=5\left(2^{x}3\right)$
 $fg(x)=f(5(x3))=2^{5(x3)}$ and so we must solve $2^{5(x3)}=16$. It follows that $5(x3)=4$ and so $x=\frac{11}{5}$.