Domain and Range of Logarithmic and Exponential Functions

Domain and range of exponential and logarithmic functions and their transformations, how the asymptote moves, and the domain of log of an expression.

Domain of Log Function: The One Rule That Changes Everything

The domain of a log function is not "all real numbers." That is the single most common mistake precalc students make, and it costs points on every exam. A logarithmic function f(x) = log_b(x) is defined only when its argument is strictly greater than zero. For the parent function f(x) = log_b(x), the domain is (0, ∞). Every shift and transformation you apply to the argument shifts that domain accordingly. If the argument is (x - h), the domain becomes (h, ∞). If the argument is a quadratic or rational expression, you must solve the inequality argument > 0 to find the domain.

Exponential a*b^x + k: Domain, Range and the Asymptote y = k

An exponential function of the form f(x) = a·b^x + k has a domain of all real numbers (−∞, ∞). There is no value of x that makes the function undefined, so you never need to solve an inequality for the domain.

The range depends entirely on the vertical shift k and the sign of a. For the parent function f(x) = b^x with b > 0 and b ≠ 1, the range is (0, ∞). Adding k shifts that range to (k, ∞) if a > 0, or to (−∞, k) if a < 0. The line y = k is the horizontal asymptote. The function never reaches y = k; it gets arbitrarily close as x → −∞ (for a > 0) or as x → ∞ (for a < 0).

The failure case: students keep writing the range as (0, ∞) even after a vertical shift. If f(x) = 3·2^x + 5, the range is (5, ∞), not (0, ∞). The horizontal asymptote is y = 5, not y = 0. Check the sign of a: if a is negative, the range flips below the asymptote. For f(x) = −2·3^x + 4, the range is (−∞, 4).

Log a*log_b(x - h) + k: Domain x > h, Range All Reals

For a logarithmic function f(x) = a·log_b(x - h) + k, the domain is found by setting the argument greater than zero: x - h > 0, so x > h. In interval notation, that is (h, ∞). The range of a logarithmic function is always all real numbers (−∞, ∞). No shift or stretch changes this. The range of exponential function is always restricted; the range of logarithmic function is always unrestricted.

Students frequently confuse the domain of the log with the domain of an exponential. The domain of log is restricted; the domain of the exponential is all reals. The range of the exponential is restricted; the range of the log is all reals. This swap is the direct result of the inverse relationship between the two families.

Domain of Log of a Quadratic or Rational Expression

Quadratic Arguments

When the argument of a logarithm is not a simple linear expression, you must solve the inequality argument > 0. For f(x) = log(x² − 5x + 6), the domain is all x such that x² − 5x + 6 > 0. Factor the quadratic: (x − 2)(x − 3) > 0. Use a sign chart to determine where the product is positive. The zeros are at x = 2 and x = 3. Test intervals: for x < 2, both factors are negative, product positive. For 2 < x < 3, one factor negative and one positive, product negative. For x > 3, both factors positive, product positive. The domain is (−∞, 2) ∪ (3, ∞).

The failure case: students write the domain as "x > 2 or x > 3" or combine the two intervals incorrectly. The correct interval notation requires the union symbol. A common error is to write (2, 3) instead of the union of two separate intervals.

Rational Arguments

For a rational argument, such as f(x) = log((x+1)/(x−2)), solve (x+1)/(x−2) > 0. The fraction is zero at x = −1 and undefined at x = 2. Build a sign chart with these two critical points. The expression is positive when x < −1 and when x > 2. The domain is (−∞, −1) ∪ (2, ∞).

Inverse Relationship: Domain and Range Swap

The exponential function f(x) = b^x and the logarithmic function g(x) = log_b(x) are inverses of each other. This means the domain of one is the range of the other. For f(x) = b^x, domain = (−∞, ∞) and range = (0, ∞). For g(x) = log_b(x), domain = (0, ∞) and range = (−∞, ∞).

When you shift either function, the swap applies to the shifted values. If f(x) = 2·3^x + 1 has range (1, ∞), then its inverse function g(x) = log_3((x−1)/2) has domain (1, ∞). The vertical shift of the exponential becomes the horizontal shift of the log. This relationship is the quickest way to check your work: if the domain of the log does not match the range of the exponential, you made an error.

Worked Examples: Domain and Range of Log and Exponential Functions

Example 1: Exponential with Vertical Shift

Find the domain and range of f(x) = 4·5^x − 3. Domain: all real numbers (−∞, ∞). The horizontal asymptote is y = −3. Since a = 4 > 0, the range is (−3, ∞).

Example 2: Logarithm with Horizontal Shift

Find the domain and range of f(x) = 2·log_3(x + 5). Set the argument x + 5 > 0, so x > −5. Domain: (−5, ∞). Range: all real numbers (−∞, ∞).

Example 3: Log of a Quadratic Using a Sign Chart

Find the domain of f(x) = log(x² − x − 12). Factor: (x − 4)(x + 3) > 0. Zeros at x = −3 and x = 4. Sign chart: test x = −4 gives (−7)(−1) = 7 > 0; test x = 0 gives (−4)(3) = −12 < 0; test x = 5 gives (1)(8) = 8 > 0. Domain: (−∞, −3) ∪ (4, ∞).

Example 4: Exponential with Negative Coefficient

Find the domain and range of f(x) = −5·2^x + 10. Domain: all real numbers (−∞, ∞). The horizontal asymptote is y = 10. Since a = −5 < 0, the range is (−∞, 10). The function approaches 10 from below as x → −∞.

Domain and Range Summary for Exponential and Logarithmic Families
Function FamilyDomainRangeAsymptote
Exponential a·b^x + k, a > 0All reals (−∞, ∞)(k, ∞)Horizontal: y = k
Exponential a·b^x + k, a < 0All reals (−∞, ∞)(−∞, k)Horizontal: y = k
Log a·log_b(x − h) + k(h, ∞)All reals (−∞, ∞)Vertical: x = h
Log of quadratic argumentSolve argument > 0 using sign chartAll reals (−∞, ∞)Vertical asymptotes at zeros

Who This Subject Suits and Who Should Skip

This material suits precalculus students who have already mastered function notation from OpenStax College Algebra 2e, Section 3.1. If you can evaluate a function at a given x-value without error, you are ready for domain and range of log and exponential functions. Teachers and tutors preparing lessons will find the sign chart method for log of a quadratic and the horizontal asymptote exponential range rules directly usable.

Anyone looking for calculus-level continuity analysis or epsilon-delta proofs should go to a calculus textbook or Paul's Online Math Notes. Students who cannot evaluate a function at a given x-value should first master function notation before attempting domain and range work. The single thing that most often goes wrong: students forget that the argument of a logarithm must be strictly greater than zero, not greater than or equal to zero. A zero argument is undefined.

Common Questions

What is the domain of ln(x)?

The domain of ln(x) is (0, ∞). The natural logarithm is defined only for positive arguments, just like any logarithm with base > 0 and ≠ 1.

Does the range of an exponential function always have a horizontal asymptote?

Yes. For f(x) = a·b^x + k, the horizontal asymptote is y = k. The function never reaches this line; it approaches it as x → −∞ if a > 0, or as x → ∞ if a < 0.

How do I find the domain of log(x² − 5x + 6)?

Set x² − 5x + 6 > 0. Factor to (x − 2)(x − 3) > 0. Use a sign chart: the product is positive for x < 2 and for x > 3. The domain is (−∞, 2) ∪ (3, ∞).

Why is the range of a logarithmic function all real numbers?

A logarithmic function is the inverse of an exponential function. Since the domain of an exponential is all real numbers, the range of its inverse (the log) is also all real numbers.

What happens to the domain of log(x) when I shift it horizontally?

For f(x) = log(x − h), the domain shifts to (h, ∞). The argument x − h must be greater than zero.