Skip to main content
\(\require{cancel} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section1.BFunction Notation, Composition and Inverses

  • Use function notation.

  • Perform function operations including addition, subtraction, multiplication, and division.

  • Recognize and create composite and inverse functions.

Subsection1.B.1Function Notation

Functions are often denoted by a letter such as \(f\text{.}\) If \(x\) is the independent variable, then \(f(x)\) is the output of \(f\text{,}\) or the dependent variable.

For instance, suppose \(f(x) = x^2 + 3x\text{.}\) This means that \(f\) is a function that takes whatever you give it, and squares it, and multiplies it by \(3\text{,}\) and adds those two quantities.

\begin{gather*} 7\\ 10\\ x\\ y\\ dog \end{gather*}

\begin{gather*} \rightarrow\\ \rightarrow\\ \rightarrow\\ \rightarrow\\ \rightarrow \end{gather*}

\begin{gather*} \rightarrow\\ \rightarrow\\ \rightarrow\\ \rightarrow\\ \rightarrow \end{gather*}

\begin{align*} f(7) &= 72 + 3(7) = 70\\ f(10) &= 102 + 3(10) = 130\\ f(x) &= x^2 + 3x\\ f(y) &= y^2 + 3y\\ f(\mbox{dog}) &= (dog)^2 + 3(dog) = \text{?}\\ (\text{but }&dog\text{ is not in the domain of }f) \end{align*}

The notation \(f(7)\) is the output of the function \(f\) when the input is \(7\text{.}\) It does not indicate that you are multiplying \(f\) times \(7\text{.}\) To evaluate \(f(7)\) you take the formula for \(f(x)\) and replace all occurrences of the variable \(x\) with the number \(7\text{.}\) If this function is given \(7\text{,}\) it will return \(70\text{.}\)

Example1.B.1Function Evaluation

Consider the function \(f(t) = 1 +5t.\)

  1. To determine \(f(3),\) substitute \(3\) for each \(t\) in the expression: \begin{align*} f(t) &= 1+5t\\ f(3) &= 1+5(3)\\ &=1+15\\ &=16 \end{align*}
  2. Values other than numbers may be evaluated in the function: \begin{align*} f(2w) &= 1+5\cdot2w\\ &=1+10w \end{align*}
  3. Simplifying the expression makes the result more compact: \begin{align*} f(b-1) &= 1+5(b-1)\\ &= 1+5b-5\\ &=5b-4 \end{align*}
Example1.B.2Determine a Function Value Given a Graph

Determine \(g(1)\) from the graph of \(y = g(t)\) shown below.

Remember that the horizontal axis represents the indepenent variable, \(t.\) The vertical axis represents the dependent variable-the one we must calculate-\(y.\)

The value on the \(y\)-axis that corresponds to \(t = 1\) is \(y = 3.\)

So, \(g(1) = 3.\checkmark\)

If we write \(f(y) = y^2 + 3y\) we have not specified a different function. It does not matter what letter we use for the independent variable. \(f(y) = y^2 + 3y\) also means “whatever number comes in, square it, multiply it by \(3\text{,}\) and add those two quantities.” So it is a different way of writing the same function.

Just as not all variables are named \(x\text{,}\) not all functions are named \(f\text{.}\) Whenever possible, functions like variables, should be named descriptively. To simplify the notation, sometimes we use the same letter for the dependent variable and the name of the function. For instance, if Alice makes \(\$100\) per day, we might write:

  • Let \(m\) equal the amount of money Alice has made (measured in dollars)
  • Let \(t\) equal the amount of time Alice has worked (measured in days)
  • Then, \(m(t) = 100t\)

This last equation should be read “\(m\) is a function of \(t\) (or \(m\) depends on \(t\)). Given any value of the variable \(t\text{,}\) you can multiply it by \(100\) to find the corresponding value of the variable \(m\text{.}\)”

Of course, this is a very simple function! While simple examples are helpful to illustrate the concept, it is important to realize that very complicated functions are also used to model real world relationships. For instance, \(M(i) = \frac{1000 \frac{i}{12}(1 + \frac{i}{12})^{60} }{ (1 + \frac{i}{12})^{60} - 1}\) gives the monthly payment on a \(5\)-year loan of \(\$1000\) for an annual interest rate of \(i\text{.}\) Here, the monthly payment, \(M\text{,}\) is a function of the annual interest rate, \(i\text{.}\)

The function \(M(i)\) could be thought of as being built from “smaller” functions like \((1 + \frac{i}{12})^{60}\) and this idea of building functions by combining other functions is discussed next.

Subsection1.B.2Operations on Functions

We may create new functions by combining two or more functions by addition, subtraction, multiplication, division or composition. The first four operations on functions are very similar to these operations for numbers. Mainly, it's a matter of getting used to the notation. For functions \(f\) and \(g\text{:}\)

Terminology Notation and Definition
Sum: \(f + g\) \((f+g)(x) = f(x) + g(x)\)
Difference: \(f - g\) \((f-g)(x) = f(x) - g(x)\)
Product: \(f g\) \((fg)(x) = f(x) g(x)\)
Quotient: \(\dfrac{f}{g}\) \(\dfrac{f}{g}(x) = \dfrac{f(x)}{g(x)}\)
Example1.B.3Function Operations

Consider the functions

\begin{gather*} f(x) = 3x+1\text{ and }g(x) = x^2-5. \end{gather*}

Determine the function values of \((f+g)(2),\) \((f-g)(2),\) \((fg)(2),\) and \(\left(\frac{f}{g}\right)(2).\)

Since \(f(2) = 3(2)+1 = 7\) and \(g(2) = 2^2-5 = -1\text{,}\)

\begin{align*} (f+g)(2) &= f(2) + g(2) = 7 + (-1) = 6\\ (f-g)(2) &= f(2) - g(2) = 7 - (-1) = 8\\ (fg)(2) &= f(2)g(2) = 7 (-1) = -7\\ \left(\frac{f}{g}\right)(2) &= \frac{f(2)}{g(2)} = \frac{7}{-1} = -7\checkmark \end{align*}

Subsubsection1.B.2.1Composite Functions

Consider the following situation:

You are the manager of an elementary school cafeteria, making peanut butter sandwiches for today's lunch.

  • The more classes the school has, the more children there are.
  • The more children there are, the more sandwiches you have to make.
  • The more sandwiches you have to make, the more pounds (lbs) of peanut butter you will use.
  • The more peanut butter you use, the more money you need to budget for peanut butter.
  • ...and so on.

Each sentence in this little story involves a function. Mathematically, if \(c\) is the number of classes and \(h\) is the number of children, then the first sentence asserts the existence of a function \(h=f(c)\text{.}\)

The principal walks up to you at the beginning of the year and says “We're considering expanding the school. If we expand to \(70\) classes, how much money do we need to budget? What if we expand to \(75\text{?}\) How about \(80\text{?}\)” For each of these numbers, you have to calculate each number from the previous one, until you find the final budget number.

But going through this process each time is tedious. What you want is one function that puts the entire chain together: “You tell me the number of classes, and I will tell you the budget.”

This is a composite function-a function that represents in one function, the results of an entire chain of dependent functions. Since such chains are very common in real life, finding composite functions is an important skill.

Subsubsection1.B.2.2How do you make a composite Function?

Suppose Susan takes any number you give her, quadruples it, and adds \(6\text{.}\) Al takes any number you give him and divides it by \(2\text{.}\) Mathematically, we can represent the two functions like this:

\begin{gather*} S(x) = 4x + 6\\ A(x) = \frac{x}{2} \end{gather*}

To create a chain like the one above, we give a number to Susan; she acts on it, and gives the resulting number to Al; and he then acts on it and hands back a third number.

\begin{gather*} 3 \rightarrow \text{Susan} \rightarrow S(3)=18 \rightarrow \text{Al} \rightarrow A(18) = 9 \end{gather*}

In this example, we are plugging \(S(3)\)—in other words, \(18\)—into Al's function. In general, for any \(x\) that comes in, we are plugging \(S(x)\) into \(A\text{.}\) So we could represent the entire process as \(A(S(x))\text{.}\) This notation for composite functions is really nothing new: it means that you are plugging \(S(x)\) into the \(A\) function.

But in this case, recall that \(S(x) = 4x + 6\text{.}\) So we can write:

\begin{gather*} A(S(x)) = \frac{S(x)}{2} = \frac{4x + 6}{2}= 2x + 3 \end{gather*}

What happened? We've just discovered a shortcut for the entire process. When you perform the operation \(A(S(x))\)-that is, when you perform the Al function on the result of the Susan function-you are, in effect, doubling and adding \(3\text{.}\) For instance, we saw earlier that when we started with a \(3\text{,}\) we ended with a \(9\text{.}\) Our composite function does this in one step:

\begin{gather*} 3 \rightarrow 2x + 3 \rightarrow 9 \end{gather*}

Understanding the meaning of composite functions requires real thought. It requires understanding the idea that this variable depends on that variable, which in turn depends on the other variable; and how that idea is translated into mathematics. Finding composite functions, on the other hand, is a purely mechanical process-it requires practice, but no creativity. Whenever you are asked for \(f(g(x))\text{,}\) just plug the \(g(x)\) function into the \(f(x)\) function and then simplify.

Example1.B.4Building and Testing a Composite Function

Condider

\begin{gather*} f(x) = x^2 - 4x\text{ and }g(x)=x+2 \end{gather*}

Determine and test the composite function \(f(g(x))\)

  1. To determine the composite, plug \(g(x)\) into \(f(x)\text{,}\) just as you would with any number, then simplify.

    \begin{align*} f(g(x))&= f(x+2)\\ &= (x+2)^2-4(x+2)\\ &= (x^2+4x+4)-(4x+8)\\ &= x^2+4x-4x+4-8\\ &= x^2-4 \end{align*}

    So \(f(g(x))= x^2-4\checkmark\)

  2. Let's test it. \(f(g(x))\) means do \(g\text{,}\) then \(f\text{.}\) What happens if we start with \(x = 7\text{?}\)

    \begin{gather*} 7 \rightarrow g(x)\rightarrow 7 + 2 = 9 \rightarrow f(x) \rightarrow (9)^2 - 4 (9) = 45 \end{gather*}

    So, if it worked, our composite function should do all of that in one step.

    \begin{gather*} 7 \rightarrow x^2 - 4 \rightarrow 7^2 - 4 = 45\checkmark\text{ It worked!} \end{gather*}

There is a different notation that is sometimes used for composite functions. The notation \(\) very naturally conveys the idea of “plugging \(g(x)\) into \(f(x)\text{.}\)” However, you will sometimes see the same thing written as \((f \circ g)(x)\text{,}\) which represents the idea of “doing one function, and then the other, in sequence.” The two notations mean the same thing. That is:

Composition Notation

\begin{gather*} (f \circ g)(x)=f(g(x)) \end{gather*}

Subsection1.B.3Inverse Functions

Let's go back to Alice, who makes \(\$100\) each day. We know how to answer questions such as “After \(3\) days, how much money has Alice made?” We use the function \(m(t) = 100t\text{.}\)

But suppose we want to ask the reverse question: “If Alice has made \(\$300\text{,}\) how many hours has she worked?” This is the job of an inverse function. It gives the same relationship, but reverses the dependent and independent variables: \(t(m) = m/100\text{.}\) Given the amount of money Alice earned, divide it by \(100\) to find how many days she has worked.

Consider the following exampls:

  • If a function answers the question: “Alice worked this long, how much money has she made?” then its inverse answers the question: “Alice made this much money, how long did she work?”

  • If a function answers the question: “I have this many spoons, how much do they weigh?” then its inverse answers the question: “My spoons weigh this much, how many do I have?”

  • If a function answers the question: “How many hours of music fit on \(12\) CDs?” then its inverse answers the question: “How many CDs do you need for \(3\) hours of music?”

Subsubsection1.B.3.1How do you recognize an inverse function?

Let's consider Alice's functions above:

\begin{gather*} m(t) = 100t\\ t(m) = m/100 \end{gather*}

Mathematically, you can recognize these as inverse functions because they reverse the inputs and the outputs.

\begin{align*} 3 \rightarrow m(t) &= 100t \rightarrow 300\\ 300 \rightarrow t (m) &= m/100 \rightarrow 3\\ \checkmark &\text{ Inverse functions } \end{align*}

Of course, this makes logical sense. The first line above says that “If Alice works \(3\) hours, she makes \(\$300\text{.}\)” The second line says “If Alice made \(\$300\text{,}\) she worked \(3\) hours.” It's the same statement, made in two different ways.

But this “reversal” property gives us a way to test any two functions to see if they are inverses. For instance, consider the two functions:

\begin{gather*} f(x) = 3x + 7\\ g(x) = \frac{1}{3}x - 7 \end{gather*}

They look like inverses, don't they? But let's test and find out.

\begin{align*} 2 \rightarrow f(x)&= 3x + 7 \rightarrow 13\\ 13 \rightarrow g(x)&= \frac{1}{3}x - 7 \rightarrow \frac{13}{3} - 7 \rightarrow \frac{-8}{3}\\ \times &\text{ NOT inverse functions } \end{align*}

The first function turns a \(2\) into a \(13\text{.}\) But the second function does not turn \(13\) into \(2\text{.}\) So these are not inverses.

On the other hand, consider:

\begin{gather*} f(x) = 3x + 7\\ g(x) = \frac{1}{3}(x - 7) \end{gather*}

Let's run our test of inverses on these two functions.

\begin{align*} 2 \rightarrow f(x)&= 3x + 7 \rightarrow 13\\ 13 \rightarrow g(x)&= \frac{1}{3}(x - 7) \rightarrow \frac{1}{3}(13 - 7) \rightarrow 2\\ \checkmark &\text{ Inverse functions } \end{align*}

So we can see that these functions do, in fact, reverse each other: they are inverses.

A common example of a pair of inverse functions is the Celsius-to-Fahrenheit conversion:

\begin{gather*} F(C) = \frac{9}{5}C + 32\\ C(F) = \frac{5}{9}(F - 32) \end{gather*}

where \(C\) is the Celsius temperature and \(F\) the Fahrenheit. If you plug \(100^{\circ} C\) into the first equation, you find that it is \(212^\circ F\text{.}\) If you ask the second equation about \(212^{\circ} F\text{,}\) it of course converts that back into \(100^{\circ} C\text{.}\)

Subsubsection1.B.3.2The Notation and Definition of an Inverse Function

The notation for the inverse function of \(f(x)\) is \(f^{-1}(x)\text{.}\) This notation can cause considerable confusion, because it looks like an exponent, but it isn't. \(f^{-1}(x)\) simply means "the inverse function of \(f(x)\text{.}\)" It is defined formally by the fact that if you plug any number \(x\) into one function, and then plug the result into the other function, you get back where you started. (Take a moment to convince yourself that this is the same definition I gave above more informally.) We can represent this as a composition function by saying that \(f\left(f^{-1}(x)\right)= x\text{.}\)

Inverse Function: \(f^{-1}(x)\) is defined as the inverse function of \(f(x)\) if it consistently reverses the \(f(x)\) process. That is, if \(f(a)=b\text{,}\) then \(f^{-1}(b)=a\text{.}\) More concisely and formally, \(f^{-1}(x)\) is the inverse function of \(f(x)\) if \(\left(f \circ f^{-1}\right)(x) = x\) and \(\left(f^{-1} \circ f\right)(x) = x\text{.}\)

Subsubsection1.B.3.3Finding an Inverse Function

In examples above, we saw that if \(f(x) = 3x + 7\text{,}\) then \(f ^{-1}(x) = \frac{1}{3}(x - 7)\text{.}\) We also saw that the function \(\frac{1}{3} x - 7\text{,}\) which may have looked just as likely, did not work as an inverse function. So in general, given a function, how do you find its inverse function?

Remember that an inverse function reverses the inputs and outputs. When we graph functions, we always represent the incoming number as \(x\) and the outgoing number as \(y\text{.}\) So to find the inverse function, switch the \(x\) and \(y\) values, and then solve for \(y\text{.}\)

Example1.B.5Building and Testing an Inverse Function

Determine and test the inverse function of \(f(x) = \dfrac{2x-3}{5}.\)

  1. Determine the inverse function of \(f(x) = \dfrac{2x-3}{5}:\)

    1. Write the function as \(y = \dfrac{2x-3}{5}\)

    2. Switch the \(x\) and \(y\) variables: \(x = \dfrac{2y-3}{5}\)

    3. Solve for \(y\text{:}\)

      \begin{align*} 5x &= 2y - 3\\ 5x + 3 &= 2y\\ \dfrac{5x+3}{2} &= y \end{align*}

      So \(f^{-1}(x) = \dfrac{5x+3}{2}\)

  2. Test to make sure this solution satisfies the definition of an inverse function:

    1. Pick a number, and plug it into the original function: \(9 \rightarrow f(x) \rightarrow 3.\)

    2. See if the inverse function reverses this process: \(3 \rightarrow f^{-1}(x) \rightarrow 9. \checkmark\) It worked!

Were you surprised by the answer? At first glance, it seems that the numbers in the original function (the \(2\text{,}\) \(3\text{,}\) and \(5\)) have been rearranged almost at random.

But with more thought, the solution becomes very intuitive. The original function \(f(x)\) described the following process: double a number, then subtract \(3\text{,}\) then divide by \(5\text{.}\) To reverse this process, we need to reverse each step in order: multiply by \(5\text{,}\) then add \(3\text{,}\) then half the result. This is just what the inverse function does.

Subsubsection1.B.3.4Some Functions Have No Inverse Function

Some functions have no inverse function. The reason is the rule of consistency.

For instance, consider the function \(y = x^2\text{.}\) This function takes both \(3\) and \(-3\) and turns them into \(9\text{.}\) No problem: a function is allowed to turn different inputs into the same output. However, what does that say about the inverse of this particular function? In order to fulfill the requirement of an inverse function, it would have to take \(9\text{,}\) and turn it into both \(3\) and \(-3\)-which is the one and only thing that functions are not allowed to do. Hence, the inverse of this function would not be a function at all!

\begin{align*} 3&\\ -3& \end{align*}

\begin{gather*} \rightarrow\\ \rightarrow \end{gather*}

\begin{gather*} \rightarrow\\ \rightarrow \end{gather*}

\begin{gather*} 9\\ 9 \end{gather*}

If \(3\) goes in, \(9\) comes out. If \(-3\) goes in, \(9\) also comes out. No problem. Now, consider the situation for the inverse:

\begin{gather*} 9 \end{gather*}

\begin{gather*} \rightarrow \end{gather*}

\begin{gather*} \rightarrow\\ \rightarrow \end{gather*}

\begin{gather*} 3\text{?}\\ -3\text{?} \end{gather*}

Its inverse would have to turn \(9\) into both \(3\) and \(-3\text{.}\) No function can do this, so there is no inverse.

In general, any function that turns multiple inputs into the same output, does not have an inverse function.

What does that mean in the real world? If we can convert Fahrenheit to Celsius, we must be able to convert Celsius to Fahrenheit. If we can ask “How much money did Alice make in \(3\) days?” we must surely be able to ask “How long did it take Alice to make \(\$500\text{?}\)” When would you have a function that cannot be inverted?

Consider this example:

“Max threw a ball. The height of the ball depends on how many seconds it has been in the air.” The two variables here are \(h\) (the height of the ball) and \(t\) (the number of seconds it has been in the air). The function \(h(t)\) enables us to answer questions such as “After \(3\) seconds, where is the ball?”

The inverse question would be “At what time was the ball \(10\) feet in the air?” The problem with that question is, it may well have two answers!

The ball is here... ...after this much time has elapsed
\(10\) ft \(2\) seconds (*on the way up)
\(10\) ft \(5\) seconds (*on the way back down)

So what does that mean? Does it mean we can't ask that question? Of course not. We can ask that question, and we can expect to find the answer, or answers mathematically-by knowing how to solve quadratic equations. However, it does mean that time is not a function of height because such a “function” would not be consistent: one question would produce multiple answers.