Logarithmic Functions - Graph, Properties, Examples

TL;DR
A logarithmic function f(x)=log⁡b(x)f(x) = \log_b(x) is the inverse of an exponential function — it answers "what power must I raise bb to in order to get xx?" The two most common log functions are log⁡(x)\log(x) (base 10) and ln⁡(x)\ln(x) (base ee). The graph passes through (1,0)(1, 0), grows without bound but slowly, has domain (0,∞)(0, \infty), and has a vertical asymptote at x=0x = 0.
BT
Bhanzu TeamLast updated on May 19, 20266 min read

What Is a Logarithmic Function?

A logarithmic function is a function of the form:

f(x)=log⁡b(x)f(x) = \log_b(x)

where bb is the base (b>0,b≠1b > 0, b \neq 1). It's defined by the inverse relationship:

y=log⁡b(x)  ⟺  by=xy = \log_b(x) \iff b^y = x

In words: log⁡b(x)\log_b(x) is "the exponent you raise bb to in order to get xx."

The two most-used logarithmic functions:

  • Common logarithm: log⁡(x)=log⁡10(x)\log(x) = \log_{10}(x) — base 10. Often written without a subscript.

  • Natural logarithm: ln⁡(x)=log⁡e(x)\ln(x) = \log_e(x) — base e≈2.71828e \approx 2.71828. The default in calculus.

The Graph of a Logarithmic Function

For f(x)=log⁡b(x)f(x) = \log_b(x) with b>1b > 1:

  • Passes through (1,0)(1, 0) — because log⁡b(1)=0\log_b(1) = 0 for any base.

  • Passes through (b,1)(b, 1) — because log⁡b(b)=1\log_b(b) = 1.

  • Domain: (0,∞)(0, \infty) — only positive inputs.

  • Range: (−∞,∞)(-\infty, \infty) — all real outputs.

  • Vertical asymptote at x=0x = 0 — the curve approaches the y-axis but never touches it. As x→0+x \to 0^+, f(x)→−∞f(x) \to -\infty.

  • Increasing for b>1b > 1 — grows monotonically but very slowly. For example, log⁡10(10)=1\log_{10}(10) = 1 but log⁡10(10000)=4\log_{10}(10000) = 4.

  • Concave down — the curve bends downward as xx increases.

For 0<b<10 < b < 1, the graph flips vertically — decreasing instead of increasing, but with the same domain/range/asymptote.

Properties of Logarithmic Functions

The behaviour of log⁡b\log_b is governed by the same identities that hold for logarithms in general (see Properties of Logarithms).

Algebraic Properties

log⁡b(xy)=log⁡b(x)+log⁡b(y)(product rule)\log_b(xy) = \log_b(x) + \log_b(y) \quad \text{(product rule)}

log⁡b!(xy)=log⁡b(x)−log⁡b(y)(quotient rule)\log_b!\left(\frac{x}{y}\right) = \log_b(x) - \log_b(y) \quad \text{(quotient rule)}

log⁡b(xn)=nlog⁡b(x)(power rule)\log_b(x^n) = n \log_b(x) \quad \text{(power rule)}

log⁡b(1)=0,log⁡b(b)=1\log_b(1) = 0, \quad \log_b(b) = 1

Function-Specific Properties

f(x⋅y)=f(x)+f(y)(turns multiplication into addition)f(x \cdot y) = f(x) + f(y) \quad \text{(turns multiplication into addition)}

f(xn)=n⋅f(x)(scales by exponent)f(x^n) = n \cdot f(x) \quad \text{(scales by exponent)}

f−1(x)=bx(inverse is exponential)f^{-1}(x) = b^x \quad \text{(inverse is exponential)}

Calculus Properties (for f(x)=ln⁡(x)f(x) = \ln(x))

ddxln⁡(x)=1x,x>0\frac{d}{dx} \ln(x) = \frac{1}{x}, \quad x > 0

∫ln⁡(x),dx=xln⁡(x)−x+C\int \ln(x) , dx = x \ln(x) - x + C

The natural log is the unique logarithm whose derivative is 1/x1/x — which is why ln⁡\ln is the default in calculus.

Three Worked Examples — Quick, Standard, Stretch

Quick — Evaluate a Log

Compute log⁡2(32)\log_2(32).

Ask: 2?=322^? = 32. Since 25=322^5 = 32, the answer is log⁡2(32)=5\log_2(32) = 5.

Standard — Solve a Log Equation

Solve log⁡3(x)=4\log_3(x) = 4 for xx.

By definition: log⁡3(x)=4  ⟺  34=x\log_3(x) = 4 \iff 3^4 = x. So x=81x = 81.

Check. log⁡3(81)=4\log_3(81) = 4 because 34=813^4 = 81 ✓.

Stretch — Graph Transformation

Sketch f(x)=log⁡2(x−3)+1f(x) = \log_2(x - 3) + 1.

Start from y=log⁡2(x)y = \log_2(x):

  • Replace xx with x−3x - 3 → shifts the graph right by 3 units. Vertical asymptote moves from x=0x = 0 to x=3x = 3.

  • Add 11 → shifts the graph up by 1 unit.

Key points:

  • Original (1,0)(1, 0) moves to (4,1)(4, 1).

  • Original (2,1)(2, 1) moves to (5,2)(5, 2).

Domain: (3,∞)(3, \infty). Vertical asymptote: x=3x = 3.

Why Do Logarithmic Functions Matter? (The Real-World GROUND)

"Logarithms shorten the labours of the astronomer." — Pierre-Simon Laplace.

Logarithmic functions are not abstract — they describe how the natural world compresses and expands across enormous scales.

  • Richter scale (earthquakes). Magnitude is logarithmic — each step up represents 10× the seismic energy. log⁡\log turns enormous ranges into readable numbers.

  • Decibel scale (sound). Loudness in decibels is L=10log⁡10(I/I0)L = 10 \log_{10}(I/I_0) — a logarithmic compression of a 12-order-of-magnitude range of intensities into the 0–120 dB human range.

  • pH scale (acidity). pH=−log⁡10[H+]\text{pH} = -\log_{10}[H^+]. A change of 1 pH unit = 10× change in acidity.

  • Information theory. The information content of a message is −log⁡2(p)-\log_2(p) — measured in bits. Shannon's 1948 formulation defined the modern concept of information using logarithms.

  • Population growth (early phase). Exponential growth N(t)=N0ertN(t) = N_0 e^{rt} has its natural inverse — ln⁡(N/N0)/r=t\ln(N/N_0)/r = t — which tells you when a population reaches a target size.

The logarithmic function was invented in 1614 by John Napier specifically to make multiplication of large numbers easier — astronomers were spending months on hand calculations that could be reduced to addition by using log tables. Slide rules — used for engineering calculation through the 1970s — were physical implementations of logarithmic functions.

Learn more: Properties of Logarithms

A Worked Example — Wrong Path First

Solve log⁡2(x+1)=3\log_2(x + 1) = 3.

The intuitive (wrong) approach. A student takes the logarithm definition the wrong way — "so x+1=2⋅3=6x + 1 = 2 \cdot 3 = 6, giving x=5x = 5."

Why it fails. The student confused log⁡b(y)=k\log_b(y) = k with y=bky = bk. The correct relationship is y=bky = b^k — exponential, not linear.

The correct method. By definition: log⁡2(x+1)=3  ⟺  x+1=23=8\log_2(x + 1) = 3 \iff x + 1 = 2^3 = 8, so x=7x = 7.

Check. log⁡2(7+1)=log⁡2(8)=3\log_2(7 + 1) = \log_2(8) = 3 ✓.

What Are the Most Common Mistakes With Logarithmic Functions?

Mistake 1: Taking the log of a non-positive number

Where it slips in: Writing log⁡2(0)\log_2(0) or log⁡2(−5)\log_2(-5) as if they were defined.

Don't do this: log⁡2(0)=\log_2(0) = anything.

The correct way: log⁡b(x)\log_b(x) is undefined for x≤0x \le 0. The domain of every logarithmic function is (0,∞)(0, \infty).

Mistake 2: Confusing log⁡(x2)\log(x^2) with (log⁡x)2(\log x)^2

Where it slips in: Treating the two as equal because the notation looks similar.

Don't do this: log⁡2(x2)=(log⁡2x)2\log_2(x^2) = (\log_2 x)^2.

The correct way: log⁡2(x2)=2log⁡2(x)\log_2(x^2) = 2 \log_2(x) by the power rule. (log⁡2x)2=log⁡2(x)⋅log⁡2(x)(\log_2 x)^2 = \log_2(x) \cdot \log_2(x) — entirely different.

Mistake 3: Forgetting the asymptote

Where it slips in: Sketching the graph of log⁡b(x)\log_b(x) as crossing the y-axis.

Don't do this: Drawing the curve through (0,0)(0, 0).

The correct way: The y-axis is a vertical asymptote — the curve approaches it but never touches it. The graph passes through (1,0)(1, 0), not (0,0)(0, 0).

Key Takeaways

  • A logarithmic function f(x)=log⁡b(x)f(x) = \log_b(x) is the inverse of bxb^x — they're reflections of each other across y=xy = x.

  • Domain: (0,∞)(0, \infty); range: (−∞,∞)(-\infty, \infty); passes through (1,0)(1, 0).

  • Vertical asymptote at x=0x = 0 — the curve never crosses the y-axis.

  • Algebraic rules: product → sum, quotient → difference, exponent → coefficient.

  • The natural log ln⁡\ln is the unique log whose derivative is 1/x1/x — the default in calculus and physics.

A Practical Next Step

Try these three before moving on to exponential growth and decay.

  1. Compute log⁡5(125)\log_5(125).

  2. Solve log⁡2(x)=5\log_2(x) = 5 for xx.

  3. Sketch the graph of f(x)=ln⁡(x+2)f(x) = \ln(x + 2). What's the vertical asymptote?

If problem 3 felt tricky, ln⁡(x+2)\ln(x + 2) shifts the natural log graph left by 2 — vertical asymptote at x=−2x = -2. Want a Bhanzu trainer to walk through more logarithmic-function problems? Book a free demo class — online globally.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is a logarithmic function?
A function f(x)=log⁡b(x)f(x) = \log_b(x) that answers "what power do I raise bb to in order to get xx?" It's the inverse of the exponential function g(x)=bxg(x) = b^x.
What is the domain of a logarithmic function?
(0,∞)(0, \infty) — only positive inputs. The logarithm of zero or any negative number is undefined.
What is the range of a logarithmic function?
(−∞,∞)(-\infty, \infty) — all real numbers. A log function grows without bound (slowly) and falls to −∞-\infty as xx approaches zero.
What's the difference between log⁡\log and ln⁡\ln?
log⁡(x)\log(x) usually means base 10 (the common log). ln⁡(x)\ln(x) means base e≈2.71828e \approx 2.71828 (the natural log). Both follow the same algebraic rules; the choice of base depends on context (engineering often uses log⁡\log, calculus and pure math use ln⁡\ln).
How is the graph of log⁡b(x)\log_b(x) different from log⁡b(−x)\log_b(-x)?
log⁡b(−x)\log_b(-x) is defined only when −x>0-x > 0, i.e., when x<0x < 0. Its graph is the reflection of log⁡b(x)\log_b(x) across the y-axis — exists in the left half of the coordinate plane.
What's the derivative of log⁡b(x)\log_b(x)?
ddxlog⁡b(x)=1xln⁡(b)\dfrac{d}{dx} \log_b(x) = \dfrac{1}{x \ln(b)}. For the natural log (b=eb = e), this simplifies to 1/x1/x, which is why ln⁡\ln is the default in calculus.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →