Graphs of Logarithmic Functions
By the end of this section, you will be able to:
- Identify the domain of a logarithmic function
- Graph logarithmic functions
In Graphs of Exponential Functions, we saw how creating a graphical representation of an exponential model gives us another layer of insight for predicting future events. How do logarithmic graphs give us insight into situations? Because every logarithmic function is the inverse function of an exponential function, we can think of every output on a logarithmic graph as the input for the corresponding inverse exponential equation. In other words, logarithms give the cause for an effect.
To illustrate, suppose we invest $2{,}500 in an account that offers an annual interest rate of , compounded continuously. We already know that the balance in our account for any year can be found with the equation .
But what if we wanted to know the year for any balance? We would need to create a corresponding new function by interchanging the input and the output; thus we would need to create a logarithmic model for this situation. By graphing the model, we can see the output (year) for any input (account balance). For instance, what if we wanted to know how many years it would take for our initial investment to double? The graph below shows this point on the logarithmic graph.
In this section we will discuss the values for which a logarithmic function is defined, and then turn our attention to graphing the family of logarithmic functions.
Finding the domain of a logarithmic function
Before working with graphs, we will take a look at the domain (the set of input values) for which the logarithmic function is defined.
Recall that the exponential function is defined as for any real number and constant , , where
- The domain of is .
- The range of is .
In Logarithmic Functions, we learned that the logarithmic function is the inverse of the exponential function . So, as inverse functions:
- The domain of is the range of : .
- The range of is the domain of : .
Transformations of the parent function behave similarly to those of other functions. Just as with other parent functions, we can apply the four types of transformations — shifts, stretches, compressions, and reflections.
In Graphs of Exponential Functions we saw that certain transformations can change the range of . Similarly, applying transformations to the parent function can change the domain. When finding the domain of a logarithmic function, therefore, it is important to remember that the domain consists only of positive real numbers. That is, the argument of the logarithmic function must be greater than zero.
For example, consider . This function is defined for any values of such that the argument, in this case , is greater than zero. To find the domain, we set up an inequality and solve for :
In interval notation, the domain of is .
How to: given a logarithmic function, identify the domain.
- Set up an inequality showing the argument greater than zero.
- Solve for .
- Write the domain in interval notation.
Example. What is the domain of ?
Solution. The logarithmic function is defined only when the input is positive, so this function is defined when . Solving this inequality,
The domain of is .
What is the domain of? Write your answer in interval notation.
Set the argumentgreater than zero and solve for.Example. What is the domain of ?
Solution. The logarithmic function is defined only when the input is positive, so this function is defined when . Solving this inequality,
The domain of is .
What is the domain of? Write your answer in interval notation.
Set the argumentgreater than zero and solve for.Graphing logarithmic functions
Now that we have a feel for the set of values for which a logarithmic function is defined, we move on to graphing logarithmic functions. The family of logarithmic functions includes the parent function along with all its transformations: shifts, stretches, compressions, and reflections.
We begin with the parent function . Because every logarithmic function of this form is the inverse of an exponential function with the form , their graphs will be reflections of each other across the line . To illustrate this, we can observe the relationship between the input and output values of and its equivalent in the table below.
Using the inputs and outputs from the table above, we can build another table to observe the relationship between points on the graphs of the inverse functions and .
As we’d expect, the - and -coordinates are reversed for the inverse functions. The graph below shows the graph of and .
Observe the following from the graph:
- has a -intercept at and has an -intercept at .
- The domain of , , is the same as the range of .
- The range of , , is the same as the domain of .
Characteristics of the graph of the parent function, . For any real number and constant , , we can see the following characteristics in the graph of :
- one-to-one function
- vertical asymptote:
- domain:
- range:
- -intercept: and key point
- -intercept: none
- increasing if
- decreasing if
See the panels below.
The graph below shows how changing the base in can affect the graphs. Observe that the graphs compress vertically as the value of the base increases. (Note: recall that the function has base .)
How to: given a logarithmic function with the form , graph the function.
- Draw and label the vertical asymptote, .
- Plot the -intercept, .
- Plot the key point .
- Draw a smooth curve through the points.
- State the domain, , the range, , and the vertical asymptote, .
Example. Graph . State the domain, range, and asymptote.
Solution. Before graphing, identify the behavior and key points for the graph.
- Since is greater than one, we know the function is increasing. The left tail of the graph will approach the vertical asymptote , and the right tail will increase slowly without bound.
- The -intercept is .
- The key point is on the graph.
- We draw and label the asymptote, plot and label the points, and draw a smooth curve through the points (see the graph below).
The domain is , the range is , and the vertical asymptote is .
Graph. What is the domain? Write your answer in interval notation.
Every logarithmic function, regardless of the base, has the same domain.Graphing transformations of logarithmic functions
As we mentioned in the beginning of the section, transformations of logarithmic graphs behave similarly to those of other parent functions. We can shift, stretch, compress, and reflect the parent function without loss of shape.
Graphing a horizontal shift of
When a constant is added to the input of the parent function , the result is a horizontal shift units in the opposite direction of the sign on . To visualize horizontal shifts, we can observe the general graph of the parent function for alongside the shift left, , and the shift right, . See the panels below, drawn with and .
Horizontal shifts of the parent function . For any constant , the function
- shifts the parent function left units if .
- shifts the parent function right units if .
- has the vertical asymptote .
- has domain .
- has range .
How to: given a logarithmic function with the form , graph the translation.
- Identify the horizontal shift:
- If , shift the graph of left units.
- If , shift the graph of right units.
- Draw the vertical asymptote .
- Identify three key points from the parent function. Find new coordinates for the shifted functions by subtracting from the coordinate.
- Label the three points.
- The domain is , the range is , and the vertical asymptote is .
Example. Sketch the horizontal shift alongside its parent function. Include the key points and asymptotes on the graph. State the domain, range, and asymptote.
Solution. Since the function is , we notice .
Thus , so . This means we will shift the function right 2 units.
The vertical asymptote is or .
Consider the three key points from the parent function, , , and .
The new coordinates are found by adding 2 to the coordinates.
Label the points , , and .
The domain is , the range is , and the vertical asymptote is .
Sketch a graph ofalongside its parent function. What is the vertical asymptote?
For, the vertical asymptote is.What is the domain of that same function,? Write your answer in interval notation.
The domain begins immediately to the right of the vertical asymptote.Graphing a vertical shift of
When a constant is added to the parent function , the result is a vertical shift units in the direction of the sign on . To visualize vertical shifts, we can observe the general graph of the parent function alongside the shift up, , and the shift down, . See the panels below, drawn with and .
Vertical shifts of the parent function . For any constant , the function
- shifts the parent function up units if .
- shifts the parent function down units if .
- has the vertical asymptote .
- has domain .
- has range .
How to: given a logarithmic function with the form , graph the translation.
- Identify the vertical shift:
- If , shift the graph of up units.
- If , shift the graph of down units.
- Draw the vertical asymptote .
- Identify three key points from the parent function. Find new coordinates for the shifted functions by adding to the coordinate.
- Label the three points.
- The domain is , the range is , and the vertical asymptote is .
Example. Sketch a graph of alongside its parent function. Include the key points and asymptote on the graph. State the domain, range, and asymptote.
Solution. Since the function is , we will notice . Thus .
This means we will shift the function down 2 units.
The vertical asymptote is .
Consider the three key points from the parent function, , , and .
The new coordinates are found by subtracting 2 from the coordinates.
Label the points , , and .
The domain is , the range is , and the vertical asymptote is .
Sketch a graph ofby plotting the points with,,,, and.
The points,,,, andShift the key points ofup 2 units:, so.What is the domain of? Write your answer in interval notation.
A vertical shift moves the graph up or down but never changes which inputs are allowed.Graphing stretches and compressions of
When the parent function is multiplied by a constant , the result is a vertical stretch or compression of the original graph. To visualize stretches and compressions, we set and observe the general graph of the parent function alongside the vertical stretch, , and the vertical compression, . See the panels below, drawn with and .
Vertical stretches and compressions of the parent function . For any constant , the function
- stretches the parent function vertically by a factor of if .
- compresses the parent function vertically by a factor of if .
- has the vertical asymptote .
- has the -intercept .
- has domain .
- has range .
How to: given a logarithmic function with the form , , graph the translation.
- Identify the vertical stretch or compression:
- If , the graph of is stretched by a factor of units.
- If , the graph of is compressed by a factor of units.
- Draw the vertical asymptote .
- Identify three key points from the parent function. Find new coordinates for the shifted functions by multiplying the coordinates by .
- Label the three points.
- The domain is , the range is , and the vertical asymptote is .
Example. Sketch a graph of alongside its parent function. Include the key points and asymptote on the graph. State the domain, range, and asymptote.
Solution. Since the function is , we will notice .
This means we will stretch the function by a factor of 2.
The vertical asymptote is .
Consider the three key points from the parent function, , , and .
The new coordinates are found by multiplying the coordinates by 2.
Label the points , , and .
The domain is , the range is , and the vertical asymptote is .
Sketch a graph ofalongside its parent function. Besides the x-intercept, the parent function has key point. What is the corresponding key point on the graph of? Enter your answer as an ordered pair.
A vertical compression bymultiplies every-coordinate of the parent function by.Example. Sketch a graph of . State the domain, range, and asymptote.
Solution. Remember: what happens inside parentheses happens first. First, we move the graph left 2 units, then stretch the function vertically by a factor of 5, as in the graph below. The vertical asymptote will be shifted to . The -intercept will be . The domain will be . Two points will help give the shape of the graph: and . We chose as the -coordinate of one point to graph because when , , the base of the common logarithm.
The domain is , the range is , and the vertical asymptote is .
Sketch a graph of the function. What is the vertical asymptote?
The horizontal shift alone determines the asymptote; the stretch and vertical shift do not move it.What is the domain of that same function,? Write your answer in interval notation.
The domain begins immediately to the right of the vertical asymptote.Graphing reflections of
When the parent function is multiplied by , the result is a reflection about the -axis. When the input is multiplied by , the result is a reflection about the -axis. To visualize reflections, we restrict , and observe the general graph of the parent function alongside the reflection about the -axis, , and the reflection about the -axis, . Both are drawn below with .
Reflections of the parent function . The function
- reflects the parent function about the -axis.
- has domain , range , and vertical asymptote , which are unchanged from the parent function.
The function
- reflects the parent function about the -axis.
- has domain .
- has range , and vertical asymptote , which are unchanged from the parent function.
How to: given a logarithmic function with the parent function , graph a reflection about the -axis.
- Draw the vertical asymptote, .
- Plot the -intercept, .
- Reflect the graph of the parent function about the -axis.
- Draw a smooth curve through the points.
- State the domain, , the range, , and the vertical asymptote .
How to: given a logarithmic function with the parent function , graph a reflection about the -axis.
- Draw the vertical asymptote, .
- Plot the -intercept, .
- Reflect the graph of the parent function about the -axis.
- Draw a smooth curve through the points.
- State the domain, , the range, , and the vertical asymptote .
Example. Sketch a graph of alongside its parent function. Include the key points and asymptote on the graph. State the domain, range, and asymptote.
Solution. Before graphing , identify the behavior and key points for the graph.
- Since is greater than one, we know that the parent function is increasing. Since the input value is multiplied by , is a reflection of the parent graph about the -axis. Thus, will be decreasing as moves from negative infinity to zero, and the right tail of the graph will approach the vertical asymptote .
- The -intercept is .
- We draw and label the asymptote, plot and label the points, and draw a smooth curve through the points.
The domain is , the range is , and the vertical asymptote is .
Graph. What is the domain? Write your answer in interval notation.
The input is multiplied by, so only negative inputs keep the argumentpositive.How to: given a logarithmic equation, use a graphing calculator to approximate solutions.
- Press [Y=]. Enter the given logarithm equation or equations as Y1= and, if needed, Y2=.
- Press [GRAPH] to observe the graphs of the curves and use [WINDOW] to find an appropriate view of the graphs, including their point(s) of intersection.
- To find the value of , we compute the point of intersection. Press [2ND] then [CALC]. Select “intersect” and press [ENTER] three times. The point of intersection gives the value of for the point(s) of intersection.
Example. Solve graphically. Round to the nearest thousandth.
Solution. Press [Y=] and enter next to Y1=. Then enter next to Y2=. For a window, use the values 0 to 5 for and to for . Press [GRAPH]. The graphs should intersect somewhere a little to right of .
For a better approximation, press [2ND] then [CALC]. Select [5: intersect] and press [ENTER] three times. The -coordinate of the point of intersection is displayed as 1.3385297. (Your answer may be different if you use a different window or use a different value for Guess?.) So, to the nearest thousandth, .
Solvegraphically. Round to the nearest thousandth.
Graphand, and find their point of intersection.Summarizing translations of the logarithmic function
Now that we have worked with each type of translation for the logarithmic function, we can summarize each in the table below to arrive at the general equation for translating logarithmic functions.
| Transformation | Form |
|---|---|
| Shift horizontally units to the left, vertically units up | |
| Stretch if ; compression if | |
| Reflect about the -axis | |
| Reflect about the -axis | |
| General equation for all translations |
Transformations of logarithmic functions. All transformations of the parent logarithmic function, , have the form
where the parent function, , , is
- shifted vertically up units.
- shifted horizontally to the left units.
- stretched vertically by a factor of if .
- compressed vertically by a factor of if .
- reflected about the -axis when .
For , the graph of the parent function is reflected about the -axis.
Example. What is the vertical asymptote of ?
Solution. The vertical asymptote is at .
Analysis. The coefficient, the base, and the upward translation do not affect the asymptote. The shift of the curve 4 units to the left shifts the vertical asymptote to .
What is the vertical asymptote of?
Only the horizontal shift — the number added to or subtracted frominside the logarithm — moves the asymptote.Example. Find a possible equation for the common logarithmic function graphed below.
Solution. This graph has a vertical asymptote at and has been vertically reflected. We do not know yet the vertical shift or the vertical stretch. We know so far that the equation will have form:
It appears the graph passes through the points and . Substituting ,
Next, substituting in ,
This gives us the equation .
Analysis. We can verify this answer by comparing the function values in the table below with the points on the graph above.
Give the equation of the natural logarithm graphed below.
Read the vertical asymptote to find the horizontal shift, then use a labeled point to solve for the vertical stretch.Q&A. Is it possible to tell the domain and range and describe the end behavior of a function just by looking at the graph?
Yes, if we know the function is a general logarithmic function. For example, look at the graph above. The graph approaches (or thereabouts) more and more closely, so is, or is very close to, the vertical asymptote. It approaches from the right, so the domain is all points to the right, . The range, as with all general logarithmic functions, is all real numbers. And we can see the end behavior because the graph goes down as it goes left and up as it goes right. The end behavior is that as , and as , .
Key equations
| General form for the translation of the parent logarithmic function |
|---|
Key concepts
- To find the domain of a logarithmic function, set up an inequality showing the argument greater than zero, and solve for .
- The graph of the parent function has an -intercept
at , domain , range , vertical
asymptote , and
- if , the function is increasing.
- if , the function is decreasing.
- The equation shifts the parent function
horizontally
- left units if .
- right units if .
- The equation shifts the parent function
vertically
- up units if .
- down units if .
- For any constant , the equation
- stretches the parent function vertically by a factor of if .
- compresses the parent function vertically by a factor of if .
- When the parent function is multiplied by , the result
is a reflection about the -axis. When the input is multiplied by
, the result is a reflection about the -axis.
- The equation represents a reflection of the parent function about the -axis.
- The equation represents a reflection of the parent function about the -axis.
- A graphing calculator may be used to approximate solutions to some logarithmic equations.
- All translations of the logarithmic function can be summarized by the general equation .
- Given an equation with the general form , we can identify the vertical asymptote for the transformation.
- Using the general equation , we can write the equation of a logarithmic function given its graph.
Practice
Identify the domain of a logarithmic function
Find the domain of. Write your answer in interval notation.
Set the argumentgreater than zero and solve for.Find the vertical asymptote of.
The vertical asymptote occurs where the argumentequals zero.Find the domain of. Write your answer in interval notation.
Set the argumentgreater than zero and solve for.Graph logarithmic functions
The five curves below all share the point and are labeled A through E.
Which labeled curve above is the graph of?
A smaller base makes the curve rise more steeply for; order the bases from smallest to largest.Which labeled curve above is the graph of?
A smaller base makes the curve rise more steeply for; order the bases from smallest to largest.Write a logarithmic equation, usingas the parent function, for the graph shown below.
Locate the vertical asymptote to find the horizontal shift, then check whether the curve opens toward increasing or decreasingto find any reflection.This section is adapted from Precalculus 2e, Section 4.4: Graphs of Logarithmic Functions by Jay Abramson and OpenStax, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: recreated every graph as an accessible spec-first SVG built from its exact equation — the investment logarithmic model with its labeled “balance reaches $5{,}000 near year 14” point; the / reflection pair about ; the two-panel parent-function characteristics schematic; the three-curve base-comparison graph , , and ; the worked example; the two-panel horizontal-shift, vertical-shift, stretch/compression, and reflection schematics (recreated with concrete representative values and , , or in place of the source’s symbolic point labels, since the figure engine draws real analytic curves rather than schematic ones); the horizontal-shift, vertical-shift, stretch, and combined shift-and-stretch worked examples; the reflection-about-the--axis panel and the worked example, both of which need on their reflected branch — outside the analytic log primitive’s domain — and so are rendered as a dense reflected log curve primitive (added to graph-core.mjs in this pass, which previously could only open rightward from a vertical asymptote); the vertical-asymptote and equation-from-a-graph worked examples; and the five-curve base-comparison figure and the equation-from-a-graph item used in the closing Practice block. Converted the two-column “graph a reflection” How To table into two separate How To callouts, one per reflection axis, matching this book’s callout convention. Presented the four data tables (the / correspondence, the / ordered-pair correspondence, and the two-part function-value check table, the latter combined into a single ten-column table since its source split was only print pagination) as Markdown tables. Omitted the “Access these online resources” media links. Omitted the corequisite-skills “Objective 1”/“Objective 2” review appendix that precedes this section’s actual content in the pinned CNXML module, since it does not appear in the printed textbook (confirmed against the source PDF) and duplicates material this section itself develops. Converted the ten retained “Try It” checks into interactive fill-ins with instant feedback, several split into a domain question and a vertical-asymptote or key-point question when the original asked for multiple facts at once; every exponential and logarithmic curve in this section is graded through a static figure plus a fill-in or multiple-choice question, except the vertical-shift Try It , which is additionally graded as a plot-the-points graph exercise at five named inputs ( through , whose outputs land on a half-unit grid) — the plotted points are graded, never the curve through them. And adapted five selected end-of-section exercises — two domain evaluations, one vertical-asymptote evaluation, a graph-matching pair converted to graph-mode multiple choice, and one equation-from-a-graph item — into interactive components in a closing Practice block, one group per objective.