In the last section, we discussed functional evaluation and function notation. In this section, we will follow-up by examining two related concepts: composition and inverses, and show how they connect with familiar concepts of Algebra.
Merriam-Webster OnLine defines the verb "to compose" as "to form by putting together". Given two functions, f and g, we can create a new function by composing them, that is, putting them together. Notationally, we express this composite function as . Since the inputs are written to the right, this suggests that we first apply g then apply f, that is:
Warning: This is one time where it is important to read from right-to-left! Here we put in an extra set of parentheses around the composite function to emphasize that this entire expression stands for a new function that we are evaluating at x; in the future, these parentheses will usually be omitted.
For example, if f is given by:

and g is given by:
| x | y = g(x) |
|
-3 -2 -1 0 1 2 3 |
-2 -1 0 1 2 3 4 |
then, working inside-out, we have, for example:
Notice how we first evaluated g, putting the result into f and evaluating that expression, too.
While it is pretty clear how to compute the composition of two functions, from an operational point of view, on any specific input value, we can view this concept from many other points of view, as well. For example, thinking of a function as a machine taking inputs to outputs, the natural process of "linking" two machines together is exactly the same as that of composition of functions. For example, let f be the "square the input" function and let g be the "add 1 to the input" function. If we "link" these two functions together:

You can see that this simply performs their rules one after another; that is, from the point of view of a verbal description, the composition is "add 1, then square the result". From this perspective, we see that we have unknowingly been composing functions, whenever we have performed a multi-step rule.
We will often denote such a composition pictorially using a very simplified arrow diagram:
![]()
Algebraically, the previous example would be given by the rule:
In other words, from an algebraic point of composition of two functions simply looks like evaluation of one function on the rule of another. In general, both functional operations of evaluation and composition correspond to the basic algebraic operation of "plugging in" one value or expression into another (when the functions are given by algebraic rules). So, while these are not totally new concepts, they provide a useful way to describe what you have already been doing in Algebra.
Before going on to the Exercises, you should notice that the order of the functions in a composition makes a difference. Going back to the previous example, while , if we reverse the order of composition, we would get , which is clearly different. In very concrete terms, first putting on your socks and then putting on your shoes, gives a proper result; if your first put on your shoes and then try to put on your socks, you will get a very different result; order matters!
Make sure that you understand composition by completing the following
exercises.
Just as evaluation and composition of functions correspond to the algebraic operation of "plugging in", we can also describe the other fundamental algebraic procedure of "solving an equation" from a functional point of view as well. For example, say we are interested in solving the equation:
x2 = 4
for x. We can rephrase this problem as solving the equation:
h(x) = 4
for x, where h(x) = x2. That is, in functional terms, we are looking for those "inputs" that give an "output" of 4. This apparently trivial change in perspective will eventually lead to powerful insights into Algebra and graphing, among other things.
Right away, we notice that "solving" an equation simply amounts to reversing the process of evaluation (i.e., "plugging in"). That is, instead of being given an "input" and computing the corresponding "output" (evaluation), we are given the "output" and we must find all corresponding "inputs". We touched on this process earlier, when we discussed the reverse of a relation.
Solving a functional equation is the same as "evaluating" the corresponding reverse relation.
From most of the different perspectives on a function, the process of computing the reverse relation is relatively easy. We can illustrate this for the "square" function, h(x) = x2:
| {(-2, 4), (-1, 1), (0, 0), (1, 1), (2, 4), ... } | reverses to | {(4, -2), (1, -1), (0, 0), (1, 1), (4, 2), ... } |
|
reverses to |
|
|
|
reverses to | ![]() |
|
|
reverses to | ![]() |
Computing the reverse of a function that is described by a formula, a black-box, or a verbal description is more difficult. That is because these naturally describe functional relationships, but the reverse of a function is generally not a function! That is because, while by its very nature a functional relationship guarantees that evaluation always leads to a single result, the process of solving may lead to multiple valid answers. Note: This is why we put the word "evaluate" in quotes before; we should really only used the term for functional relationships.
We can easily see in all four of the earlier descriptions of the "square" function that a single "input" of the reversed "square" function may lead to more that one "output"; that is, that this reversed relation is not a function. We can also see this algebraically. When we consider solving the equation:
x2 = h(x) = 4
for x. It is easy to check that there are two different values that evaluate via h to 4, namely, x = -2 and x = 2. This means that we cannot write a single formula to express this reverse relation as a function.
While for most function reversing does not yield a function, for many important functions it will.
When the reverse of a function, f, is a function, we say that f is invertible, we denote this reverse relation by f -1, and we refer this function as the inverse of f.
Important: While this notation make look like an exponent, it is not; we will explain why we use such apparently deceptive notation in a little bit.
The previous example suggests that:
A function f is invertible precisely when the equation f(x) = c always has at most one solution, no matter what value of the constant c.
Because of this, invertible functions are sometimes described as "one-to-one", and an invertible relation is called a "one-to-one" correspondence. This terminology is suggested by looking at the arrow diagram of an "typical" invertible function:

This relation "matches" the elements in the two columns, one element in one column to one element in the other.
While the function h is not invertible, we can show that f(x) = 3(x + 1) - 2, is invertible. We will do this graphically, verbally, and algebraically. From a graphical perspective, this function looks like:

and its reverse is:

which is visibly a function (i.e., it passes the vertical line test, so that each horizontal value evaluates to only one vertical value). Note: This can also be seen by looking at the original plot of f directly; the equation f(x) = c always has at most one solution. In general:
A function f is invertible if and only if each horizontal line y = c hits the graph of f in at most one point.
This is often called the "horizontal line test" for invertibility.
From a verbal point of view, we can describe y = f(x) = 3(x + 1) - 2 in three steps; it:
adds 1 to the input, x,
multiplies the result by 3, and
subtracts 2 from that quantity to get the output, y.
To reverse this process, we would need to:
take the output, y, and add 2,
divide the result by 3, and
subtract 1 from that quantity to the input, x.
Notice how we had to reverse each operation and the order of operations (Why?). Since this is a clearly defined procedure, we again see that the reverse of f is a function. We can even express this algebraically by the formula, x = f -1(y) = (y + 2)/3 - 1, which clearly defines a function.
We can express the connection between a function and its inverse algebraically as follows:
If f expresses a functional relationship between x and y, so that y = f(x), and if f is invertible, then f -1 expresses the reverse relationship, x = f -1(y).
Make sure that you understand how to compute inverses,
from a variety of viewpoints, by completing the following exercises.
Notice that the equations y = f(x) and x = f -1(y) suggest how to compute f -1 algebraically:
Given the formula for a function, f, we can compute the formula for its inverse, f -1, by solving the equation y = f(x) for x, the resulting formula in y is the formula for f -1, x = f -1(y).
Now we can see even more clearly how the functional concept of inverse is simply another way of viewing the algebraic process of solving equations. For example, to solve y = f(x) = 3(x + 1) - 2 for x, you would work "outside-in" to cancel out each operation (by doing its opposite); specifically, you would:
add 2 to both sides: y + 2 = 3(x + 1) - 2 + 2, so that y + 2 = 3(x + 1);
divide both sides by 3: (y + 2)/3 = 3(x + 1)/3, so that (y + 2)/3 = x + 1; and
subtract 1 from both sides: (y + 2)/3 - 1 = x + 1 - 1, so that (y + 2)/3 - 1 = x.
simplifying after each step. Again, we arrive at the formula, f -1(y) = (y + 2)/3 - 1. Notice how, using this procedure, we can again see why h is not invertible: if we solve y = h(x) = x2 algebraically for x, we would obtain , which is not a single-valued formula.
We should stop to observe how the equations y = f(x) and x = f -1(y) imply two other important "cancellation" equations: y = f(f -1(y)) and x = f -1(f(x)) (just plug-in each of the previous two equations into the other). Algebraically, these equations say that both composites, and , are the "give back the input" (i.e., do nothing) function, that is, we have the functional equations, and (where "id" stands for the identity function). Intuitively, these equations say that, viewed as black-boxes, the two machines, f and f -1, "cancel" or "undo" each other. In fact, these equations uniquely characterize the inverse:
For a given function, f, if there is a function, g, which "cancels" f, that is, which satisfies the equations f(g(x)) = x and g(f(x)) = x, then f is invertible with inverse, f -1 = g. We sometimes say that f and g are a pair of inverse functions.
From this perspective, it becomes clear that we encounter invertible functions and inverses every day. Any operation that can be "undone" is invertible and "opposite" operations are inverses:
"Getting dressed" and "getting undressed";
"Standing up" and "sitting down";
"Driving to work" and "driving home";
"Converting from inches to feet" and "converting from feet to inches";
Addition and subtraction;
Multiplication and division;
are all inverse pairs of functions.
Aside: It is because multiplication and division are special cases of inverses, that we use such potentially misleading notation for inverses. For example the inverse of multiplication by 2 is division by 2, and division by 2 can also be written as multiplication by 1/2 = 2-1. In this case, the inverse function is related to an exponent, but not in general! It is just a convenient and suggestive notation.
A simplified arrow diagram is a helpful way to visualize inverse pairs:

This diagram represents the fact that the inverse, f -1, takes the outputs of f back to the inputs, so that you end up back with what you started. Although the notation may suggest otherwise, this diagram also emphasizes how they undo each other. That is, for example, while we may first learn that subtraction is the "opposite" (i.e., inverse) of addition, it is just as true that addition is the inverse of subtraction. More formally, we can say that f -1 is the inverse of f, as well vice versa (in symbols, (f -1)-1 = f, which is another reason why mathematicians have continued to use this exponent-like notation, since this looks like a basic rule of exponents).
From a functional point of view, much of Algebra then reduces to using this cancellation property of inverses. As we proceed to learn about more complex functional relationships that arise in scientific models, which can no longer be given by simple formulas, we will need to rely more and more on this cancellation property to solve the equations we encounter. For example, if we want to solve the equation:
3k(x + 2) - 1 = 11
for x, and all we know about k is that it is given by the table:
|
so that |
|
we can still use Algebra to solve this, just as usual! Working "outside-in" to cancel out each operation, by doing its opposite, would lead us to:
add 1 to both sides: 3k(x + 2) - 1 + 1 = 11 + 1, so that 3k(x + 2) = 12;
divide both sides by 3: 3k(x + 2)/3 = 12/3 = 3(x + 1)/3, so that k(x + 2) = 4;
apply k -1 to both sides: k -1(k(x + 2)) = k -1(4), so that x + 2 = 3; and
subtract 2 from both sides: x + 2 - 2 = 3 - 2, so that x = 1.
Notice how we used the second cancellation equation and the table for k -1 at the third step. You can check that this solution is correct by plugging in:
3k(1 + 2) - 1 = 3k(3) - 1 = 3·4 - 1 = 12 - 1 = 11
From this example, you can begin to see the importance of inverses in Algebra:
Even if we did not know anything about k, except that it is invertible, we could still give a formula for the solution, in terms of k -1; at the third step we would simply leave the right side unsimplified, as x + 2 = k -1(4), and end up with x = k -1(4) - 2.
Although we only used the notation of inverses at one step, we actually used some inverse function at every step.
In general, you can see that almost all of Algebra consists of only two basic steps:
Make sure that you understand how to compute and use inverses,
from an algebraic perspective, by completing the following exercises.
Go to More Operations with Functions
| Table of Contents | Glossary |