Graphing logarithmic functions
In Year 12 Mathematical Methods (Queensland, QCAA), the graph of a logarithmic function \(y=\log_{a}x\) (with base \(a>1\), including \(y=\ln x\)) has a vertical asymptote \(x=0\), crosses the \(x\)-axis at \((1,0)\), is always increasing, with domain \(x>0\) and range all real \(y\) — studied here with its transformations \(y=\log_{a}(x-h)+k\), reflections, and its inverse relationship with \(y=a^{x}\) (a reflection in \(y=x\)).
A logarithmic function is \(y=\log_{a}x\), the inverse of the exponential \(y=a^{x}\) (base \(a>1\)); the natural log \(y=\ln x=\log_{e}x\) uses base \(e\approx 2.718\). Because a logarithm is only defined for a positive argument, the domain is \(x>0\) and the graph never crosses the \(y\)-axis — instead it plunges downward beside it, so \(x=0\) is a vertical asymptote.
Since \(\log_{a}1=0\), the graph always cuts the \(x\)-axis at the \(x\)-intercept \((1,0)\). With base \(a>1\) the curve is increasing (rising slowly to the right), and its range is all real \(y\). It is the mirror image of \(y=a^{x}\) in the line \(y=x\).
Transformations move this curve. For \(y=\log_{a}(x-h)+k\) the \(h\) slides it sideways, so the vertical asymptote moves to \(x=h\) and the domain becomes \(x>h\); the \(k\) slides it up or down. Reflections flip it: \(y=-\log_{a}x\) is a reflection in the \(x\)-axis (now decreasing), and \(y=\log_{a}(-x)\) is a reflection in the \(y\)-axis (domain \(x<0\)).
The logarithmic function (base \(a>1\)), the inverse of \(y=a^{x}\):
The transformed logarithm (horizontal shift \(h\), vertical shift \(k\)):
The inverse relationship with the exponential (reflection in \(y=x\)):
How to sketch \(y=\log_{a}(x-h)+k\)
- Asymptote first. The graph exists only where the argument is positive, so \(x-h>0\); the vertical asymptote is \(x=h\) and the domain is \(x>h\).
- Find the \(x\)-intercept. Set \(y=0\); with \(k=0\) this is where the argument equals \(1\), i.e. \(x-h=1\). (If \(k\neq0\), solve \(\log_{a}(x-h)=-k\).)
- Find the \(y\)-intercept. Substitute \(x=0\) — but only if \(x=0\) lies in the domain \(x>h\).
- Set the shape. With base \(a>1\) the curve increases (unless a negative coefficient reflects it in the \(x\)-axis), rising from the asymptote through the intercepts.
Domain: \(\log_{2}x\) needs \(x>0\), so the vertical asymptote is \(x=0\).
\(x\)-intercept: \(\log_{2}x=0\Rightarrow x=1\), so \((1,0)\).
The base \(2>1\), so the graph is increasing; range all real \(y\).
This is \(y=\ln x\) shifted right \(2\).
| \(\text{asymptote}\) | \(:\) | \(x=2\) |
| \(\text{domain}\) | \(:\) | \(x>2\) |
| \(\ln(x-2)=0\) | \(\Rightarrow\) | \(x-2=1,\ x=3\) |
Asymptote \(x=2\), domain \(x>2\), \(x\)-intercept \((3,0)\).
(a) Rewrite in index form \(x=a^{c}\).
| \(\log_{2}x\) | \(=\) | \(5\) |
| \(x\) | \(=\) | \(2^{5}=32\) |
(b) Apply \(e\) to both sides (the inverse of \(\ln\)).
| \(\ln x\) | \(=\) | \(2\) |
| \(x\) | \(=\) | \(e^{2}\approx 7.39\) |
| \(R\) | \(=\) | \(\log_{10}1000=3\) |
| \(\dfrac{I_{5}}{I_{3}}\) | \(=\) | \(\dfrac{10^{5}I_{0}}{10^{3}I_{0}}=10^{2}\) |
So \(R=3\), and a magnitude-\(5\) earthquake is \(100\) times as intense as a magnitude-\(3\) one.
Common pitfalls
Frequently asked questions
What are the features of the graph of y = log_a x?
For \(a>1\): a vertical asymptote \(x=0\), \(x\)-intercept \((1,0)\), always increasing, domain \(x>0\), range all real \(y\).
How does y = log_a(x - h) + k transform the graph?
\(h\) shifts it sideways (asymptote moves to \(x=h\), domain \(x>h\)) and \(k\) shifts it up or down. The \(x\)-intercept is where the argument equals \(1\).
How are y = log_a x and y = a^x related?
They are inverses, so their graphs are reflections in the line \(y=x\); every point \((p,q)\) on \(y=a^{x}\) becomes \((q,p)\) on \(y=\log_{a}x\). In particular \(y=\ln x\) is the inverse of \(y=e^{x}\).
How do you solve a logarithmic equation like log_2 x = 5?
Rewrite in index form: \(\log_{a}x=c\Rightarrow x=a^{c}\). So \(\log_{2}x=5\Rightarrow x=32\), and \(\ln x=2\Rightarrow x=e^{2}\approx 7.39\).
What do reflections do to a logarithmic graph?
\(y=-\log_{a}x\) reflects in the \(x\)-axis (now decreasing, same domain \(x>0\)); \(y=\log_{a}(-x)\) reflects in the \(y\)-axis (domain \(x<0\)).
Where are logarithmic graphs used in the real world?
On logarithmic scales such as the Richter scale \(R=\log_{10}(I/I_{0})\), sound loudness in decibels, and pH \(=-\log_{10}[\text{H}^{+}]\).