Logarithmic Functions: Properties, Domain and Transformations

A logarithmic function f(x) = logb x is the inverse of the exponential function bx, with the domain x > 0, range all real numbers and a vertical asymptote at x = 0. In brief: the graph of y = log2 x passes through (1, 0) and (2, 1), rises slowly and never touches the y-axis. For b > 1 the function is increasing, and for 0 < b < 1 it is decreasing. Transformations shift the asymptote: y = log2(x − 3) + 1 has the asymptote x = 3 and the domain x > 3.

Logarithmic functions describe processes where each multiplication of the input adds a constant to the output. They are the key to scales such as decibels and the Richter scale, and their graphs show very slow growth. This guide describes the properties of y = logb x, its graph with a figure, how to find the domain of more complex logarithmic functions, how transformations act and a value table.

What are the properties of y = logb x?

The relationship with the exponential function follows the general rule on inverse functions: the graph of logb x is the reflection of the graph of bx in the line y = x.

2xlog₂ xy = x

What does the graph look like?

Graph of y equals log base 2 of x passing through the points (1, 0), (2, 1) and (4, 2) with the y axis as asymptote (1, 0) (2, 1) y = log₂ x
Sketch of y = log₂ x. The curve rises steeply near the y-axis (the vertical asymptote), crosses the x-axis at x = 1 and then flattens. The scale is 60 pixels per unit in x and 30 pixels per unit in y.

As x → 0+, logb x → −∞ (for b > 1). As x → ∞, logb x → ∞, but extremely slowly: log2 1,000,000 ≈ 20, and log10 10100 = 100.

How do you find the domain?

Require the argument of the logarithm to be positive. For several logarithms, all conditions must hold at the same time.

How do transformations change the graph?

For g(x) = a logb(x − h) + k:

Example 1: g(x) = log2(x − 3) + 1

The asymptote is x = 3 and the domain is x > 3. The point (1, 0) on log2 x moves to (4, 1), and (2, 1) moves to (5, 2). The zero: log2(x − 3) = −1, so x − 3 = 1/2 and x = 3.5. There is no y-intercept, since x = 0 is outside the domain.

(4, 1)(5, 2)(3.5, 0)x = 3

Example 2: h(x) = −2 ln(x + 1)

The asymptote is x = −1, the domain is x > −1. The graph is stretched by 2 and reflected: it falls for x > −1. The zero is at x = 0 (ln 1 = 0), so the y-intercept is (0, 0). At x = e − 1 ≈ 1.718: h = −2.

Example 3: finding a formula from a graph

A graph of f(x) = logb x passes through (9, 2). Then b2 = 9, so b = 3. The function is f(x) = log3 x. Check: f(27) = 3.

Value table for log2 x

Values of y = log₂ x and y = log₁/₂ x for powers of 2
x 1/8 1/4 1/2 1 2
log2 x−3−2−101
log1/2 x3210−1
Further values of y = log₂ x
x 8 16 32 64 1024
log2 x345610

Each doubling of x adds exactly 1 to the output, which is the characteristic property of the logarithmic function.

Worked examples

Example 4: earthquakes

The Richter magnitude M is a logarithm of the amplitude A of the seismic wave: M = log10 A + constant. A magnitude 7 earthquake has 10 times the amplitude of a magnitude 6 earthquake, and 100 times the amplitude of a magnitude 5. The energy increases by a factor of about 31.6 per magnitude unit.

Example 5: inverse function

Find the inverse of f(x) = 2 log3(x − 1) + 4. Swap and solve: x = 2 log3(y − 1) + 4, so log3(y − 1) = (x − 4)/2, y − 1 = 3(x−4)/2, y = 3(x−4)/2 + 1. The domain of the inverse is all reals, and the range is y > 1, the domain of f.

Where does the function come from?

The logarithmic function was recognised as a function after the area under the hyperbola y = 1/x was shown to have logarithmic properties by Gregoire de Saint-Vincent and Alphonse de Sarasa in the 1640s. Euler, in the eighteenth century, defined the logarithm as the inverse of the exponential function and introduced the natural logarithm as a central function.

Where is it used today?

Logarithmic scales are used for sound (decibels), earthquakes, star brightness and acidity. In computer science, the logarithm describes the depth of balanced trees and the efficiency of binary search. In psychology, the Weber–Fechner law says that the perceived intensity of a stimulus is approximately proportional to the logarithm of its physical intensity.

Which mistakes are common?

Allowing zero or negative arguments

The domain is x > 0 only. For ln(x − 2), the domain is x > 2.

Thinking the graph crosses the y-axis

The y-axis is an asymptote. The graph never meets it.

Forgetting the direction for 0 < b < 1

Then the function decreases, so inequalities reverse.

Shifting the asymptote with the vertical shift

The vertical asymptote moves with the horizontal shift h, not with k.