Finding an inverse from a rule
A function is given by a formula. How do you find the formula that runs it backwards, from any output to the input that produced it?
Where you are 5 in Inverse functions
When you reach for it
Reading a table backwards works when the function is a short list of pairs: find the output, read the input beside it. Most functions are formulas, and a formula has infinitely many pairs. Take
Which input gives the output 3? You could solve \displaystyle \frac{4x - 1}{x + 2} = 3 and get x = 7. Then someone asks about the output 5, and you solve again, and again for every output after that. Solving once with the output left as a letter answers every one of those questions at a stroke, and the answer is a formula of its own: the inverse function f^{-1}.
You reach for this whenever a quantity is known as a formula in one direction and the question starts from the other end: the fare is known and you want the distance, the volume is known and you want the edge, the euros received are known and you want the dollars handed over. The lesson runs over two days. Day 1 finds inverses of formulas and checks them by composition; Day 2 handles square roots, fractions and real quantities, where the domain has to be watched.
The procedure
Day 1: swap the roles and solve
What the inverse has to do. As in the table lesson, the inverse is defined by one line read in two directions:
The notation f^{-1}, read “f inverse”, names a function. The -1 is not an exponent: f^{-1}(x) and \displaystyle \frac{1}{f(x)} are different things (Example 1 compares them).
Write the rule as an equation and solve it for the input. Writing y = f(x) makes the input x and the output y two letters in one equation. For \displaystyle f(x) = \frac{4x - 1}{x + 2} that is \displaystyle y = \frac{4x - 1}{x + 2}. An equation can be solved for either of its letters. Solving it for x gives the input in terms of the output, which is exactly what f^{-1} does to an output y:
Each line is allowed for its own reason. Multiplying both sides by x + 2 is allowed because x \ne -2 on the domain of f. Collecting the x terms on one side lets the distributive property pull x out as a common factor. Dividing by y - 4 is allowed for every output except y = 4, and y = 4 is never an output: it would need 4x + 8 = 4x - 1, which no x satisfies. The last line changes the signs of the top and the bottom together, which leaves the fraction unchanged.
Rename the letter. The formula \displaystyle x = \frac{2y + 1}{4 - y} is the inverse, with its input called y. A function’s letter is only a placeholder, and the usual habit is to call an input x, so
Many books do the renaming first: swap x and y in y = f(x), giving x = f(y), and solve for y. It is the same algebra with the letters exchanged at the start instead of the end. Swapping the letters is the formula version of turning every pair (a, b) round into (b, a).
Solving must give exactly one answer. If the solving step gives one x for every output, f is one to one and the inverse exists. If it produces a \pm, two inputs share an output and there is no inverse on the whole domain (Boundaries).
The opposite steps in the opposite order. When a formula is built in stages, the inverse undoes the stages from the last one back. The function p(x) = (x + 2)^3 - 1 adds 2, cubes, then subtracts 1; its inverse adds 1, takes the cube root, then subtracts 2. Putting on socks and then shoes is undone by taking off the shoes first. Solving the equation does this automatically, because you peel off the outermost operation first.
Check by composing both ways. Two functions f and g are inverses exactly when
the first for every x in the domain of g, the second for every x in the domain of f. Each says that one function undoes the other, the way the identity function gives back its input. Both are needed: Example 3 shows a pair where one holds and the other fails. For the fraction above, composing and clearing the small fractions by multiplying top and bottom by 4 - x:
and multiplying top and bottom by x + 2:
So \displaystyle f^{-1}(3) = \frac{7}{1} = 7, as solving once gave, and \displaystyle f^{-1}(5) = \frac{11}{-1} = -11 with no new equation to solve.
Day 2: domains, and quantities with meaning
The domain and the range swap. The inputs of f^{-1} are the outputs of f, so the domain of f^{-1} is the range of f, and the range of f^{-1} is the domain of f. For the fraction above, f takes every input except -2 and gives every output except 4, so f^{-1} takes every input except 4 and gives every output except -2. That matches the formula \displaystyle \frac{2x + 1}{4 - x}, which breaks at x = 4.
When the formula hides the domain, write it down. Sometimes the algebra produces a formula whose natural domain is too big. Undoing a square root means squaring, and x^2 accepts every number, but a square root only gives outputs that are zero or more. The inverse must be cut down to the range of the original, and the cut is part of the answer, written beside the formula (Example 4).
Squaring both sides is allowed only when both sides are known to be zero or more. Two numbers with equal squares are equal or opposite. In \displaystyle y - 3 = \sqrt{x - 2} the right side is never negative, so on the range y \ge 3 both sides are zero or more, and squaring loses nothing.
In a real situation, keep the names. When C(h) is a cost in dollars for h hours, the inverse takes a cost and returns hours. Swapping the letters to make “C” an input called h would mix up dollars and hours, so in context you solve for the input and keep each letter’s meaning: \displaystyle h = \frac{C - 60}{45}, say. The units swap along with the roles: the inverse takes dollars and gives hours.
Worked examples
Day 1: a line, and what the notation means
Let f(x) = 5 - 4x. (a) Find f^{-1}(x). (b) Find f^{-1}(-7) and compare it with \displaystyle \frac{1}{f(-7)}. (c) Check the inverse by composing both ways.
Solution(a) Write y = 5 - 4x and solve for x. Adding 4x and subtracting y on both sides gives 4x = 5 - y, and dividing by 4 gives \displaystyle x = \frac{5 - y}{4}. Each step was done to both sides, so the equation still has the same solutions. One x for each y, so f is one to one. Renaming the input,
Read as stages: f multiplies by -4 and then adds 5, so f^{-1} subtracts 5 and then divides by -4, giving \displaystyle \frac{x - 5}{-4}, which is the same fraction as \displaystyle \frac{5 - x}{4}.
(b) \displaystyle f^{-1}(-7) = \frac{5 + 7}{4} = 3, and indeed f(3) = 5 - 12 = -7. On the other hand f(-7) = 5 + 28 = 33, so \displaystyle \frac{1}{f(-7)} = \frac{1}{33}. The two are unrelated numbers: f^{-1} undoes f, it does not turn its outputs upside down.
(c) Substitute each rule into the other:
Both hold for every real x, so the two are inverses.
Day 1: a cube inside
Find the inverse of p(x) = (x + 2)^3 - 1, check it, and find p^{-1}(7).
SolutionWrite y = (x + 2)^3 - 1. The outermost operation is “subtract 1”, so undo it first: y + 1 = (x + 2)^3. Next take the cube root of both sides. That is allowed with no conditions, because every real number has exactly one real cube root, so two numbers with equal cubes are equal: \displaystyle \sqrt[3]{y + 1} = x + 2. Finally subtract 2:
Both p and p^{-1} accept every real number. Check: \displaystyle p\big(p^{-1}(x)\big) = \left(\sqrt[3]{x + 1}\right)^3 - 1 = x + 1 - 1 = x, and \displaystyle p^{-1}\big(p(x)\big) = \sqrt[3]{(x + 2)^3} - 2 = x + 2 - 2 = x.
Then \displaystyle p^{-1}(7) = \sqrt[3]{8} - 2 = 0, and indeed p(0) = 8 - 1 = 7.
Day 1: are these two inverses?
Decide whether each pair are inverses of each other. (a) f(x) = 3x - 6 and g(x) = \dfrac{x}{3} + 2 (b) f(x) = 3x - 6 and u(x) = \dfrac{x}{3} + 6 (c) s(x) = x^2 and \displaystyle t(x) = \sqrt{x}, with s taking every real number
Solution(a) \displaystyle f(g(x)) = 3\left(\frac{x}{3} + 2\right) - 6 = x + 6 - 6 = x and \displaystyle g(f(x)) = \frac{3x - 6}{3} + 2 = x - 2 + 2 = x. Both compositions give x for every real x: inverses.
(b) \displaystyle f(u(x)) = 3\left(\frac{x}{3} + 6\right) - 6 = x + 12. That is not x, so the pair are not inverses, and one composition is enough to show it. With a number: u(0) = 6 but f(6) = 12, so going out with u and back with f does not return to 0.
(c) \displaystyle s(t(x)) = \left(\sqrt{x}\right)^2 = x for every x \ge 0, the whole domain of t. But \displaystyle t(s(x)) = \sqrt{x^2} = |x|, which is x only when x \ge 0. For example s(-5) = 25 and t(25) = 5, not -5. So t undoes s only on part of its domain: not inverses. This is the pair where one direction holds and the other fails. They become inverses once s is cut down to x \ge 0, which is what restricting a domain is about.
Day 2: a square root, and the domain it leaves behind
Find the inverse of \displaystyle q(x) = \sqrt{x - 2} + 3, with its domain.
SolutionFirst the domain and range of q. The square root needs x - 2 \ge 0, so the domain is x \ge 2. The square root gives every value from 0 up, so q gives every value from 3 up: the range is y \ge 3.
Write \displaystyle y = \sqrt{x - 2} + 3 and subtract 3: \displaystyle y - 3 = \sqrt{x - 2}. On the range y \ge 3 both sides are zero or more, so squaring both sides keeps exactly the same solutions: (y - 3)^2 = x - 2, and so x = (y - 3)^2 + 2. Renaming, and carrying the range of q across as the domain of the inverse:
The condition is not decoration. Without it, the formula gives (1 - 3)^2 + 2 = 6 at x = 1, but q(6) = 2 + 3 = 5, not 1: no input of q gives 1 at all. With it, the inverse is the right half of a parabola, the mirror image of the square root curve.
Check: for x \ge 2, \displaystyle q^{-1}\big(q(x)\big) = \left(\sqrt{x - 2}\right)^2 + 2 = x. For x \ge 3, \displaystyle q\big(q^{-1}(x)\big) = \sqrt{(x - 3)^2} + 3 = |x - 3| + 3 = x, because x - 3 \ge 0. The second check needs the condition x \ge 3, which is the algebra confirming the domain. With a number: q(6) = 5 and q^{-1}(5) = 4 + 2 = 6, the marked pair in the figure.
Day 2: a fraction with the input on top and bottom
Find the inverse of k(x) = \dfrac{x + 6}{2x - 3} with its domain and range. Use it to find the input whose output is 2, and decide whether any input gives the output \displaystyle \frac{1}{2}.
SolutionThe domain of k is every real number except \displaystyle \frac{3}{2}, where the bottom is zero. Write \displaystyle y = \frac{x + 6}{2x - 3}. The input appears twice, so no single undoing step isolates it. Multiply both sides by 2x - 3, allowed since \displaystyle x \ne \frac{3}{2}:
Expand, then move every term with x to the left and every other term to the right:
Now x is a common factor on the left, so the distributive property gives x(2y - 1) = 3y + 6. Dividing by 2y - 1 is allowed unless \displaystyle y = \frac{1}{2}, and \displaystyle \frac{1}{2} is never an output: it would need 2(x + 6) = 2x - 3, that is 2x + 12 = 2x - 3, which no x satisfies. So
The domain of k^{-1} is every real number except \displaystyle \frac{1}{2}, the one value k never reaches, and its range is every real number except \displaystyle \frac{3}{2}, the one input k refuses. That answers the last question: no input gives the output \displaystyle \frac{1}{2}.
For the output 2: \displaystyle k^{-1}(2) = \frac{6 + 6}{4 - 1} = 4. Check: \displaystyle k(4) = \frac{10}{5} = 2. Composing both ways, multiplying top and bottom by 2x - 1 in the first and by 2x - 3 in the second:
Day 2: a taxi fare read backwards
A taxi charges a fixed 3.20 dollars plus 1.60 dollars per kilometer, so a ride of m kilometers costs F(m) = 3.20 + 1.60m dollars. (a) Write the distance as a function of the fare, and say what its input and output are. (b) A ride cost 19.20 dollars. How long was it? (c) How far can you go for 25 dollars? (d) What are the domains of F and of its inverse here?
Solution(a) Solve F = 3.20 + 1.60m for m, keeping the letters: subtract 3.20, then divide by 1.60.
This is F^{-1}: its input is a fare in dollars and its output is a distance in kilometers. The letters keep their meanings, so there is no swap of m and F; renaming here would call a fare “m”, which reads as kilometers.
(b) \displaystyle m = \frac{19.20 - 3.20}{1.60} = \frac{16}{1.60} = 10 kilometers. Check: F(10) = 3.20 + 16 = 19.20.
(c) \displaystyle m = \frac{25 - 3.20}{1.60} = \frac{21.80}{1.60} = 13.625, so about 13.6 kilometers.
(d) A distance cannot be negative, so F takes m \ge 0, and its outputs are F \ge 3.20. The inverse therefore takes fares F \ge 3.20: a fare of 2 dollars would give m = -0.75, which describes no ride. The context, not the algebra, sets the domain.
Day 2: a function that is its own inverse
Find the inverse of w(x) = \dfrac{2x + 3}{x - 2}, and explain what the answer says about w.
SolutionWrite \displaystyle y = \frac{2x + 3}{x - 2} and multiply by x - 2, allowed for x \ne 2: y(x - 2) = 2x + 3. Expanding and collecting the x terms,
so x(y - 2) = 2y + 3, and dividing by y - 2 (the value y = 2 would need 2x - 4 = 2x + 3, so it is never an output) gives \displaystyle x = \frac{2y + 3}{y - 2}. Renaming:
That is w itself. Applying w twice returns every input: w(w(x)) = x for x \ne 2. Check with the composition, multiplying top and bottom by x - 2:
With a number: \displaystyle w(3) = \frac{9}{1} = 9 and \displaystyle w(9) = \frac{21}{7} = 3. A function that undoes itself pairs its inputs off, and since turning every pair (a, b) round leaves the set of pairs the same, its graph is unchanged by reflection in the line y = x. Simpler examples are 9 - x and \displaystyle \frac{1}{x}.
Boundaries
No inverse unless the function is one to one. If two inputs share an output, that output has no single input to return to. The algebra shows it: solving y = x^2 + 1 for x gives \displaystyle x = \pm\sqrt{y - 1}, two answers for each y > 1, because f(2) = f(-2) = 5. Such a function has an inverse only after its domain is cut down to a one to one piece.
The domain of the inverse is the range of the original, whatever the formula suggests. A formula produced by squaring, or by any step that is not reversible on every number, can accept inputs the inverse must refuse (Example 4). State the domain beside the formula.
Squaring both sides needs both sides to be zero or more. Otherwise the squared equation has extra solutions that the original does not.
Dividing by an expression needs it to be nonzero. In the fraction examples, dividing by y - 4 or y - 2 is allowed only because that value of y is never an output. A constant function such as f(x) = 5 fails here completely: solving y = 0x + 5 for x would mean dividing by 0, and indeed every input gives 5.
An inverse may exist with no formula you can solve for. The function x^5 + x is one to one, since x^5 and x both grow as x grows and so their sum does too, so it has an inverse. Yet no formula built from the four operations and roots solves y = x^5 + x for x; that this is impossible, and not merely hard, is a result of college algebra about fifth-degree equations. The inverse is still a function; it simply has no neat rule. For functions like 2^x, whose inverse is not built from the usual operations, a new operation is invented to name it (below).
In context, the meaning sets the domain. Negative distances or times may make algebraic sense and no physical sense (Example 6).
Where this goes next
Swapping x and y turns every point (a, b) of a graph into (b, a), which is reflection in the line y = x; that is the graph of an inverse, and it is why the two curves in the figure are mirror images. When the solving step throws up a \pm, restricting the domain picks one branch, which is how the square root is defined as the inverse of squaring on x \ge 0. The same move, applied to y = 2^x, needs an operation that did not exist before: the exponent you must raise 2 to. That operation is the logarithm, and its graph is the exponential curve reflected in y = x. All of this is part of the wider study of inverse functions.
Exercises
Day 1: finding inverses of formulas
Find the inverse of each function. All of them are one to one on every real number.
- f(x) = 5x + 8
- g(x) = \dfrac{x}{3} - 4
- h(x) = 9 - x
- k(x) = \dfrac{2x + 1}{3}
- m(x) = x^3 - 6
- n(x) = 4(x - 1)^3
- \displaystyle v(x) = \sqrt[3]{2x - 5}
Day 1: notation and checking
- For f(x) = 5x + 8 from Exercise 1, find f^{-1}(23), \displaystyle \frac{1}{f(23)} and f^{-1}\big(f(-4)\big).
- Show by composing both ways that f(x) = 8 - 2x and g(x) = 4 - \dfrac{x}{2} are inverses.
- Kemal says f(x) = 2x + 6 and g(x) = \dfrac{x}{2} - 6 are inverses. Check by composition, and if he is wrong, give the correct inverse of f.
- Show that f(x) = \dfrac{1}{x} + 2 and g(x) = \dfrac{1}{x - 2} are inverses, saying which inputs each composition is valid for.
Day 2: roots and fractions
Find each inverse and give its domain.
- \displaystyle r(x) = \sqrt{x + 5}
- \displaystyle s(x) = 2\sqrt{x} - 1
- f(x) = \dfrac{3x}{x - 5}
- g(x) = \dfrac{2x - 3}{x + 1}
Day 2: in context
- A plumber charges C(h) = 60 + 45h dollars for a job of h hours. Write the hours as a function of the bill, and find the length of a job billed at 217.50 dollars.
- A cube with edges s centimeters has volume V(s) = s^3 cubic centimeters. Write the edge as a function of the volume. Find the edge of a cube of volume 343 cubic centimeters, and of one of volume 100 cubic centimeters to two decimal places.
- An exchange booth keeps a fee of 4 dollars and gives 0.9 euros for each remaining dollar, so d dollars buy E(d) = 0.9(d - 4) euros, for d \ge 4. Write the dollars as a function of the euros, find how many dollars buy 90 euros, and decide whether any amount gives the same number of dollars and euros.
Reasoning
- Use the solving step to explain why f(x) = x^2 + 1 has no inverse on all real numbers. Then find the inverse of f with its domain cut down to x \ge 0.
- Show that every linear function f(x) = mx + b with m \ne 0 has an inverse, find it, and say how its slope compares with the slope of f. What goes wrong when m = 0?
- Show that f(x) = \dfrac{ax + b}{cx - a}, with c \ne 0 and a^2 + bc \ne 0, is its own inverse. Why is the condition a^2 + bc \ne 0 needed?
- Priya checks that f(x) = x^2 and \displaystyle g(x) = -\sqrt{x} satisfy f(g(x)) = x for every x \ge 0, and concludes they are inverses. Explain why she is wrong, and say how the domain of f could be cut down so that she is right.
Answers
- \displaystyle f^{-1}(x) = \frac{x - 8}{5}. From y = 5x + 8, subtract 8 and divide by 5.
- g^{-1}(x) = 3x + 12. From \displaystyle y = \frac{x}{3} - 4, add 4 to get \displaystyle y + 4 = \frac{x}{3}, then multiply by 3.
- h^{-1}(x) = 9 - x. From y = 9 - x, x = 9 - y. The function is its own inverse.
- \displaystyle k^{-1}(x) = \frac{3x - 1}{2}. From \displaystyle y = \frac{2x + 1}{3}, 3y = 2x + 1, so \displaystyle x = \frac{3y - 1}{2}.
- \displaystyle m^{-1}(x) = \sqrt[3]{x + 6}. From y = x^3 - 6, y + 6 = x^3, and the cube root is always allowed.
- \displaystyle n^{-1}(x) = 1 + \sqrt[3]{\frac{x}{4}}. From y = 4(x - 1)^3, \displaystyle \frac{y}{4} = (x - 1)^3, so \displaystyle x - 1 = \sqrt[3]{\frac{y}{4}}.
- \displaystyle v^{-1}(x) = \frac{x^3 + 5}{2}. From \displaystyle y = \sqrt[3]{2x - 5}, cubing (always reversible) gives y^3 = 2x - 5, so \displaystyle x = \frac{y^3 + 5}{2}.
- f^{-1}(23) = 3, since \displaystyle \frac{23 - 8}{5} = 3 (and f(3) = 23). f(23) = 123, so \displaystyle \frac{1}{f(23)} = \frac{1}{123}, a different number. f(-4) = -12 and f^{-1}(-12) = -4, so f^{-1}\big(f(-4)\big) = -4.
- \displaystyle f(g(x)) = 8 - 2\left(4 - \frac{x}{2}\right) = 8 - 8 + x = x and \displaystyle g(f(x)) = 4 - \frac{8 - 2x}{2} = 4 - 4 + x = x, for every real x. So they are inverses.
- He is wrong: \displaystyle f(g(x)) = 2\left(\frac{x}{2} - 6\right) + 6 = x - 6, not x. Solving y = 2x + 6 gives \displaystyle f^{-1}(x) = \frac{x}{2} - 3. Check: \displaystyle 2\left(\frac{x}{2} - 3\right) + 6 = x.
- \displaystyle f(g(x)) = \frac{1}{\frac{1}{x - 2}} + 2 = (x - 2) + 2 = x for x \ne 2, the domain of g. \displaystyle g(f(x)) = \frac{1}{\frac{1}{x} + 2 - 2} = \frac{1}{\frac{1}{x}} = x for x \ne 0, the domain of f. So they are inverses.
- r^{-1}(x) = x^2 - 5, x \ge 0. The range of r is y \ge 0, so squaring \displaystyle y = \sqrt{x + 5} is safe: y^2 = x + 5.
- \displaystyle s^{-1}(x) = \frac{(x + 1)^2}{4}, x \ge -1. The range of s is y \ge -1. From \displaystyle \frac{y + 1}{2} = \sqrt{x}, both sides are zero or more, so square: \displaystyle x = \frac{(y + 1)^2}{4}.
- \displaystyle f^{-1}(x) = \frac{5x}{x - 3}, x \ne 3. From y(x - 5) = 3x: xy - 3x = 5y, so x(y - 3) = 5y. The value y = 3 is never an output, since it would need 3x - 15 = 3x. Check: f(6) = 18 and \displaystyle f^{-1}(18) = \frac{90}{15} = 6.
- \displaystyle g^{-1}(x) = \frac{x + 3}{2 - x}, x \ne 2. From y(x + 1) = 2x - 3: xy - 2x = -3 - y, so x(y - 2) = -(y + 3). The value 2 is never an output of g, since it would need 2x + 2 = 2x - 3. Check: \displaystyle g(2) = \frac{1}{3} and \displaystyle g^{-1}\!\left(\frac{1}{3}\right) = \frac{10/3}{5/3} = 2.
- \displaystyle h = \frac{C - 60}{45}, a bill in dollars giving hours, for C \ge 60. For 217.50 dollars: \displaystyle h = \frac{157.50}{45} = 3.5 hours.
- \displaystyle s = \sqrt[3]{V}, a volume giving an edge. \displaystyle \sqrt[3]{343} = 7 centimeters, and \displaystyle \sqrt[3]{100} \approx 4.64 centimeters. Only V > 0 makes sense here.
- \displaystyle d = \frac{10}{9}E + 4, euros received giving dollars handed over, for E \ge 0. From E = 0.9(d - 4), divide by 0.9 and add 4. For 90 euros, d = 100 + 4 = 104 dollars; check: E(104) = 0.9 \cdot 100 = 90. The same number means 0.9(d - 4) = d, so 9(d - 4) = 10d and d = -36, a negative amount of money: no real exchange does it.
- Solving y = x^2 + 1 gives x^2 = y - 1 and \displaystyle x = \pm\sqrt{y - 1}: two inputs for every y > 1, for example f(2) = f(-2) = 5, so f is not one to one and the output 5 has no single input to return to. On x \ge 0 only the + sign is kept, and \displaystyle f^{-1}(x) = \sqrt{x - 1}, x \ge 1.
- From y = mx + b, \displaystyle x = \frac{y - b}{m}, which needs m \ne 0 and gives exactly one x for each y. So \displaystyle f^{-1}(x) = \frac{x - b}{m} = \frac{1}{m}x - \frac{b}{m}, a line of slope \displaystyle \frac{1}{m}, the reciprocal of the slope of f. When m = 0, f(x) = b for every x: every input shares one output, and the solving step would divide by zero. No inverse.
- From y(cx - a) = ax + b: cxy - ay = ax + b, so cxy - ax = ay + b and x(cy - a) = ay + b, giving \displaystyle x = \frac{ay + b}{cy - a}, the same rule as f. If a^2 + bc = 0, then \displaystyle b = -\frac{a^2}{c} and \displaystyle ax + b = \frac{a}{c}(cx - a), so \displaystyle f(x) = \frac{a}{c} for every allowed x: a constant function, which is not one to one and has no inverse. Example 7 is the case a = 2, b = 3, c = 1, where a^2 + bc = 7.
- Inverses need both compositions. \displaystyle g(f(x)) = -\sqrt{x^2} = -|x|, which is not x for positive x: f(3) = 9 and g(9) = -3. If f is cut down to x \le 0, then -|x| = x on that domain, the range of f is still x \ge 0, and the two are inverses.