The graph of a logarithmic function such as y = logb(x) is a curve defined only for positive x, with a vertical asymptote at x = 0 and a crossing at (1, 0). When the base b is greater than 1, the curve rises from left to right; the exact curve depends on the base and any transformations.
What does log x mean?
A logarithm answers the question: what power must a base be raised to in order to produce a given number? In the function y = logb(x), the base b must be positive and not equal to 1. The logarithm is equivalent to the exponential statement by = x. For example, log2(8) = 3 because 23 = 8.
The notation log x does not always specify its base. In many school settings, log x means the common logarithm, log10(x); in other mathematical contexts, log may mean the natural logarithm, ln(x), which has base e, approximately 2.718. If a graphing question does not state the convention, check the textbook, calculator mode, or surrounding material. The shape is logarithmic either way, but its steepness and plotted values differ.
How to sketch the basic graph
To sketch y = logb(x) for a base greater than 1, start with a few inputs whose logarithms are easy to calculate. Since logb(bn) = n, convenient inputs are powers of the base. For base 2, the points include (1/2, −1), (1, 0), (2, 1), (4, 2), and (8, 3).
- Draw a dashed vertical line at x = 0. It is an asymptote: the curve gets closer to it but does not touch or cross it.
- Plot (1, 0), because the only exponent that gives 1 for a valid base is 0.
- Plot one or more points using powers of the base, such as (b, 1) and (b2, 2).
- Add a point below the horizontal axis, such as (1/b, −1), and draw a smooth curve through the points.
For a base greater than 1, the curve continues downward as x approaches zero from the positive side and rises slowly as x grows. It does not meet the vertical axis, because the function is not defined at x = 0.
Domain, range, intercepts, and asymptote
The domain of the basic logarithm is x > 0. This follows from the inverse relationship with an exponential function: a positive base raised to any real power always produces a positive result, never zero or a negative number. Consequently, logb(0) and logb(−3), for example, are not real numbers.
The range is all real numbers. A logarithm can equal any real value because the corresponding exponential output is positive: for any real y, the input x = by is in the domain. The graph has an x-intercept at (1, 0), but no y-intercept. A y-intercept would require evaluating the function at x = 0, which is outside the domain. The line x = 0 is a vertical asymptote, not an intercept.
For a base greater than 1, the logarithm tends toward negative infinity as x approaches zero from the right, and toward positive infinity as x grows without bound. These limits explain why the curve extends indefinitely in both directions while remaining on the right side of the vertical axis.
How the base changes the curve
For every allowed base greater than 1, the graph has the same domain, range, asymptote, and intercept. The base changes how quickly the curve rises. A larger base gives a flatter curve over the same positive inputs; for instance, log10(10) = 1, while log2(10) is greater than 3. The exact comparison is clearest by remembering that each logarithm measures the exponent in its own base.
A base between 0 and 1 produces a decreasing curve instead. For example, y = log1/2(x) falls as x increases: its points include (1/2, 1), (1, 0), and (2, −1). The domain remains positive x, the range remains all real numbers, and the vertical asymptote is still x = 0. A logarithm with base 1 is excluded because 1 raised to any power is always 1, so it cannot define an inverse for a range of positive inputs.
Translations, stretches, and reflections
A transformed logarithmic graph can be written as y = a logb(x − h) + k, where a is nonzero. The value of h shifts the graph horizontally, and k shifts it vertically. Its vertical asymptote moves from x = 0 to x = h, and its domain becomes x > h. The range remains all real numbers.
- In log2(x − 3) + 1, the graph shifts right 3 units and up 1. Its asymptote is x = 3 and its domain is x > 3.
- In −log2(x), the negative multiplier reflects the basic curve across the x-axis, making an increasing graph decrease.
- A multiplier with absolute value greater than 1 stretches the graph vertically; a nonzero multiplier with absolute value below 1 compresses it vertically.
For transformations, use the logarithm’s argument to find the domain. The expression inside the logarithm must be positive. For example, in y = log2(5 − x), require 5 − x > 0, so the domain is x < 5 and the asymptote is x = 5. This graph runs to the left of its asymptote rather than to the right.
Worked examples and useful points
For y = log10(x), familiar powers of 10 give (0.01, −2), (0.1, −1), (1, 0), (10, 1), and (100, 2). The curve increases, but its rise is gradual: increasing the input by a factor of 10 increases the output by 1. This multiplicative-to-additive relationship is one reason logarithmic scales are useful for data spanning very large ranges.
For y = ln(x), the base is e. Its notable points include (1, 0) and (e, 1); the general domain, range, asymptote, and increasing direction are the same as for any base greater than 1. To plot a logarithm with a calculator, enter the chosen function with parentheses around its input, then set a window containing only positive inputs. A window that includes zero can still display the asymptote area, but the curve itself must not be plotted at zero or at negative values.
How logarithmic graphs compare with exponential graphs
The graph of y = logb(x) is the inverse of y = bx. Inverse functions swap their input and output coordinates, so their graphs are reflections of each other across the line y = x. The exponential graph has domain all real numbers and range positive values; the logarithmic graph has domain positive values and range all real numbers. The exponential graph’s horizontal asymptote y = 0 corresponds to the logarithm’s vertical asymptote x = 0.
Unlike a straight line, a logarithmic graph does not increase by a fixed amount when x increases by a fixed amount. Instead, for a fixed base, multiplying x by that base adds 1 to the logarithm: logb(bx) = logb(x) + 1. This distinction helps explain its slow growth and why the graph bends rather than following a constant slope.
Common graphing mistakes
- Allowing zero or negative inputs: The basic real logarithm is defined only for positive inputs. When the argument is more complicated, solve the inequality that makes the entire argument positive.
- Putting the asymptote in the wrong place: A horizontal shift changes the argument. For log(x + 4), the asymptote is x = −4, not x = 4.
- Confusing the intercepts: The point (1, 0) is the basic graph’s x-intercept. It does not have a y-intercept.
- Assuming every logarithm increases: This is true when the base exceeds 1. A base between 0 and 1 gives a decreasing graph.
- Assuming log always means base 10: The convention can depend on the subject. Identify whether the intended function is common logarithm or natural logarithm before calculating points.
Frequently Asked Questions
What is the domain of log x? For a basic real logarithm, the domain is x > 0. If the logarithm contains an expression, that whole expression must be greater than zero.
Where does the log x graph cross the x-axis? The basic graph crosses at (1, 0), because logb(1) = 0 for every valid base. A transformed graph may have a different intercept.
Does the log x graph have a y-intercept? No. A y-intercept would require x = 0, where the basic logarithm is undefined. The y-axis is its vertical asymptote.
Is log x the same as ln x? Not necessarily. ln x always means logarithm base e. The base of log x varies by convention, commonly 10 in school settings and sometimes e in higher mathematics.
Why does a logarithmic graph rise slowly? A fixed increase in the logarithm corresponds to multiplying the input by a fixed factor, not adding a fixed amount. The curve therefore keeps increasing for a base greater than 1, but its slope decreases as x grows.
Related
- Python String Reverse: Methods and Examples
- Split String in JavaScript: Methods, Limits, and Examples
- How to Split in Onshape: Parts, Faces, and Sketches
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Chart Area and Plot Area in Excel: What’s the Difference?In Excel, the chart area is the entire chart object, while the plot area is the region inside…
- How to Hide Zeros in an Excel Pivot Chart ProperlyIn Excel for Microsoft 365 on Windows, the right way to hide zeros in a PivotChart depends on…
- Excel Pivot Table Filter: Count Greater Than a ValueTo show only PivotTable items whose count exceeds a number, apply a value filter: open the dropdown for…
- Resource Gantt Chart Excel Template: Build and Use ItA resource Gantt chart Excel template combines a list of assignments with a date-based timeline, so you can…
- Gantt Chart Template: Word or Excel for Your Project?Choose an Excel Gantt chart template if your schedule will change, needs date-based bars, or must track progress;…
- Best Free Excel Gantt Chart Templates: 5 PicksFor most people, Vertex42’s Gantt Chart Template is the best free Excel Gantt chart template: it gives you…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.