How to Graph Logarithmic Functions
The graph of y = log_b(x) (b > 1) passes through (1, 0) and (b, 1), exists only for x > 0, and has the y-axis x = 0 as a vertical asymptote. It rises slowly to the right and drops steeply toward the asymptote. For y = a·log_b(x − h) + k, the asymptote moves to x = h and the point (1, 0) moves to (h + 1, k).
Check it yourself: every example here can be loaded into the Logarithmic Graphing Calculator.
Open the Logarithmic Graphing CalculatorWhat a log graph looks like
A logarithm is the inverse of an exponential: y = log_b(x) means bʸ = x. That gives the parent log graph its features:
| Feature | y = log_b(x), b > 1 |
|---|---|
| Domain | x > 0 |
| Range | all real numbers |
| Vertical asymptote | x = 0 (the y-axis) |
| x-intercept | (1, 0) |
| Other key point | (b, 1) |
| Behaviour | increasing, slowly |
For 0 < b < 1 the graph is reflected in the x-axis and decreases.
Mirror image of the exponential
Because log_b and bˣ are inverses, their graphs are reflections in the line y = x. Every point (p, q) on y = 2ˣ becomes (q, p) on y = log₂ x:
| y = 2ˣ | (0, 1) | (1, 2) | (2, 4) | (−1, ½) |
|---|---|---|---|---|
| y = log₂ x | (1, 0) | (2, 1) | (4, 2) | (½, −1) |
The exponential’s horizontal asymptote y = 0 becomes the log’s vertical asymptote x = 0.
- log₂ x and 2ˣ reflected in y = x — opens the Graphing Calculator
Transformations
- h moves the asymptote to x = h and the domain becomes x > h.
- k moves the graph up or down.
- a stretches it; a < 0 flips it upside down.
- Key points: (h + 1, k) and (h + b, a + k).
Text description of this figure
Graph of y = log base 3 of (x + 2), minus 1, with vertical asymptote x = −2, key points (−1, −1) and (1, 0), and domain x > −2.
- Asymptote: x + 2 = 0, so x = −2. Domain x > −2.
- Point (1, 0) of log₃ x moves to (−1, −1).
- Point (3, 1) moves to (1, 0) — the x-intercept.
- Point (9, 2) moves to (7, 1).
Step by step: y = log₃(x + 2) − 1
- Domain and asymptote. x + 2 > 0, so x > −2. Draw the dashed line x = −2.
- Key points of log₃ x: (1, 0), (3, 1), (9, 2), (1⁄3, −1).
- Shift each one 2 left and 1 down: (−1, −1), (1, 0), (7, 1), (−5⁄3, −2).
- Sketch through the points, dropping steeply toward x = −2 and rising slowly to the right.
The x-intercept is (1, 0); the y-intercept is log₃(2) − 1 ≈ −0.37.
- Graph y = log₃(x + 2) − 1 — opens the Logarithmic Graphing Calculator
Finding the x-intercept algebraically
Set y = 0 and rewrite in exponential form: a·log_b(x − h) + k = 0 → log_b(x − h) = −k ⁄ a → x = h + b^(−k⁄a). For y = log₃(x + 2) − 1: x = −2 + 3¹ = 1 ✓.
Comparing bases
Larger bases give flatter log graphs. All of them pass through (1, 0):
- log₂ x reaches 3 at x = 8,
- ln x reaches 3 at x ≈ 20.1,
- log₁₀ x reaches 3 at x = 1000.
See natural log vs common log for the difference between ln and log.
Common mistakes
- Shifting the wrong way. log(x + 2) moves the graph 2 left.
- Drawing the curve crossing the asymptote or continuing for x ≤ h.
- Giving the log graph a horizontal asymptote. It keeps rising.
- Entering ln as log in a calculator; they are different functions.
Questions
Why is there no graph to the left of the asymptote?
A logarithm answers 'what power of b gives x?'. No real power of a positive base gives zero or a negative number, so log_b(x) is undefined for x ≤ 0.
Does a log graph have a horizontal asymptote?
No. It grows without limit, just very slowly: log₁₀ x reaches 6 only at x = 1,000,000.
How do I graph ln(x)?
It is log base e ≈ 2.718. It passes through (1, 0) and (e, 1), between log₂ x and log₁₀ x.
Graph your own example with the Logarithmic Graphing Calculator — free, in your browser.
Try it nowSources and further reading
- OpenStax, College Algebra 2e — 6.4 Graphs of Logarithmic Functions
- OpenStax, College Algebra 2e — 6.3 Logarithmic Functions
Worked examples and figures were produced and checked with the Graphing Calculator Lab engine. See the editorial policy.