Graphing Logarithmic Functions
Learn to graph logarithmic functions: key points, domain, range, the vertical asymptote, the mirror image of the exponential function and shifts.
Definition
- because
- because
- because
- Domain: (you can only take the logarithm of a positive number)
- Range: all real numbers
- Vertical asymptote: the line (the -axis); the graph gets closer and closer to it but never touches it
- -intercept**: ; there is no -intercept
- If , the graph increases; if , it decreases
- shifts the graph units right (left if ) and units up (down if )
- vertical asymptote , domain , key points and
- reflects the graph across the -axis; reflects it across the -axis (domain )
Try it now
Worked Examples
Graph and state its domain, range and asymptote.
Choose x-values that are powers of 2
, because of a power of 2 is easy to find → Six easy x-values
Find each y-value
, , , , , →
Plot the points and draw the asymptote
Plot , , , , , and draw the dashed line → Points and asymptote
Connect with a smooth curve
The curve falls steeply near the -axis without touching it and rises slowly to the right → Increasing curve through
Answer: Domain , range all real numbers, vertical asymptote , -intercept .
Common Mistakes
Shifting three units to the left
Why it's wrong: The minus sign looks like a move to the left, but the argument must be positive, which means : the whole graph lies to the right of .
Correct: moves the graph units to the right. has the asymptote .
Letting the graph touch or cross the -axis
Why it's wrong: and of a negative number do not exist, because is always positive.
Correct: The graph of comes closer and closer to but never reaches it. The domain is .
Thinking the graph levels off at some height
Why it's wrong: The curve rises slowly, so it looks flat, but it never stops rising: and .
Correct: A logarithmic graph has no horizontal asymptote. The range is all real numbers.
Keeping the domain after a horizontal shift
Why it's wrong: The domain comes from the argument, not from itself.
Correct: For the argument must be positive, so the domain is .
Interactive Visual
Function graph
Tap or hover over the graph to read off values.
Table of values
| x | 0.5 | 1 | 2 | 4 | 8 |
|---|---|---|---|---|---|
| y | -1 | 0 | 1 | 2 | 3 |
Function graph
Tap or hover over the graph to read off values.
Tap a name to show or hide its graph.
y = xAsymptoteFunction graph
Tap or hover over the graph to read off values.
Tap a name to show or hide its graph.
AsymptoteTable of values
| x | 0.25 | 0.5 | 1 | 2 | 4 | 8 |
|---|---|---|---|---|---|---|
| log_2(x) | -2 | -1 | 0 | 1 | 2 | 3 |
| log_0.5(x) | 2 | 1 | 0 | -1 | -2 | -3 |
Interactive Sandbox
Interactive Grapher
Tap or hover over the graph to read off values.
Try these examples:
y = log_2(x)
Expression Calculator
Try these:
History
No calculations yet
Practice Problems
18 problemsWhat is the domain of ?
Why It Matters
- Sound: a sound level meter shows decibels; multiplying the intensity by adds only dB, which is why the curve is so flat.
- Chemistry: is a reflected log graph: more hydrogen ions give a smaller pH.
- Computer science: binary search needs about steps for items; doubling the list adds only one step.
- Earthquakes: the Richter scale grows by every time the amplitude is multiplied by .
Real World Applications
Sound Level in Decibels
A sound level meter shows $L = 10 \log\left(\frac{I}{I_0}\right)$ decibels, where $\frac{I}{I_0}$ tells how many times stronger the sound is than the quietest sound we can hear. The graph is a stretched log curve: very flat for large intensities.
Example:
A sound times stronger than gives dB. A sound times stronger again gives only dB.
A quiet library is times stronger than the quietest audible sound, so .
What is the sound level in decibels?
Step 1: Write the mathematical expression
Calculate :
Binary Search in Computer Science
Binary search finds a name in a sorted list by halving the list again and again. For $n$ names it needs about $\log_2 n$ halvings, so the graph of the number of steps is the graph of $y = \log_2 x$.
Example:
A list of names needs halvings: .
A sorted contact list has names. Each step of binary search halves the list.
How many halvings are needed to get down to one name?
Step 1: Write the mathematical expression
Calculate :
The pH Scale in Chemistry
Acidity is measured with $\text{pH} = -\log[H^+]$, where $[H^+]$ is the hydrogen ion concentration. The minus sign reflects the log graph across the $x$-axis, so the pH goes down when the concentration goes up.
Example:
Lemon juice has , so .
A sample of rainwater has .
What is its pH?
Step 1: Write the mathematical expression
Calculate :
Key Takeaways
- 1 is the inverse of : its graph is the reflection of across the line
- 2Key points of : , and
- 3Domain , range all real numbers, vertical asymptote , no -intercept
- 4For the graph increases; for it decreases
- 5 moves the graph right and up: asymptote , domain
- 6A minus sign in front of the log reflects the graph across the -axis; reflects it across the -axis
Frequently Asked Questions
Glossary
- Logarithmic function
- A function with , ; it gives the exponent to which must be raised to get
- Vertical asymptote
- A vertical line that the graph gets closer and closer to without touching it; for it is
- Domain
- All x-values for which the function is defined; for it is
- Range
- All y-values the function takes; for every logarithmic function it is all real numbers
- Inverse function
- A function that undoes another one; its graph is the reflection across , as is for
- Key points
- Easy points to plot: , and for
Formula Card
Parent function
Base $b > 0$, $b \neq 1$; domain $x > 0$, range all real numbers
Key points
Plot these three points first
Transformed function
Asymptote $x = h$, domain $x > h$, key points $(1 + h, k)$ and $(b + h, 1 + k)$
Reflections
Across the $x$-axis and across the $y$-axis (domain $x < 0$)
Inverse of the exponential
Reflection across the line $y = x$