Introduction to Logarithms
Learning goals
- Define the logarithm as the exponential's inverse, switching between and
- Require the logarithm's whole argument to be positive
- Cancel with and
- Graph as the exponential reflected across
- Trap an untidy log between straddling integer powers
Why the exponential can be run backward
Fix a base with and , and consider the exponential function . From the previous lesson you know three things about it. It is defined for every real number . Its outputs are always positive. And its graph is an unbroken curve that rises steadily when and falls steadily when .
“Rises steadily” is the part that matters, because it is what makes the function one-to-one: an output can only repeat if the curve ever turns around, and a curve that only climbs never does. Look at the powers of :
Each step to the right multiplies the previous output by , and multiplying a positive number by something bigger than always makes it bigger. So every output beats the one before it, and no two different exponents can ever land on the same power of . Nothing about was special: for any base , multiplying by always increases a positive number, so climbs steadily and never repeats a value. A base with is the mirror image. Multiplying by a fraction between and always shrinks a positive number, so falls steadily instead, and by the same reasoning it is one-to-one too.
Being one-to-one tells you the inverse exists. To know what to feed it, you need the range of , because the Inverse Functions lesson pinned the two down together. The inverse’s domain is the original function’s range, and the inverse’s range is the original function’s domain.
Every power of a positive base is positive, so never outputs and never outputs a negative number. On the other side, with the curve climbs past every bound as grows, and as runs off to the left, shrinks toward without ever landing on it. An unbroken, steadily climbing curve that starts arbitrarily close to and ends arbitrarily large passes through every positive height exactly once. A base with needs no fresh argument: writing with turns into , which produces the same collection of outputs as , merely in the reverse order, so its range is the positive numbers too. Either way, then:
Read that through the inverse rule and the inverse is already fully described before it has a name. Its inputs are the positive numbers, its outputs are all the real numbers, and the number it returns for a given input is an exponent. All that is left is to write it down.
The logarithm is the name of that inverse
Here is the definition, and it is the whole lesson in one sentence.
Fix a base with and . For a positive number , the logarithm of to the base , written , is the unique real exponent you must put on to get .
Unpacked into an equation, the definition is a two-way street between a logarithmic statement and an exponential one:
Both directions are true, and both are worth checking. Going left to right, if then is by definition the exponent that turns into , so . Going right to left, suppose for some real . Then is automatically positive, so it is a legal input for the logarithm, and is an exponent that turns into . There cannot be a second such exponent, because is one-to-one in , so has to be the one the logarithm names, and . The equivalence goes both ways, which is why you may swap either form for the other at any moment without losing information.
Say the definition aloud whenever you use it. "" means ” to the what gives ?” The answer is , and so .
The two restrictions on the base are not decoration. If , then for every exponent , so the function is a flat line: it is not one-to-one, and it never produces any output except . The equation has no solution and has infinitely many, so no inverse can exist. If were negative, would not even be a function on the real numbers, since a power like is not a real number at all. There is nothing there to invert.
Two values come free from the definition and are worth memorizing on the spot:
Reading a logarithm straight from the definition
Every evaluation is the same question asked with different numbers, so ask it out loud each time.
Worked example 1 Evaluate , , and
For , ask: three to the what gives eighty-one? Run up the powers of , which are , , , :
For , ask: five to the what gives one twenty-fifth? A number smaller than needs a negative exponent, since a negative exponent flips the power over:
For , ask: ten to the what gives a thousand? Counting the zeros answers it:
Notice what the logarithm’s answer actually names. It plays the role of an exponent, not the role of the number you started with, even on the rare occasion the two numbers happen to match. In , the is an exponent: the power you put on , not a disguised copy of .
When the base and the number are powers of a common smaller number, write both as powers of that number and the exponent falls out.
Worked example 2 Evaluate and
Let . By the definition this says . Both and are powers of , so rewrite them that way and use the rule :
Two powers of are equal only when their exponents are equal, because is one-to-one. So and . Check it against the definition: , as required.
The same move handles . Setting gives , and both sides are powers of :
A logarithm is under no obligation to be a whole number. Here it is a fraction, and that is perfectly ordinary.
Check your understanding
Evaluate .
Ask the defining question. Four to the what gives ? Since , flipping the power over calls for a negative exponent.
So the exponent is , and .
The two cancellation laws
The Inverse Functions lesson ended with a pair of identities: composing a function with its inverse, in either order, gives back what you started with. Written for and , they read
Neither needs the general theory to justify it; each is one line from the definition. For the first, ask what means: it is the exponent you put on to get . The exponent does that job, and one-to-one-ness says no other exponent does, so the answer is . For the second, is by construction the exponent that turns into ; put it on , and you get .
Watch the two domains, because they are not the same. You may write for every real , positive or negative, since is a legal input for the logarithm no matter what is. But requires , because otherwise does not exist and the left side is meaningless. Written as and , the two laws are easy to use and easy to confuse, so keep asking which one you are applying.
The cancellation laws combine with the exponent rules to settle expressions that look far worse than they are. Take . The base is , so
Nothing there is a new rule. It is the ordinary power-of-a-power rule, with , followed by the cancellation law, and the tangle collapses to .
Check your understanding
Simplify .
This matches the pattern directly: the exponent that produces is itself, and nothing else needs computing.
What you are allowed to take the logarithm of
The domain question was answered before the logarithm even had a name. Its domain is the range of , and its range is the domain of :
So and are not small, or negative, or infinite. They do not exist. There is no real exponent with , because powers of stay strictly positive however far left you go, and there is certainly no exponent with . For a fixed legal base, is defined exactly when : positive inputs always work, since every positive number is to some power, and nothing else ever works.
In practice this restriction bites on the argument, the quantity sitting inside the logarithm, not on the variable. The function is defined precisely when , which is to say . The function is defined for every real , negative included, because is positive no matter what. Always ask what the logarithm is being handed, and then demand that that be positive.
Check your understanding
For which values of is defined?
The domain restriction applies to the argument, here , not to itself. Demand that the argument be positive.
So the function is defined exactly when .
The graph is the exponential reflected across the line
Inverse functions swap coordinates. The point lies on the graph of exactly when lies on the graph of . That coordinate swap is the same thing as reflecting the plane across the line . So you do not need a new table of values to graph a logarithm. You need the exponential’s table, read backward.
| Point on | Point on |
|---|---|
What the base does to both curves at once
y = 2ˣ. y = log₂ x. Base 2 is greater than 1, so both curves rise. Reflecting across y = x sends (1, 2) on the exponential to (2, 1) on the logarithm. The exponential never reaches y = 0 and the logarithm never reaches x = 0, which is that same asymptote reflected.
Every feature of the logarithm’s graph is now something you can read off the reflection rather than memorize.
The exponential’s -intercept becomes the logarithm’s -intercept . So the graph of crosses the -axis at for every base, which is just drawn as a picture. The point on the exponential becomes on the logarithm, which is .
That last pair is the one marked in the figure above, and it is worth stepping the base through every setting to watch it travel. The two marks slide in opposite directions along their curves, always the same distance from the diagonal on opposite sides. Set the base to and the logarithm disappears altogether. That is not a gap in the drawing. Every power of is , so is the flat line , one height reached by every input. A rule that sends everything to one place has nothing to undo it. The condition in the definition is exactly this state being excluded.
The exponential’s horizontal asymptote reflects into a vertical asymptote for the logarithm. The curve dives down the side of the -axis, getting arbitrarily low without ever touching the axis. That is the picture of “you cannot take the logarithm of ”: there is no height at all above .
The reflection preserves direction too, so increases when and decreases when , matching its exponential. But the growth is slow: if then , so doubling the input only buys a single unit of height, . That is why is under , and why the right-hand end of the curve looks almost flat.
Check your understanding
The graph of passes through the point . Which point must lie on the graph of ?
The graph of an inverse function is the original reflected across the line , and reflecting a point across that line swaps its coordinates.
Check it against the definition. Since , the exponent that turns into is , so , which is exactly the point .
Switching forms to solve equations
The equivalence is a tool, not just a slogan. Whenever an unknown is trapped in an awkward position, translate the statement into the other form and the unknown steps into the open. There are only three places it can hide.
If the unknown is inside the logarithm, as in , go to exponential form: .
If the unknown is the base, as in , go to exponential form again: . Now and both satisfy that equation, but a logarithm base must be positive and cannot be , so is the only answer. The rejected root is not a mistake in the algebra; it is a value the definition forbids.
If the unknown is the exponent, as in , go to logarithmic form: . This is the case the logarithm was built for, and it is why the whole lesson matters.
Worked example 3 Solve
Here is the base, so it already has to end up positive and different from ; keep that requirement in mind and check the answer against it once you have one. Read the equation with the definition. It says: raised to the power gives . Write that down:
To free , raise both sides to the reciprocal power , since :
Check the answer in the original statement rather than in your own algebra. Is ? That asks whether , and indeed . It is, and is a legal base, being positive and not .
Worked example 4 Solve
Switch to exponential form. The equation says that the exponent turning into is , so the argument itself must equal :
That is a quadratic. Move everything to one side and factor:
which gives or .
Now check both against the domain rule, and check it carefully, because the rule applies to the argument of the logarithm, not to . For the argument is , which is positive. For the argument is , which is also positive. Both values are legal, and both are solutions: in each case.
The temptation is to throw out on sight because logarithms “cannot take negatives”. That instinct is misplaced. Nothing forbids a negative solution; what is forbidden is a negative argument, and here the argument comes out to either way.
Check your understanding
Solve .
The definition turns the statement into an ordinary equation. The exponent that takes to is , so
Both and , so the fourth-degree equation has two real roots. But a logarithm base must be positive and not equal to , so is not admissible as a base. The only solution is .
Trapping a logarithm between two integers
Most logarithms are not tidy. No whole number answers ” to the what gives ?”, and neither does any fraction: turns out to be irrational, an endless, non-repeating decimal, the same kind of number as .
That does not make it mysterious. You can pin it between two integers using nothing but powers of and the fact that the logarithm is increasing.
Why is increasing? The Inverse Functions lesson already settled this in general: reflecting an increasing curve across gives another increasing curve, so the inverse of an increasing function is always increasing. Since is increasing, is increasing too, and applying it to an inequality keeps the inequality pointing the same way.
Now trap the number. Since and ,
So sits between and , and its true value is about . Do not try to guess where in that interval it lands by asking whether is nearer to or to : the height climbs by one unit every time the argument doubles, not every time it grows by a fixed amount, so arithmetic nearness is the wrong measure.
Knowing which two integers a logarithm lives between is not just a sanity check. It answers real questions on its own, including ones where the honest answer is not the nearer integer. Suppose a server’s request capacity doubles with every upgrade, starting at request per second, and it must be upgraded until it can handle at least requests per second. The number of upgrades has to satisfy , so . Trapping the logarithm gives and , so and ; in fact , much closer to than to . Even so, seven upgrades cap out at requests per second, short of , so the answer has to be rounded up to regardless. Trapping a logarithm tells you which two whole numbers are in play; whether the honest answer rounds up or down depends on what the numbers mean in the situation, never on which integer the logarithm sits nearer to.
Check your understanding
Between which two consecutive integers does lie?
Find the powers of that straddle .
Since is increasing, applying it to that inequality keeps it pointing the same way, giving .
Base deserves a note of its own. It is used so often that it is written with no base at all, and with a bare “log” means from here on. The trapping argument is especially sharp there. A whole number with digits satisfies , so applying gives
In other words, the whole-number part of a common logarithm is one less than the digit count. Since , you know without any calculation that is three point something, and sure enough has four digits.
What you cannot do yet is compute or to a decimal, or break a complicated logarithm into simpler ones. That takes rules for combining logarithms, which is the business of the next lesson. Everything in this one came from a single idea: the logarithm is the exponential run backward.