AP Precalculus · Lesson 2

Composition, inverses and logarithms

Know Know it

A composite function f(g(x))f(g(x)) runs g first and feeds its output into f. Order matters: f(g(x))f(g(x)) and g(f(x))g(f(x)) are usually different.

The inverse function f−1f^{-1} undoes f. If f(a)=bf(a) = b, then f−1(b)=af^{-1}(b) = a, so f(f−1(x))=xf(f^{-1}(x)) = x and f−1(f(x))=xf^{-1}(f(x)) = x. The inverse swaps inputs and outputs, and its graph is the reflection of f across y=xy = x. A function has an inverse only if it is one-to-one; otherwise restrict its domain.

A logarithm is an exponent: log⁡bc=a\log_b c = a means ba=cb^a = c. So y=log⁡bxy = \log_b x is the inverse of y=bxy = b^x. Its domain is x>0x > 0, it has a vertical asymptote at x=0x = 0, and ln⁡x\ln x means log⁡ex\log_e x.

The log properties, for positive m and n: log⁡b(mn)=log⁡bm+log⁡bn\log_b(mn) = \log_b m + \log_b n; log⁡bmn=log⁡bm−log⁡bn\log_b \frac{m}{n} = \log_b m - \log_b n; log⁡b(mk)=klog⁡bm\log_b(m^k) = k\log_b m. Change of base: log⁡bx=ln⁡xln⁡b\log_b x = \frac{\ln x}{\ln b}.

Swap the columns of y=2xy = 2^x to get points on y=log⁡2xy = \log_2 x
x2x2^xso log⁡2\log_2 of that value is
-10.5-1
010
121
242
383

Trap Logs do not split over a sum, and the inverse is not a reciprocal

log⁡b(m+n)\log_b(m + n) is not log⁡bm+log⁡bn\log_b m + \log_b n; the product property is for log⁡b(mn)\log_b(mn). Also, f−1(x)f^{-1}(x) means the inverse function, not 1f(x)\frac{1}{f(x)}.

Worked example Easy

What is the value of log⁡381\log_3 81?

  1. 27
  2. 14\frac{1}{4}
  3. 4Answer
  4. 243

How to solve it

  1. Ask: 3 to what power is 81.
  2. 32=93^2 = 9, 33=273^3 = 27, 34=813^4 = 81.
  3. So log⁡381=4\log_3 81 = 4.

Why each choice is right or wrong

  • A. Incorrect. 27 is 81÷381 \div 3, but a log asks for an exponent, not a quotient.
  • B. Incorrect. 14\frac{1}{4} would be log⁡813\log_{81} 3, the base and the input swapped.
  • C. Correct. 34=813^4 = 81, so the exponent that turns 3 into 81 is 4.
  • D. Incorrect. 243 is 3⋅813 \cdot 81, a product, but a log asks for the exponent on 3 that gives 81.

Explain Explain it

Task verbs: explain, calculate

To find an inverse, write y=f(x)y = f(x), swap x and y, and solve for y. To find one value of f−1f^{-1}, you do not need the formula: set f(x)f(x) equal to the given output and solve for x.

To explain why a function has no inverse, show two inputs with the same output. Then name a domain on which the function is one-to-one.

Worked example Medium

Let f(x)=4+log⁡2(x−1)f(x) = 4 + \log_2(x - 1). What is f−1(7)f^{-1}(7)?

  1. 8
  2. 9Answer
  3. 4+log⁡264 + \log_2 6
  4. 129

How to solve it

  1. f−1(7)f^{-1}(7) is the input x with f(x)=7f(x) = 7.
  2. Subtract 4: log⁡2(x−1)=3\log_2(x - 1) = 3.
  3. Rewrite as a power: x−1=23=8x - 1 = 2^3 = 8, so x=9x = 9. Check: f(9)=4+log⁡28=7f(9) = 4 + \log_2 8 = 7.

Why each choice is right or wrong

  • A. Incorrect. 8 is the value of x−1x - 1, not of x; add 1 to get x=9x = 9.
  • B. Correct. Solve 4+log⁡2(x−1)=74 + \log_2(x - 1) = 7: log⁡2(x−1)=3\log_2(x - 1) = 3, so x−1=8x - 1 = 8 and x=9x = 9.
  • C. Incorrect. 4+log⁡264 + \log_2 6 is f(7)f(7), the output at 7, but the inverse asks which input gives 7.
  • D. Incorrect. 129 is 27+12^7 + 1, which skips subtracting the 4 before rewriting the log as a power.

Explain Your turn

Explain why g(x)=x2g(x) = x^2 has no inverse function when its domain is all real numbers, and give a domain on which it does have one.

Write it, then compare. Nothing you type here is saved or graded.

Compare with a model answer

A full answer does this

  • Shows two different inputs with the same output, so g is not one-to-one
  • Restricts the domain to x≥0x \geq 0 or to x≤0x \leq 0

Model answer

On all real numbers, g is not one-to-one: g(2)=4g(2) = 4 and g(−2)=4g(-2) = 4, so an inverse could not tell whether 4 came from 2 or -2. If the domain is restricted to x≥0x \geq 0, each output comes from one input, and the inverse is g−1(x)=xg^{-1}(x) = \sqrt{x}.

Apply Apply it

Practice these topics. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.