Logarithmic Functions
The inverse of exponentials—solving for exponents
You have already learned how to work with exponents. You know that $2^3 = 8$ and that $10^2 = 100$. But here is a question that might trip you up at first: if $2^? = 8$, what goes in place of the question mark? Of course, you know the answer is 3. But how would you write that question mathematically? How do you ask, “What exponent do I need?”
That is exactly what logarithms do. A logarithm is simply a way of asking: “What power do I need to raise this base to in order to get that number?” When you write $\log_2 8$, you are asking, “What exponent do I put on 2 to get 8?” The answer is 3, so $\log_2 8 = 3$.
If you think about it, you already know how to answer logarithm questions. Every time you have worked backward from an exponential expression to figure out the exponent, you have been doing logarithms in your head. Now we are just giving that process a name and a notation.
Core Concepts
Logarithms as Inverses of Exponentials
The key insight is that logarithms and exponentials are inverse operations, just like addition and subtraction, or multiplication and division. If exponentials answer the question “What do I get when I raise this base to this power?”, then logarithms answer the reverse question: “What power do I need?”
$$\text{Exponential: } 2^3 = 8$$ $$\text{Logarithm: } \log_2 8 = 3$$
These two statements say the exact same thing, just from different perspectives. The exponential tells you the result of raising 2 to the 3rd power. The logarithm tells you what power of 2 gives you 8.
The Definition
Here is the formal definition, though it is really just restating what we have already said:
$$\log_b x = y \quad \text{means} \quad b^y = x$$
In words: “The logarithm base $b$ of $x$ equals $y$” means “$b$ raised to the power $y$ equals $x$.”
The number $b$ is called the base (the same base concept from exponents). The number $x$ is called the argument of the logarithm. And $y$ is the answer: the exponent you need.
There are two important restrictions:
- The base $b$ must be positive and not equal to 1 (so $b > 0$ and $b \neq 1$)
- The argument $x$ must be positive (so $x > 0$)
Why these restrictions? Think about it: you cannot raise any positive number to any real power and get a negative result or zero. And if the base were 1, then $1^y = 1$ for any $y$, so the logarithm would not give a unique answer.
Common Log and Natural Log
Two bases are used so frequently that they have their own special notation:
Common logarithm (base 10): When you see $\log x$ with no base written, it means base 10: $$\log x = \log_{10} x$$
This is called the “common log” because our number system is base 10. When you ask, “How many digits does this number have?”, you are essentially asking for its common logarithm.
Natural logarithm (base $e$): When you see $\ln x$, it means base $e$ (where $e \approx 2.71828…$): $$\ln x = \log_e x$$
The number $e$ is a special mathematical constant that appears naturally in growth and decay problems, calculus, and many areas of science. The natural logarithm is fundamental to higher mathematics, which is why it gets its own notation.
Evaluating Logarithms
To evaluate a logarithm, ask yourself: “What exponent on the base gives me the argument?”
For $\log_3 81$: “What power of 3 gives 81?”
- $3^1 = 3$
- $3^2 = 9$
- $3^3 = 27$
- $3^4 = 81$
So $\log_3 81 = 4$.
For $\log_{10} 1000$: “What power of 10 gives 1000?”
- $10^3 = 1000$
So $\log 1000 = 3$.
For $\ln e^5$: “What power of $e$ gives $e^5$?”
- Obviously, the answer is 5.
So $\ln e^5 = 5$.
This last example illustrates an important property: $\log_b b^x = x$. The logarithm and exponential with the same base undo each other.
Properties of Logarithms
Because logarithms are exponents, they inherit their properties from the exponent rules you already know. Here is how:
Product Rule: When you multiply numbers, you add their exponents. So: $$\log_b(xy) = \log_b x + \log_b y$$
Why? If $\log_b x = m$ and $\log_b y = n$, then $x = b^m$ and $y = b^n$. So $xy = b^m \cdot b^n = b^{m+n}$, which means $\log_b(xy) = m + n$.
Quotient Rule: When you divide numbers, you subtract their exponents. So: $$\log_b\left(\frac{x}{y}\right) = \log_b x - \log_b y$$
Power Rule: When you raise a number to a power, you multiply exponents. So: $$\log_b(x^n) = n \log_b x$$
This one is especially useful because it lets you bring exponents down in front of the logarithm, turning multiplication into something easier to work with.
Change of Base Formula
What if you need to calculate $\log_5 37$ but your calculator only has buttons for $\log$ (base 10) and $\ln$ (base $e$)? The change of base formula solves this problem:
$$\log_b x = \frac{\log x}{\log b} = \frac{\ln x}{\ln b}$$
In words: to convert to a different base, divide the logarithm of the argument by the logarithm of the original base (using any base you want for both).
So $\log_5 37 = \frac{\log 37}{\log 5} = \frac{\ln 37}{\ln 5}$.
Graphing Logarithmic Functions
The graph of $y = \log_b x$ has several key features:
- Domain: $x > 0$ (you can only take logarithms of positive numbers)
- Range: All real numbers (logarithms can output any value)
- Vertical asymptote: The $y$-axis ($x = 0$) is a vertical asymptote; the graph approaches but never touches it
- $x$-intercept: Always at $(1, 0)$ because $\log_b 1 = 0$ for any base
- Key point: The graph passes through $(b, 1)$ because $\log_b b = 1$
For bases greater than 1 (like 2, 10, or $e$), the graph increases from left to right, but it increases more and more slowly. For bases between 0 and 1, the graph decreases.
The graph of $y = \log_b x$ is the reflection of $y = b^x$ across the line $y = x$. This makes sense because they are inverse functions.
Transformations of Logarithmic Functions
Just like other functions, you can transform logarithmic graphs:
- Vertical shift: $y = \log_b x + k$ shifts the graph up by $k$ units
- Horizontal shift: $y = \log_b(x - h)$ shifts the graph right by $h$ units
- Vertical stretch: $y = a \log_b x$ stretches the graph vertically by a factor of $a$
- Reflection: $y = -\log_b x$ reflects across the $x$-axis; $y = \log_b(-x)$ reflects across the $y$-axis
When you shift horizontally, the vertical asymptote moves too. For $y = \log_b(x - h)$, the asymptote is at $x = h$.
Notation and Terminology
| Term | Meaning | Example |
|---|---|---|
| $\log_b x$ | Exponent you put on $b$ to get $x$ | $\log_2 8 = 3$ because $2^3 = 8$ |
| $\log x$ | Common log (base 10) | $\log 100 = 2$ |
| $\ln x$ | Natural log (base $e$) | $\ln e = 1$ |
| Base | The number being raised to a power | In $\log_5 25$, base is 5 |
| Argument | The input to the logarithm | In $\log_5 25$, argument is 25 |
| Product rule | $\log_b(xy) = \log_b x + \log_b y$ | $\log_2(8 \cdot 4) = \log_2 8 + \log_2 4$ |
| Quotient rule | $\log_b\left(\frac{x}{y}\right) = \log_b x - \log_b y$ | $\log_3\left(\frac{27}{9}\right) = \log_3 27 - \log_3 9$ |
| Power rule | $\log_b(x^n) = n \log_b x$ | $\log_2(8^2) = 2\log_2 8$ |
Examples
Evaluate $\log_3 81$.
Step 1: Ask yourself: “What power of 3 equals 81?”
Step 2: Test powers of 3:
- $3^1 = 3$
- $3^2 = 9$
- $3^3 = 27$
- $3^4 = 81$
Step 3: Since $3^4 = 81$, we have $\log_3 81 = 4$.
Answer: $\log_3 81 = 4$
Convert the logarithmic equation $\log_5 125 = 3$ to exponential form.
Step 1: Recall the definition: $\log_b x = y$ means $b^y = x$.
Step 2: Identify the parts:
- Base $b = 5$
- Argument $x = 125$
- Exponent $y = 3$
Step 3: Write in exponential form: $5^3 = 125$
Answer: $5^3 = 125$
(You can verify this: $5 \times 5 \times 5 = 125$.)
Expand $\log_2 \frac{x^3y}{z^2}$ into a sum and difference of simpler logarithms.
Step 1: Apply the quotient rule to separate the fraction: $$\log_2 \frac{x^3y}{z^2} = \log_2(x^3y) - \log_2(z^2)$$
Step 2: Apply the product rule to expand $\log_2(x^3y)$: $$= \log_2(x^3) + \log_2 y - \log_2(z^2)$$
Step 3: Apply the power rule to bring down the exponents: $$= 3\log_2 x + \log_2 y - 2\log_2 z$$
Answer: $3\log_2 x + \log_2 y - 2\log_2 z$
Condense $3\ln x - \frac{1}{2}\ln y + \ln 4$ into a single logarithm.
Step 1: Apply the power rule in reverse to move coefficients into exponents: $$3\ln x = \ln x^3$$ $$\frac{1}{2}\ln y = \ln y^{1/2} = \ln \sqrt{y}$$
So we have: $\ln x^3 - \ln \sqrt{y} + \ln 4$
Step 2: Apply the product and quotient rules. Addition becomes multiplication; subtraction becomes division: $$= \ln\left(\frac{x^3 \cdot 4}{\sqrt{y}}\right)$$
Step 3: Simplify: $$= \ln\left(\frac{4x^3}{\sqrt{y}}\right)$$
Answer: $\ln\left(\frac{4x^3}{\sqrt{y}}\right)$
Use the change of base formula to evaluate $\log_5 37$ with a calculator.
Step 1: Apply the change of base formula: $$\log_5 37 = \frac{\log 37}{\log 5}$$
(You could also use $\frac{\ln 37}{\ln 5}$; you will get the same answer.)
Step 2: Use your calculator to find each value:
- $\log 37 \approx 1.5682$
- $\log 5 \approx 0.6990$
Step 3: Divide: $$\log_5 37 \approx \frac{1.5682}{0.6990} \approx 2.244$$
Step 4: Verify: Does $5^{2.244} \approx 37$? Using a calculator, $5^{2.244} \approx 37.04$. Yes!
Answer: $\log_5 37 \approx 2.244$
Graph $f(x) = -\log_2(x + 3) + 1$ and identify its key features.
Step 1: Start with the parent function $y = \log_2 x$ and identify the transformations:
- $(x + 3)$: Horizontal shift 3 units left
- The negative sign: Reflection across the $x$-axis
- $+ 1$: Vertical shift 1 unit up
Step 2: Find the vertical asymptote. The parent function has asymptote $x = 0$. After shifting left 3 units, the asymptote is at $x = -3$.
Step 3: Find the $x$-intercept. Set $f(x) = 0$: $$0 = -\log_2(x + 3) + 1$$ $$\log_2(x + 3) = 1$$ $$x + 3 = 2^1 = 2$$ $$x = -1$$
The $x$-intercept is $(-1, 0)$.
Step 4: Find another key point. For the parent function, $(2, 1)$ is on the graph. Apply transformations:
- Start with $x = 2$ on parent, so $x + 3 = 2$ means $x = -1$ (already found)
- Try $(1, 0)$ on parent: after shift left 3, this becomes $(-2, 0)$. After reflection and shift up 1: $y = -0 + 1 = 1$. So $(-2, 1)$ is on our graph.
Step 5: Sketch the graph.
- Vertical asymptote at $x = -3$
- Passes through $(-1, 0)$ and $(-2, 1)$
- Because of the reflection, the graph decreases as $x$ increases (it goes down to the right)
- Domain: $x > -3$
- Range: All real numbers
Answer: The graph has vertical asymptote $x = -3$, $x$-intercept at $(-1, 0)$, and decreases from left to right due to the reflection. The domain is $(-3, \infty)$ and the range is $(-\infty, \infty)$.
Key Properties and Rules
Here is a summary of the essential logarithm properties:
| Rule | Formula | Example |
|---|---|---|
| Definition | $\log_b x = y \Leftrightarrow b^y = x$ | $\log_4 16 = 2 \Leftrightarrow 4^2 = 16$ |
| Product Rule | $\log_b(xy) = \log_b x + \log_b y$ | $\log_3(9 \cdot 27) = \log_3 9 + \log_3 27$ |
| Quotient Rule | $\log_b\left(\frac{x}{y}\right) = \log_b x - \log_b y$ | $\log_2\left(\frac{32}{4}\right) = \log_2 32 - \log_2 4$ |
| Power Rule | $\log_b(x^n) = n\log_b x$ | $\log_5(125^2) = 2\log_5 125$ |
| Log of 1 | $\log_b 1 = 0$ | $\log_7 1 = 0$ |
| Log of base | $\log_b b = 1$ | $\log_5 5 = 1$ |
| Inverse property | $\log_b(b^x) = x$ | $\log_2(2^7) = 7$ |
| Inverse property | $b^{\log_b x} = x$ | $10^{\log 50} = 50$ |
| Change of base | $\log_b x = \frac{\log_c x}{\log_c b}$ | $\log_3 7 = \frac{\ln 7}{\ln 3}$ |
Remember: These properties only work when all logarithms have the same base. You cannot combine $\log_2 x + \log_3 y$ directly because the bases are different.
Real-World Applications
The Decibel Scale (Sound Intensity)
Sound intensity is measured in decibels (dB), which uses a logarithmic scale:
$$\text{dB} = 10 \log\left(\frac{I}{I_0}\right)$$
where $I$ is the sound intensity and $I_0$ is a reference intensity. Why logarithmic? Because human hearing perceives sound logarithmically. A sound that is 10 times more intense does not sound 10 times louder; it sounds about twice as loud. The decibel scale matches how we actually experience sound.
- A whisper: about 30 dB
- Normal conversation: about 60 dB
- Rock concert: about 110 dB
Each increase of 10 dB represents a tenfold increase in intensity.
The Richter Scale (Earthquakes)
Earthquake magnitude is measured logarithmically:
$$M = \log\left(\frac{A}{A_0}\right)$$
where $A$ is the amplitude of seismic waves. A magnitude 6 earthquake has seismic waves 10 times larger than a magnitude 5 earthquake, and releases about 32 times more energy. This is why the difference between a magnitude 5 and magnitude 7 earthquake is so dramatic: it is not a 40% increase, but a 100-fold increase in wave amplitude.
The pH Scale (Acidity)
The acidity of a solution is measured by pH:
$$\text{pH} = -\log[\text{H}^+]$$
where $[\text{H}^+]$ is the concentration of hydrogen ions. The negative sign means that higher concentrations give lower pH values (more acidic).
- Battery acid: pH around 0
- Lemon juice: pH around 2
- Pure water: pH 7 (neutral)
- Baking soda: pH around 9
- Bleach: pH around 13
Each pH unit represents a tenfold change in acidity.
Information Theory
In computer science, logarithms measure information content. The number of bits needed to represent $n$ different values is $\log_2 n$:
- 2 values need 1 bit: $\log_2 2 = 1$
- 8 values need 3 bits: $\log_2 8 = 3$
- 256 values need 8 bits: $\log_2 256 = 8$
This is why one byte (8 bits) can represent 256 different values.
Musical Pitch
Musical octaves follow a logarithmic pattern. When you go up one octave, the frequency doubles. Going from A4 (440 Hz) to A5 (880 Hz) to A6 (1760 Hz), each octave is a doubling, not a fixed addition. The number of octaves between two frequencies is:
$$\text{Octaves} = \log_2\left(\frac{f_2}{f_1}\right)$$
This is why a piano keyboard has equally spaced keys, but the frequencies are not equally spaced; they are logarithmically spaced.
Self-Test Problems
Problem 1: Evaluate $\log_4 64$.
Show Answer
Ask: “What power of 4 equals 64?”
- $4^1 = 4$
- $4^2 = 16$
- $4^3 = 64$
So $\log_4 64 = 3$.
Problem 2: Convert $\log_7 343 = 3$ to exponential form.
Show Answer
Using the definition $\log_b x = y$ means $b^y = x$:
$\log_7 343 = 3$ means $7^3 = 343$
Problem 3: Expand $\log_5 \frac{x^2}{yz^3}$ as a sum and difference of logarithms.
Show Answer
Step 1: Apply the quotient rule: $$\log_5 \frac{x^2}{yz^3} = \log_5(x^2) - \log_5(yz^3)$$
Step 2: Apply the product rule to $\log_5(yz^3)$: $$= \log_5(x^2) - [\log_5 y + \log_5(z^3)]$$ $$= \log_5(x^2) - \log_5 y - \log_5(z^3)$$
Step 3: Apply the power rule: $$= 2\log_5 x - \log_5 y - 3\log_5 z$$
Problem 4: Condense $2\log x + \log 3 - \frac{1}{3}\log y$ into a single logarithm.
Show Answer
Step 1: Apply the power rule in reverse: $$2\log x = \log x^2$$ $$\frac{1}{3}\log y = \log y^{1/3} = \log \sqrt[3]{y}$$
Step 2: Combine using product and quotient rules: $$\log x^2 + \log 3 - \log \sqrt[3]{y} = \log\left(\frac{3x^2}{\sqrt[3]{y}}\right)$$
Problem 5: Evaluate $\log_8 2$.
Show Answer
Ask: “What power of 8 equals 2?”
Since $8 = 2^3$, we need $8^? = 2$, or $(2^3)^? = 2^1$.
This means $3 \cdot ? = 1$, so $? = \frac{1}{3}$.
Therefore, $\log_8 2 = \frac{1}{3}$.
(Verify: $8^{1/3} = \sqrt[3]{8} = 2$.)
Problem 6: Use the change of base formula to evaluate $\log_3 20$ to three decimal places.
Show Answer
$$\log_3 20 = \frac{\log 20}{\log 3} = \frac{1.301}{0.477} \approx 2.727$$
(Or using natural log: $\frac{\ln 20}{\ln 3} = \frac{2.996}{1.099} \approx 2.727$)
Problem 7: Describe the transformations applied to $y = \log_3 x$ to obtain $y = \log_3(x - 2) + 4$, and state the domain and the equation of the vertical asymptote.
Show Answer
Transformations:
- $(x - 2)$: Horizontal shift 2 units to the right
- $+ 4$: Vertical shift 4 units up
Vertical asymptote: The parent function has asymptote $x = 0$. After shifting right 2 units, the asymptote is $x = 2$.
Domain: $x > 2$, or in interval notation: $(2, \infty)$
Summary
- Logarithms are the inverse of exponentials: $\log_b x = y$ means exactly the same thing as $b^y = x$
- A logarithm answers the question: “What exponent do I put on the base to get this number?”
- Common log ($\log$) uses base 10; natural log ($\ln$) uses base $e \approx 2.718$
- Product rule: $\log_b(xy) = \log_b x + \log_b y$ (multiplication becomes addition)
- Quotient rule: $\log_b(x/y) = \log_b x - \log_b y$ (division becomes subtraction)
- Power rule: $\log_b(x^n) = n\log_b x$ (exponents come down as multipliers)
- Change of base formula: $\log_b x = \frac{\log x}{\log b} = \frac{\ln x}{\ln b}$
- Logarithmic graphs have a vertical asymptote, pass through $(1, 0)$, and increase slowly for bases greater than 1
- Transformations work the same way as with other functions: horizontal shifts move the asymptote
- Real-world applications include the decibel scale, Richter scale, pH scale, information theory, and musical pitch; all of these use logarithms because they measure quantities that grow or vary by factors rather than fixed amounts