Today's lesson
$y=a^x$ and $y=\log_a(x)$ are inverse functions — they undo each other. Today we use that idea to graph logarithms. By the end of the lesson you should be able to:
Learning intentions
- Sketch $y=\log_a(x)$ as the reflection of $y=a^x$ in the line $y=x$
- State the domain, range, $x$-intercept and asymptote of $y=\log_a(x)$ and transformed versions
- Apply translations $y=\log_a(x-h)+k$ and reflections $y=-\log_a(x)$, $y=\log_a(-x)$
- Show that $\log_{1/a}(x)=-\log_a(x)$ — the reflection-in-the-$x$-axis identity
- Find the inverse function of an exponential (or a log) and state the domain and range of the inverse
Part 1 — The inverse relationship
📺 Walkthrough: $y=2^x$ and $y=\log_2(x)$ as reflections in $y=x$ — watch $(0,1)$ become $(1,0)$ and $(1,2)$ become $(2,1)$.
Domain: $\mathbb{R}$
Range: $\mathbb{R}^+$ (i.e. $y>0$)
$y$-intercept: $(0,1)$
Asymptote: $y=0$ ($x$-axis)
Always increasing
Domain: $\mathbb{R}^+$ (i.e. $x>0$)
Range: $\mathbb{R}$
$x$-intercept: $(1,0)$
Asymptote: $x=0$ ($y$-axis)
Always increasing
- Swap $x$ and $y$: $x=2^y$.
- Rewrite in log form: $y=\log_2(x)$.
- So $f^{-1}(x)=\log_2(x)$, with domain $x>0$ and range $\mathbb{R}$.
Part 2 — Translations
$y=\log_a(x-h)+k$ is the basic log curve translated $h$ right and $k$ up. Three things to find for any sketch:
- Domain — the argument of the log must be $>0$. So $x-h>0\Rightarrow x>h$.
- Asymptote — vertical line $x=h$ (where the argument hits $0$).
- $x$-intercept — set $y=0$ and solve.
- Domain: $x>0$. Range: $\mathbb{R}$.
- Asymptote: $x=0$ (the $y$-axis).
- $x$-intercept: $\log_2(x)=0\Rightarrow x=1$, so $(1,0)$.
- Shape: increasing, passes through $(1,0)$ and $(2,1)$, very steep near $x=0^+$.
- Domain: $x-2>0\Rightarrow x>2$.
- Asymptote: $x=2$.
- $x$-intercept: $\log_2(x-2)=0\Rightarrow x-2=1\Rightarrow x=3$, so $(3,0)$.
- Same shape as $y=\log_2(x)$, just shifted $2$ to the right.
- Domain: $x+5>0\Rightarrow x>-5$.
- Asymptote: $x=-5$.
- $x$-intercept: $x+5=1\Rightarrow x=-4$.
- $y$-intercept: at $x=0$, $y=\log_2(5)\approx 2.32$.
Part 3 — Reflections
Domain: $x<0$
Range: $\mathbb{R}$
Asymptote: $x=0$
$x$-intercept: $(-1,0)$
Domain: $x>0$
Range: $\mathbb{R}$
Asymptote: $x=0$
$x$-intercept: $(1,0)$
Now decreasing
- Use change of base on $\log_{1/2}(x)$ with base $2$: $\log_{1/2}(x)=\dfrac{\log_2(x)}{\log_2(1/2)}=\dfrac{\log_2(x)}{-1}=-\log_2(x)$. ✓
- Graphical interpretation: $y=\log_a(x)$ for $0<a<1$ is the reflection of $y=\log_a(x)$ for $a>1$ in the $x$-axis. Same domain $x>0$, but now decreasing.
Part 4 — Putting it together: $y=\log_2(3x-2)$
- Domain. $3x-2>0\Rightarrow x>\tfrac{2}{3}$.
- Asymptote. $3x-2=0$ at $x=\tfrac{2}{3}$.
- $x$-intercept. $\log_2(3x-2)=0\Rightarrow 3x-2=1\Rightarrow x=1$, so $(1,0)$.
- A second helpful point. When $3x-2=2$, $y=1$. Solve $3x=4 \Rightarrow x=\tfrac{4}{3}$, so $(\tfrac{4}{3},1)$.
- Range: $\mathbb{R}$. Increasing, asymptote $x=\tfrac{2}{3}$ on the left.
- Rewrite using $\log_{1/2}(u)=-\log_2(u)$: $y=-\log_2(x+1)-2$.
- Domain. $x+1>0\Rightarrow x>-1$.
- Asymptote. $x=-1$.
- $x$-intercept. $-\log_2(x+1)-2=0\Rightarrow \log_2(x+1)=-2\Rightarrow x+1=\tfrac{1}{4}\Rightarrow x=-\tfrac{3}{4}$, so $(-\tfrac{3}{4},0)$.
- $y$-intercept. At $x=0$, $y=-\log_2(1)-2=-2$.
- Now decreasing (because of the $-\log$). Range: $\mathbb{R}$.
Part 5 — Finding the inverse of a function
- Write $y=f(x)$.
- Swap $x$ and $y$.
- Solve for $y$ — that's $f^{-1}(x)$.
- The domain of $f^{-1}$ equals the range of $f$, and vice versa.
- $y=2^x-5$. Swap: $x=2^y-5\Rightarrow 2^y=x+5\Rightarrow y=\log_2(x+5)$.
- Range of $f$: $2^x>0$ so $2^x-5>-5$, i.e. $(-5,\infty)$. So domain of $f^{-1}$ is $(-5,\infty)$.
- Domain of $f$ is $\mathbb{R}$, so range of $f^{-1}$ is $\mathbb{R}$.
- $\boxed{f^{-1}(x)=\log_2(x+5),\;\;x\in(-5,\infty)}$.
- $y=2\cdot 5^x+2$. Swap: $x=2\cdot 5^y+2\Rightarrow 5^y=\dfrac{x-2}{2}\Rightarrow y=\log_5\!\left(\dfrac{x-2}{2}\right)$.
- Range of $f$: $2\cdot 5^x>0$, so $f(x)>2$. Domain of $f^{-1}$ is $(2,\infty)$.
- $\boxed{f^{-1}(x)=\log_5\!\left(\dfrac{x-2}{2}\right),\;\;x\in(2,\infty)}$, range $\mathbb{R}$.
- $y=\log_2(x+3)-2$. Swap: $x=\log_2(y+3)-2\Rightarrow x+2=\log_2(y+3)\Rightarrow y+3=2^{x+2}\Rightarrow y=2^{x+2}-3$.
- Range of $f$: $\mathbb{R}$ (since the original log can take any real). So domain of $f^{-1}$ is $\mathbb{R}$.
- Domain of $f$ is $(-3,\infty)$, so range of $f^{-1}$ is $(-3,\infty)$.
- $\boxed{f^{-1}(x)=2^{x+2}-3,\;\;x\in\mathbb{R}}$, range $(-3,\infty)$.
Practice 5.1 — find the inverse and state its domain and range.
- $f(x)=3^x$, $f:\mathbb{R}\to\mathbb{R}$
- $f(x)=10^x+1$, $f:\mathbb{R}\to\mathbb{R}$
- $f(x)=\log_3(x)$, $f:\mathbb{R}^+\to\mathbb{R}$
b) Range of $f$: $f(x)>1$. $y=10^x+1\Rightarrow x=\log_{10}(y-1)$. So $f^{-1}(x)=\log_{10}(x-1)$, domain $(1,\infty)$, range $\mathbb{R}$.
c) $f^{-1}(x)=3^x$, domain $\mathbb{R}$, range $\mathbb{R}^+$ (inverse of part a).
Part 6 — Quick quiz (5 min)
Pick the correct answer for each, then click Mark.
Q1. The domain of $y=\log_2(x-2)$ is
Q2. The vertical asymptote of $y=\log_2(3x-2)$ is
Q3. The graph $y=\log_a(x)$ is the reflection of $y=a^x$ in
Q4. The inverse of $f(x)=2^x-5$ (with $f:\mathbb{R}\to\mathbb{R}$) is
Q5. $\log_{1/2}(x)$ is the same as
Working program — Cambridge Ex 13G
After the quiz, open Cambridge Chapter 13 and work through Exercise 13G:
| Question | Foundation | Standard (set work) | Advanced |
|---|---|---|---|
| Q1 — sketch $y=\log_a(x)$ and translations | 1 (a,c) | 1* | 1* |
| Q2 — reflections | 2 (a) | 2* | 2* |
| Q3 — combined transformations | — | 3* | 3* |
| Q4 — inverse of an exponential | 4 (a) | 4* | 4* |
| Q5 — inverse of a log | — | 5* | 5* |
After 13G: applications of exponentials and logs — modelling questions, half-life, population growth.
Exit ticket — write in your book
- What is the asymptote of $y=\log_2(x+5)$?
- If $f(x)=2^x$, what is $f^{-1}(x)$, and what is the domain of $f^{-1}$?
- How is the graph of $y=\log_{1/2}(x)$ related to $y=\log_2(x)$?