Skip to main content
Mathematics LibreTexts

5.5: Inverse Functions and Composition

  • Page ID
    26045
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    A bijection (or one-to-one correspondence) is a function that is both one-to-one and onto. Naturally, if a function is a bijection, we say that it is bijective. If a function \(f :A \to B\) is a bijection, we can define another function \(g\) that essentially reverses the assignment rule associated with \(f\). Then, applying the function \(g\) to any element \(y\) from the codomain \(B\), we are able to obtain an element \(x\) from the domain \(A\) such that \(f(x)=y\). Let us refine this idea into a more concrete definition.

    Definition: Inverse Function

    Let \(f :{A}\to{B}\) be a bijective function. Its inverse function is the function \({f^{-1}}:{B}\to{A}\) with the property that \[f^{-1}(b)=a \Leftrightarrow b=f(a).\] The notation \(f^{-1}\) is pronounced as “\(f\) inverse.” See figure below for a pictorial view of an inverse function.

     

    InvFunctionDiagram.PNG

    Why is \(f^{-1}:B \to A\) a well-defined function? For it to be well-defined, every element \(b\in B\) must have a unique image. This means given any element \(b\in B\), we must be able to find one and only one element \(a\in A\) such that \(f(a)=b\). Such an \(a\) exists, because \(f\) is onto, and there is only one such element \(a\) because \(f\) is one-to-one. Therefore, \(f^{-1}\) is a well-defined function.

    How to find \(f^{-1}\) 

    If a function \(f\) is defined by a computational rule, then the input value \(x\) and the output value \(y\) are related by the equation \(y=f(x)\). In an inverse function, the role of the input and output are switched. Therefore, we can find the inverse function \(f^{-1}\) by following these steps:

    • \(f^{-1}(y)=x \iff y=f(x),\) so write \(y=f(x)\), using the function definition of \(f(x).\)
    • Solve for \(x\). That is, express \(x\) in terms of \(y\). The resulting expression is \(f^{-1}(y)\).
    • Be sure to write the final answer in the form \(f^{-1}(y) = \ldots\,\). Do not forget to include the domain and the codomain, and describe them properly.

    Example \(\PageIndex{1}\label{invfcn-01}\)

    To find the inverse function of \(f :{\mathbb{R}}\to{\mathbb{R}}\) defined by \(f(x)=2x+1\), we start with the equation \(y=2x+1\).  Solving for \(x\), we find \(x=\frac{1}{2}\,(y-1)\). Therefore, the inverse function is \[{f^{-1}}:{\mathbb{R}}\to{\mathbb{R}}, \qquad f^{-1}(y)=\frac{1}{2}\,(y-1).\] It is important to describe the domain and the codomain, because they may not be the same as the original function.

    Example \(\PageIndex{2}\label{eg:invfcn-02}\)

    The function \(s :{\big[-\frac{\pi}{2}, \frac{\pi}{2}\big]}\to{[-1,1]}\) defined by \(s(x)=\sin x\) is a bijection. Its inverse function is 

    \[s^{-1}:[-1,1] \to {\big[-\frac{\pi}{2}, \frac{\pi}{2}\big]}, \qquad s^{-1}(y)=\arcsin y.\]

     The function \(\arcsin y\) is also written as \(\sin^{-1}y\), which follows the same notation we use for inverse functions.

    hands-on Exercise \(\PageIndex{1}\label{he:invfcn-01}\)

    The function \(f :{[-3,\infty)}\to{[\,0,\infty)}\) is defined as \(f(x)=\sqrt{x+3}\). Show that it is a bijection, and find its inverse function

    hands-on Exercise \(\PageIndex{2}\label{he:invfcn-02}\)

    Find the inverse function of \(g :{\mathbb{R}}\to{(0,\infty)}\) defined by \(g(x) = e^x\).

    Remark

    Exercise caution with the notation. Assume the function \(f :{\mathbb{Z}}\to{\mathbb{Z}}\) is a bijection. The notation \(f^{-1}(3)\) means the image of 3 under the inverse function \(f^{-1}\). If \(f^{-1}(3)=5\), we know that \(f(5)=3\). The notation \(f^{-1}(\{3\})\) means the preimage of the set \(\{3\}\). In this case, we find \(f^{-1}(\{3\})=\{5\}\). The results are essentially the same if the function is bijective.

    If a function \(g :{\mathbb{Z}}\to{\mathbb{Z}}\) is many-to-one, then it does not have an inverse function. This makes the notation \(g^{-1}(3)\) meaningless. Nonetheless, \(g^{-1}(\{3\})\) is well-defined, because it means the preimage of \(\{3\}\). If \(g^{-1}(\{3\})=\{1,2,5\}\), we know \(g(1)=g(2)=g(5)=3\).

    In general, \(f^{-1}(D)\) means the preimage of the subset \(D\) under the function \(f\). Here, the function \(f\) can be any function. If \(f\) is a bijection, then \(f^{-1}(D)\) can also mean the image of the subset \(D\) under the inverse function \(f^{-1}\). There is no confusion here, because the results are the same.

    Example \(\PageIndex{3}\label{eg:invfcn-03}\)

    The function \(f :{\mathbb{R}}\to{\mathbb{R}}\) is defined as \[f(x) = \cases{ 3x & if $x\leq 1$, \cr 2x+1 & if $x > 1$. \cr}\] Find its inverse function.

    Solution

    Since \(f\) is a piecewise-defined function, we expect its inverse function to be piecewise-defined as well. First, we need to find the two ranges of input values in \(f^{-1}\). The images for \(x\leq1\) are \(y\leq3\), and the images for \(x>1\) are \(y>3\). Hence, the codomain of \(f\), which becomes the domain of \(f^{-1}\), is split into two halves at 3. The inverse function should look like \[f^{-1}(x) = \cases{ \mbox{???} & if $x\leq 3$, \cr \mbox{???} & if $x > 3$. \cr}\] Next, we determine the formulas in the two ranges. We find 

     \[f^{-1}(x) = \cases{ \textstyle\frac{1}{3}\,x & if $x\leq 3$, \cr \textstyle\frac{1}{2} (x-1) & if $x > 3$. \cr}\] The details are left to you as an exercise.

    hands-on Exercise \(\PageIndex{3}\label{he:invfcn-03}\)

    Find the inverse function of \(g :{\mathbb{R}}\to{\mathbb{R}}\) defined by \[g(x) = \cases{ 3x+5 & if $x\leq 6$, \cr 5x-7 & if $x > 6$. \cr}\] Be sure you describe \(g^{-1}\) properly.

    Example \(\PageIndex{4}\)

    Find the inverse function of \(f :{\mathbb{Z}}\to{\mathbb{N}\cup\{0\}}\) defined by \[f(n) = \cases{ 2n & if $n\geq0$, \cr -2n-1 & if $n < 0$. \cr}\]

    Solution

    In an inverse function, the domain and the codomain are switched, so we have to start with \(f^{-1}:\mathbb{N} \cup \{0\} \to \mathbb{Z}\) before we describe the formula that defines \(f^{-1}\). Writing \(n=f(m)\), we find \[n = \cases{ 2m & if $m\geq0$, \cr -2m-1 & if $m < 0$. \cr}\] We need to consider two cases.

    If \(n=2m\), then \(n\) is even, and \(m=\frac{n}{2}\).

    If \(n=-2m-1\), then \(n\) is odd, and \(m=-\frac{n+1}{2}\).

     

    Therefore, the inverse function is defined by \(f^{-1}:\mathbb{N} \cup \{0\} \to \mathbb{Z}\) by:

    \[f^{-1}(n) = \cases{ \frac{2}{n} & if $n$ is even, \cr -\frac{n+1}{2} & if $n$  is odd. \cr}\]

    Verify this with some numeric examples.

    hands-on Exercise \(\PageIndex{5}\label{he:invfcn-05}\)

    The function \(f :{\mathbb{Z}}\to{\mathbb{N}}\) is defined as \[f(n) = \cases{ -2n & if $n < 0$, \cr 2n+1 & if $n\geq0$. \cr}\] Find its inverse.

    Let \(A\) and \(B\) be finite sets. If there exists a bijection \(f :{A} \to {B}\), then the elements of \(A\) and \(B\) are in one-to-one correspondence via \(f\). Hence, \(|A|=|B|\). This idea will be very important for our section on Infinite Sets and Cardinality.

    Composite Function

    Given functions \(f :{A}\to{B}'\) and \(g :{B}\to{C}\) where \(B' \subseteq B\) , the composite function, \(g\circ f\), which is pronounced as “\(g\) after \(f\)”, is defined as \[{g\circ f}:{A}\to{C}, \qquad (g\circ f)(x) = g(f(x)).\] The image is obtained in two steps. First, \(f(x)\) is obtained. Next, it is passed to \(g\) to obtain the final result. It works like connecting two machines to form a bigger one, see first figure below. We can also use an arrow diagram to provide another pictorial view, see second figure below.

    Numeric value of \((g\circ f)(x)\) can be computed in two steps. For example, to compute \((g\circ f)(5)\), we first compute the value of \(f(5)\), and then the value of \(g(f(5))\). To find the algebraic description of \((g\circ f)(x)\), we need to compute and simplify the formula for \(g(f(x))\). In this case, it is often easier to start from the “outside” function. More precisely, start with \(g\), and write the intermediate answer in terms of \(f(x)\), then substitute in the definition of \(f(x)\) and simplify the result.

    CompositeFunctionMachine.PNG

     

    CompositeFnDiagram.PNG

    Example \(\PageIndex{5}\)

    Assume \(f,g :{\mathbb{R}}\to{\mathbb{R}}\) are defined as \(f(x)=x^2\), and \(g(x)=3x+1\). We find

    \[\displaylines{ (g\circ f)(x)=g(f(x))=3[f(x)]+1=3x^2+1, \cr (f\circ g)(x)=f(g(x))=[g(x)]^2=(3x+1)^2. \cr}\]

    Therefore,

    \[g \circ f: \mathbb{R} \to \mathbb{R}, \qquad (g \circ f)(x)=3x^2+1\]

    \[f \circ g: \mathbb{R} \to \mathbb{R}, \qquad (f \circ g)(x)=(3x+1)^2\]

    We note that, in general, \(f\circ g \neq g\circ f\).

    hands-on Exercise \(\PageIndex{6}\)

    If \(p,q:\mathbb{R} \to \mathbb{R}\) are defined as \(p(x)=2x+5\), and \(q(x)=x^2+1\), determine \(p\circ q\) and \(q\circ p\). Do not forget to describe the domain and the codomain

     

    Example \(\PageIndex{6}\)

    Define \(f,g :{\mathbb{R}}\to{\mathbb{R}}\) as

    \[f(x) = \cases{ 3x+1 & if $x < 0$, \cr 2x+5 & if $x\geq0$, \cr}\]

    and \(g(x)=5x-7\). Find \(g\circ f\).

    Solution

    Since \(f\) is a piecewise-defined function, we expect the composite function \(g\circ f\) is also a piecewise-defined function. It is defined by \[(g\circ f)(x) = g(f(x)) = 5f(x)-7 = \cases{ 5(3x+1)-7 & if $x < 0$, \cr 5(2x+5)-7 & if $x\geq0$. \cr}\]

    After simplification, we find \(g \circ f: \mathbb{R} \to \mathbb{R}\), by: \[(g\circ f)(x) = \cases{ 15x-2 & if $x < 0$, \cr 10x+18 & if $x\geq0$. \cr}\] In this example, it is rather obvious what the domain and codomain are. Nevertheless, it is always a good practice to include them when we describe a function.

    hands-on Exercise \(\PageIndex{7}\)

    The functions \(f :{\mathbb{R}}\to{\mathbb{R}}\) and \(g :{\mathbb{R}}\to{\mathbb{R}}\) are defined by \[f(x) = 3x+2, \qquad\mbox{and}\qquad g(x) = \cases{ x^2 & if $x\leq5$, \cr 2x-1 & if $x > 5$. \cr}\] Determine \(f\circ g\)

    Example \(\PageIndex{7}\)

    Let \(\mathbb{R}^*\) denote the set of nonzero real numbers. Suppose

    \[f : \mathbb{R}^* \to \mathbb{R}, \qquad f(x)=\frac{1}{x}\]

    \[g : \mathbb{R} \to (0, \infty), \qquad g(x)=3x^2+11.\]

    Determine \(f\circ g\) and \(g\circ f\). Be sure to specify their domains and codomains.

    Solution

    To compute \(f\circ g\), we start with \(g\), whose domain is \(\mathbb{R}\). Hence, \(\mathbb{R}\) is the domain of \(f\circ g\). The result from \(g\) is a number in \((0,\infty)\). The interval \((0,\infty)\) contains positive numbers only, so it is a subset of \(\mathbb{R}^*\). Therefore, we can continue our computation with \(f\), and the final result is a number in \(\mathbb{R}\). Hence, the codomain of \(f\circ g\) is \(\mathbb{R}\). The image is computed according to \(f(g(x)) = 1/g(x) = 1/(3x^2+11)\). We are now ready to present our answer:
     

    \(f \circ g: \mathbb{R} \to \mathbb{R},\) by:

    \[(f \circ g)(x) = \frac{1}{3x^2+11}.\]

    In a similar manner, the composite function \(g\circ f :{\mathbb{R}^*} {(0,\infty)}\) is defined as \[(g\circ f)(x) = \frac{3}{x^2}+11.\] Be sure you understand how we determine the domain and codomain of \(g\circ f\).

    Identity Function relates to Inverse Functions

    Recall the definition of the Identity Function:

    The identity function on any nonempty set \(A\) maps any element back to itself:  \[{I_A}:{A}\to{A}, \qquad I_A(x)=x.\] .

    Theorem \(\PageIndex{1}\)

    For a bijective function \(f :{A}\to{B}\),

    \[f^{-1}\circ f=I_A, \qquad\mbox{and}\qquad f\circ f^{-1}=I_B,\]

    where \(i_A\) and \(i_B\) denote the identity function on \(A\) and \(B\), respectively.

    Proof

    To prove that \(f^{-1}\circ f = I_A\), we need to show that \((f^{-1}\circ f)(a)=a\) for all \(a\in A\). Assume \(f(a)=b\). Then, because \(f^{-1}\) is the inverse function of \(f\), we know that \(f^{-1}(b)=a\). Therefore,

    \[(f^{-1}\circ f)(a) = f^{-1}(f(a)) = f^{-1}(b) = a,\]

    which is what we want to show. The proof of \(f\circ f^{-1} = I_B\) procceds in the exact same manner, and is omitted here.

    Example \(\PageIndex{8}\)

    Show that the functions \(f,g :{\mathbb{R}}\to{\mathbb{R}}\) defined by \(f(x)=2x+1\) and \(g(x)=\frac{1}{2}(x-1)\) are inverse functions of each other.

    Solution

    The problem does not ask you to find the inverse function of \(f\) or the inverse function of \(g\). Instead, the answers are given to you already. You job is to verify that the answers are indeed correct, that the functions are inverse functions of each other.

    Form the two composite functions \(f\circ g\) and \(g\circ f\), and check whether they both equal to the identity function:

    \[\displaylines{ \textstyle (f\circ g)(x) = f(g(x)) = 2 g(x)+1 = 2\left[\frac{1}{2}(x-1)\right]+1 = x, \cr \textstyle (g\circ f)(x) = g(f(x)) = \frac{1}{2} \big[f(x)-1\big] = \frac{1}{2} \left[(2x+1)-1\right] = x. \cr}\]

    We conclude that \(f\) and \(g\) are inverse functions of each other.

    hands-on Exercise \(\PageIndex{8}\)

    Verify that \(f :{\mathbb{R}}\to{\mathbb{R}^+}\) defined by \(f(x)=e^x\), and \(g :{\mathbb{R}^+}\to{\mathbb{R}}\) defined by \(g(x)=\ln x\), are inverse functions of each other

    Theorem \(\PageIndex{2}\)

    Suppose \(f :{A}\to{B}\) and \(g :{B}\to{C}\). Let \(I_A\) and \(I_B\) denote the identity function on \(A\) and \(B\), respectively. We have the following results.

    1. \(f\circ I_A=f\) and \(I_B\circ f=f\).
    2. If both \(f\) and \(g\) are one-to-one, then \(g\circ f\) is also one-to-one.
    3. If both \(f\) and \(g\) are onto, then \(g\circ f\) is also onto.
    4. If  \(g\circ f\) is bijective, then \((g\circ f)^{-1}= f^{-1}\circ g^{-1}\).
    Proof of (a)

    To show that \(f\circ I_A=f\), we need to show that \((f\circ I_A)(a)= f(a)\) for all \(a\in A\). This follows from direct computation: \[(f\circ I_A)(a) = f(I_A(a)) = f(a).\] The proofs of \(I_B\circ f=f\) and (b)–(d) are left as exercises.

     

    Summary and Review

    • A bijection is a function that is both one-to-one and onto.
    • The inverse of a bijection \(f :{A} \to {B}\) is the function \(f^{-1}: B \to A\)  with the property that \[f(x)=y \Leftrightarrow x=f^{-1}(y).\]
    • In brief, an inverse function reverses the assignment rule of \(f\). It starts with an element \(y\) in the codomain of \(f\), and recovers the element \(x\) in the domain of \(f\) such that \(f(x)=y\).
    • Given \(B' \subseteq B\), the composition of two functions \(f :{A}\to{B'}\) and \(g :{B}\to{C}\) is the function \(g\circ f :{A}\to{C}\) defined by \((g\circ f)(x)=g(f(x))\).
    • If \(f :{A}\to{B}\) is bijective, then \(f^{-1}\circ f=I_A\) and \(f\circ f^{-1}=I_B\).
    • To check whether \(f :{A}\to{B}\) and \(g :{B}\to{A}\) are inverse of each other, we need to show that
    1. \((g\circ f)(x)=g(f(x))=x\) for all \(x\in A\), and
    2. \((f\circ g)(y)=f(g(y))=y\) for all \(y\in B\).

     

    Exercises 

    Exercise \(\PageIndex{1}\label{ex:invfcn-01}\)

    Find the inverse of each of the following bijections.

    1. \(u:{\mathbb{Q}}\to{\mathbb{Q}}\), \(u(x)=3x-2\).
    2. \(v:{\mathbb{Q}-\{1\}}\to{\mathbb{Q}-\{2\}}\), \(v(x)=\frac{2x}{x-1}\).
    3. \(w:{\mathbb{Z}}\to{\mathbb{Z}}\), \(w(n)=n+3\).
    Solution

    (a) \({u^{-1}}:{\mathbb{Q}}\to{\mathbb{Q}}\), \(u^{-1}(x)=(x+2)/3\)

    Exercise \(\PageIndex{2}\label{ex:invfcn-02}\)

    Find the inverse of the function \(r :{(0,\infty)}\to{\mathbb{R}}\) defined by \(r(x)=4+3\ln x\).

    Exercise \(\PageIndex{3}\label{ex:invfcn-03}\)

    The images of the bijection \({\alpha}:{\{1,2,3,4,5,6,7,8\}}\to{\{a,b,c,d,e,f,g,h\}}\) are given below. \[\begin{array}{|c||*{8}{c|}} \hline x & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ \hline \alpha(x)& g & a & d & h & b & e & f & c \\ \hline \end{array}\] Find its inverse function.

    Solution

    The images under \({\alpha^{-1}}:{\{a,b,c,d,e,f,g,h\}}\to {\{1,2,3,4,5,6,7,8\}}\) are given below. \[\begin{array}{|c||*{8}{c|}} \hline x & a & b & c & d & e & f & g & h \\ \hline \alpha^{-1}(x)& 2 & 5 & 8 & 3 & 6 & 7 & 1 & 4 \\ \hline \end{array}\]

    Exercise \(\PageIndex{4}\label{ex:invfcn-04}\)

    The function \(h :{(0,\infty)}\to{(0,\infty)}\) is defined by \(h(x)=x+\frac{1}{x}\). Determine \(h\circ h\). Simplify your answer as much as possible.

    Exercise \(\PageIndex{5}\label{ex:invfcn-05}\)

    The functions \(g,f :{\mathbb{R}}\to{\mathbb{R}}\) are defined by \(f(x)=1-3x\) and \(g(x)=x^2+1\). Evaluate \(f(g(f(0)))\).

    Solution

    We do not need to find the formula of the composite function, as we can evaluate the result directly: \(f(g(f(0))) = f(g(1)) = f(2) = -5\).

    Exercise \(\PageIndex{6}\label{ex:invfcn-06}\)

    The functions \(f,g :{\mathbb{Z}}\to{\mathbb{Z}}\) are defined by \[f(n) = \cases{ 2n-1 & if $n\geq0$ \cr 2n & if $n < 0$ \cr} \qquad\mbox{and}\qquad g(n) = \cases{ n+1 & if $n$ is even \cr 3n & if $n$ is odd \cr}\] Determine \(g\circ f\)

    Exercise \(\PageIndex{7}\)

    Describe \(g\circ f\).

    1. \(f :{\mathbb{Z}}\to{\mathbb{N}}\), \(f(n)=n^2+1\); \(g :{\mathbb{N}}\to{\mathbb{Q}}\), \(g(n)=\frac{1}{n}\).
    2. \(f :{\mathbb{R}}\to{(0,1)}\), \(f(x)=1/(x^2+1)\); \(g :{(0,1)}\to{(0,1)}\), \(g(x)=1-x\).
    3. \(f :{\mathbb{Q}-\{2\}}\to{\mathbb{Q}^*}\), \(f(x)=1/(x-2)\); \(g :{\mathbb{Q}^*}\to{\mathbb{Q}^*}\), \(g(x)=1/x\).
    4. \(f :{\mathbb{R}}\to{[\,1,\infty)}\),\(f(x)=x^2+1\); \(g :{[\,1,\infty)}\to {[\,0,\infty)}\) \(g(x)=\sqrt{x-1}\).
    5. \(f :{\mathbb{Q}-\{10/3\}}\to{\mathbb{Q}-\{3\}}\),\(f(x)=3x-7\); \(g :{\mathbb{Q}-\{3\}}\to{\mathbb{Q}-\{2\}}\), \(g(x)=2x/(x-3)\).
    Solution

    (a) \({g\circ f}:{\mathbb{Z}}\to{\mathbb{Q}}\), \((g\circ f)(n)=1/(n^2+1)\)

    (b) \({g\circ f}:{\mathbb{R}}\to{(0,1)}\), \((g\circ f)(x)=x^2/(x^2+1)\)

    Exercise \(\PageIndex{8}\label{ex:invfcn-08}\)

    If \(f :A \to B\) and \(g : B \to C\) are functions and \(g \circ f\) is one-to-one, must \(g\) be one-to-one? Prove or give a counter-example.

    Exercise \(\PageIndex{9}\label{ex:invfcn-09}\)

    If \(f :A \to B\) and \(g : B \to C\) are functions and \(g \circ f\) is onto, must \(f\) be onto? Prove or give a counter-example.

    Solution

    No.  Consider \(f : \{2,3\} \to \{a,b,c\}\) by \(\{(2,a),(3,b)\}\) and  \(g : \{a,b,c\} \to \{5\}\) by \(\{(a,5),(b,5),(c,5)\}.\)
    Then \(f \circ g : \{2,3\} \to \{5\}\) is defined by  \(\{(2,5),(3,5)\}.\)  Clearly \(f \circ g\) is onto, while \(f\) is not onto.

    Exercise \(\PageIndex{10}\label{ex:invfcn-10}\)

    If \(f :A \to B\) and \(g : B \to C\) are functions and \(g \circ f\) is one-to-one, must \(f\) be one-to-one? Prove or give a counter-example.

    Exercise \(\PageIndex{11}\label{ex:invfcn-11}\)

    If \(f :A \to B\) and \(g : B \to C\) are functions and \(g \circ f\) is onto, must \(g\) be onto? Prove or give a counter-example.

    Answer

    Yes, if \(f :A \to B\) and \(g : B \to C\) are functions and \(g \circ f\) is onto, then \(g\) must be onto.

    Proof

    If \(g\) is not onto, then \(\exists c \in C\) such that there is no \(b \in B\) such that \(g(b)=c.\)
    However, since \(g \circ f\) is onto, we know \(\exists a \in A\) such that  \((g \circ f)(a) = c.\)  This means \(g(f(a))=c\).
    \(f(a) \in B\) and \(g(f(a))=c\); let \(b=f(a)\) and now there is a \(b \in B\) such that \(g(b)=c.\)
    Since every element in set \(C\) does have a pre-image in set \(B\), by the definition of onto, \(g\) must be onto.

     

    Exercise \(\PageIndex{12}\label{ex:invfcn-12}\)

    Given the bijections \(f\) and \(g\), find \(f\circ g\), \((f\circ g)^{-1}\) and \(g^{-1}\circ f^{-1}\).

    1. \(f :{\mathbb{Z}}\to{\mathbb{Z}}\), \(f(n)=n+1\); \(g :{\mathbb{Z}}\to{\mathbb{Z}}\), \(g(n)=2-n\).
    2. \(f :{\mathbb{Q}}\to{\mathbb{Q}}\), \(f(x)=5x\); \(g :{\mathbb{Q}}\to{\mathbb{Q}}\), \(g(x)=\frac{x-2}{5}\).
    3. \(f :{\mathbb{Q}-\{2\}}\to{\mathbb{Q}-\{2\}}\), \(f(x)=3x-4\); \(g :{\mathbb{Q}-\{2\}}\to{\mathbb{Q}-\{2\}}\), \(g(x)=\frac{x}{x-2}\).

    Exercise \(\PageIndex{13}\)

    Prove part (b) of Theorem 5.5.2.

    Statement of Theorem 5.5.2b

    Given \(f :{A}\to{B}\) and \(g :{B}\to{C}\), if both \(f\) and \(g\) are one-to-one, then \(g\circ f\) is also one-to-one.

    Proof

    Suppose \((g\circ f)(a_1)=(g\circ f)(a_2)\) for some \(a_1,a_2 \in A.\)  WMST \(a_1=a_2.\)
    By definition of composition of functions, we have \[g(f(a_1))=g(f(a_2)).\] 
    \(f(a_1) \in B\) and \(f(a_2) \in B.\)  Let \(b_1=f(a_1)\) and \(b_2=f(a_2).\) Substituting into equation 5.5.3, \[g(b_1)=g(b_2).\]
    Since \(g\) is one-to-one, we know \(b_1=b_2\) by definition of one-to-one. Since  \(b_1=b_2\) we have \(f(a_1)=f(a_2).\)
    Now, since \(f\) is one-to-one, we know \(a_1=a_2\) by definition of one-to-one.
    Thus we have demonstrated if \((g\circ f)(a_1)=(g\circ f)(a_2)\) then \(a_1=a_2\) and therefore by the definition of one-to-one, \(g\circ f\) is one-to-one.

    Exercise \(\PageIndex{14}\)

    Prove part (c) of Theorem 5.5.2

    Exercise \(\PageIndex{15}\)

    Prove part (d) of Theorem 5.5.

     


    This page titled 5.5: Inverse Functions and Composition is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Harris Kwong (OpenSUNY) .

    • Was this article helpful?