The range of the basic real logarithmic function f(x) = logb(x) is all real numbers, or (−∞, ∞), provided the base satisfies b > 0 and b ≠ 1. For a logarithm whose input is another expression, the range depends on which positive values that expression can take.
What the range of a logarithm means
A function’s range is the set of all output values it produces. In y = logb(x), the logarithm asks: “To what power must b be raised to get x?” For example, log2(8) = 3, because 23 = 8. As the input x runs through every positive real number, the output can be any real number.
That conclusion follows from the equivalent exponential equation by = x. For every real number y, the value by is positive, so it is a valid input to the logarithm. Conversely, every positive x has a real logarithm. Thus the basic logarithm has domain (0, ∞) and range (−∞, ∞).
This answer assumes a real-valued logarithm. In real algebra, a logarithm’s base must be positive and cannot equal 1, and its argument must be positive. Complex logarithms use different conventions and are not the subject of this range rule.
Why the basic logarithmic function has every real output
Consider f(x) = log10(x). Its graph passes through (1, 0), because 10 raised to the zero power is 1. It passes through (10, 1) and (0.1, −1) as well. Inputs between zero and one give negative outputs; inputs greater than one give positive outputs. As the input approaches zero from the right, the output decreases without bound. As the input grows without bound, the output does too.
The same full range holds for any valid base. If b > 1, the function increases: larger positive inputs produce larger outputs. If 0 < b < 1, it decreases. For instance, log1/2(2) = −1, since (1/2)−1 = 2. The direction changes, but the outputs still cover every real number.
Domain and range are different
A common source of mistakes is mixing up a logarithm’s domain with its range. For f(x) = log3(x), the input must satisfy x > 0, so the domain is positive real numbers. The output, however, may be negative, zero, or positive, so the range is all real numbers. A logarithm can have a negative output; its argument, not its output, is what must be positive.
For a function such as f(x) = log3(2x − 4), first require the argument to be positive: 2x − 4 > 0, which gives x > 2. That is the domain. As x runs over this domain, 2x − 4 runs over all positive values, so the range remains all real numbers. The graph has a vertical asymptote at x = 2, but it still extends upward and downward without bound.
In general, for f(x) = logb(g(x)), the domain consists of the allowed inputs for which g(x) > 0. To find the range, determine the set of positive values that g(x) actually attains on that domain, then apply the logarithm to those values. A restricted domain or a limited set of values for g(x) can make the range smaller than all real numbers.
How transformations affect the range
For the common transformed function f(x) = a logb(x − h) + k, the range is still all real numbers when a ≠ 0 and the natural domain x > h is used. The horizontal shift h changes where the graph begins on the x-axis and moves its vertical asymptote to x = h. The vertical shift k moves the graph up or down, while a nonzero multiplier a stretches, compresses, or reflects it. None of these changes removes any real output: before the vertical changes, the logarithm already takes every real value.
For example, f(x) = −2 log5(x − 1) + 7 has domain x > 1 and range (−∞, ∞). The negative multiplier reflects the graph vertically and the factor 2 stretches it; adding 7 shifts outputs. Since the original logarithm can be arbitrarily large or small, these changes still produce all real outputs.
There is an important exception when the logarithmic term is multiplied by zero. The function f(x) = 0 · logb(x − h) + k is the constant k wherever it is defined, so its range is the single value {k}. Also, a function may be restricted to only part of its natural domain; in that case, do not assume the usual full range.
Finding the range when the log argument is restricted
When the argument is not a simple linear expression, it helps to separate the problem into two stages. First find all values g(x) can take while remaining positive. Then use the fact that a logarithm with base greater than 1 preserves order, while a logarithm with a base between 0 and 1 reverses order. Endpoint inclusion matters: if the argument reaches a positive minimum, the corresponding logarithm value is included; if it only approaches zero, the outputs may extend toward infinity without attaining an endpoint.
- For
f(x) = log2(x2 + 1), the argument is at least 1, reaching 1 whenx = 0. Its values are therefore[1, ∞), and the range is[0, ∞). - For
f(x) = log2(1 − x2), the domain is−1 < x < 1. The argument takes values in(0, 1], so the range is(−∞, 0]. Zero is included atx = 0; the function has no finite lower bound near either domain endpoint. - For
f(x) = log2(x2), the domain excludesx = 0. Althoughx2never equals zero there, it can be any positive value, so the range is still all real numbers.
These examples show why seeing a logarithm does not by itself settle the range. The key is whether the expression inside the logarithm can attain every positive value, only values above a positive threshold, or some other restricted set.
A practical method for solving range questions
A reliable approach is to identify the domain and the possible logarithm inputs before trying to read the answer from a graph. Use these steps:
- Write the expression inside the logarithm as
g(x), and imposeg(x) > 0to find the real domain. - On that domain, determine the exact set of values attained by
g(x). Use algebra, inequalities, or the graph ofg, and check whether any endpoints are attained. - Apply
logbto that set. Forb > 1it preserves order; for0 < b < 1it reverses order. - Account for any outside transformations, such as multiplying by a constant or adding a constant, and include or exclude endpoints accordingly.
- Check the result against sample inputs and the graph’s end behavior, if a graph is available.
An alternative is to set y = logb(g(x)) and ask which real values of y are possible. Exponentiating gives by = g(x). Since by is positive, this method can make the range question easier to express as an equation or inequality involving x. It is especially useful when the argument is a rational or polynomial expression, though the domain and endpoint checks still matter.
Common range mistakes
Several tempting shortcuts lead to incorrect answers. Avoid these frequent errors:
- Calling the domain the range: the condition that the argument be positive restricts inputs. It does not mean the outputs must be positive.
- Assuming every logarithmic expression has range all real numbers: this is true for a basic log and many transformed versions, but not for every composite expression. For example,
log2(x2 + 1)cannot be negative. - Including an unattained endpoint: if an argument approaches zero but never reaches it, the logarithm may approach negative infinity, but it does not take a finite value at that boundary. The endpoint is not part of the range.
- Thinking a negative log output is invalid:
log10(0.01) = −2is valid. It means10−2 = 0.01. - Ignoring the base: a base between 0 and 1 reverses inequalities when the logarithm is applied. The full range of a basic logarithm is unchanged, but interval endpoints can switch order.
Graph features that help confirm the range
A graph is a useful check, but it should support rather than replace the algebra. The vertical asymptote marks a boundary of the domain, not automatically a boundary of the range. For logb(x − h), the asymptote is x = h; in the standard unrestricted form, the curve still extends through every possible y-value.
For composite functions, look at how the argument behaves near its minimum, maximum, and boundary values. In log2(x2 + 1), the argument has a minimum of 1, so the graph has a minimum output of 0. In log2(1 − x2), the argument approaches zero near the ends of its domain, and the graph falls without bound. A graphing window can hide distant behavior, so apparent endpoints on a screen are not proof that an endpoint belongs to the range.
Frequently Asked Questions
Is the range of every log function all real numbers?
No. A basic function logb(x) has range all real numbers, as does a logb(x − h) + k when a ≠ 0 on its natural domain. A restricted argument can limit the range; for example, log2(x2 + 1) has range [0, ∞).
Can a logarithmic function have a negative range?
Yes. Logarithms often produce negative outputs when their arguments fall between 0 and 1. For example, log2(1/4) = −2. A range can also consist entirely of nonpositive values, as in log2(1 − x2) on its real domain.
Does shifting a log graph change its range?
A horizontal shift changes the domain boundary and asymptote, but not the range of the basic logarithmic graph. A vertical shift changes output values by the same amount, yet the full real range remains all real numbers. A nonzero vertical scale also keeps that full range.
How do I find the range of log of a quadratic?
First find where the quadratic inside the logarithm is positive. Then determine the interval of positive values it attains on that domain and take the logarithm of those values. For example, x2 + 1 attains every value from 1 upward, so its base-2 logarithm ranges from 0 upward.
Why is zero sometimes included in the range?
A logarithm equals zero exactly when its argument equals 1, because every valid base raised to zero is 1. Zero belongs to the range if the inside expression actually equals 1 for some allowed input. If it only approaches 1 without reaching it, zero is not included.
Related
- Google Sheets SPLIT Function: How to Separate Text
- Oracle Split String Example: SQL Methods That Work
- Balance of Payments: How It Works
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- SUMIF Excel Sample Data: Examples That WorkFor a basic SUMIF Excel sample, put item names in A2:A6 and amounts in B2:B6; to total Apples,…
- Excel Formula for Number of Years From a Date, ExplainedTo calculate completed years from a date in Excel, use =DATEDIF(A2,TODAY(),"Y"), where A2 contains the starting date. For…
- Split Lung Function Test: How It Measures Each LungA split lung function test estimates how much each lung contributes to breathing, rather than measuring the lungs…
- Capitalize Names in Excel: Formulas and MethodsTo capitalize names in an Excel column, enter =PROPER(A2) in the next column, replacing A2 with the first…
- Excel TODAY Formula: Show Today’s Date AutomaticallyTo show today’s date in an Excel cell and have it update, enter =TODAY(). The function returns the…
- SAP HANA String Functions: Syntax and ExamplesSAP HANA string functions manipulate text in SQL: they join strings, extract parts, find characters, change case, remove…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.