Introduction to Logarithms
Learning goals
- Define the logarithm as the exponential's inverse
- Switch between and
- Restrict the argument to , not the variable
- Read and for free
- Cancel with and
- 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. It deserves a proof rather than a glance at a picture, since everything in this lesson rests on it.
is one-to-one, so it has an inverse#
Take the case first, and let be any two real numbers. Write , so . The exponent rule for a sum splits the larger power apart:
Since is positive, whether beats comes down to a single question: is bigger than ? It is, and here is why. When is a positive integer, is a product of factors each larger than , so the product is larger than . When is a positive rational number, suppose for contradiction that . Raising both sides of an inequality between positive numbers to the th power preserves it, so , contradicting the integer case. Hence . When is irrational, lean on the previous lesson, which is where at an irrational exponent was constructed in the first place. That power was constructed as the single value the rational exponents squeeze it to. Pick a positive rational smaller than . Every rational exponent between and gives a power of at least , so the value they squeeze to satisfies as well.
So for every , and therefore
That is exactly the statement that forces : the function is strictly increasing. A strictly increasing function can never take the same value twice, because any two different inputs are ordered, and the smaller one is sent to a strictly smaller output. So is one-to-one.
For a base with , write with , so that . If then , and the case just proved gives , which says . The function is strictly decreasing, and a strictly decreasing function is one-to-one for the same reason. Either way, never repeats a value, so it can be run backward.
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. Those values are simply not available. On the other side, with the curve climbs past every bound as grows. Still with , as runs off to the left, shrinks toward without ever landing on it. An unbroken increasing curve that gets arbitrarily close to at one end and arbitrarily large at the other passes through every height in between. Such a curve reaches each of those heights exactly once, because it never repeats a value.
A base with needs no fresh argument, just the reduction the proof already used. Write with , so that . As runs over every real number, so does , so produces exactly the same collection of outputs that does, merely in the reverse order. 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 memorising 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 that the logarithm’s answer is never the number in front of you. It is always the exponent hiding behind that number.
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 followed by the cancellation law, and the tangle collapses to .
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.
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 memorise.
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 .
Reflecting an increasing curve gives an increasing curve, so is increasing when and decreasing when , matching its exponential exactly. And the growth is slow. If then , so doubling the input gives , an input whose logarithm is only . Each doubling of 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
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 no fraction does either. Suppose one did, say for positive integers and . Then , and raising both sides to the th power gives . Dividing through by leaves . The left side is an odd integer bigger than . The right side is to an integer power, so it is a fraction below when , exactly when , and an even integer when . It is never an odd integer bigger than , so no such and exist, and is irrational.
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.
First, why is increasing? Suppose but . Raising to both sides of that inequality preserves it, since is increasing, and the cancellation law turns each side back into the original number, giving . That contradicts . So forces , and applying a base- logarithm to an inequality keeps it 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 . Arithmetic nearness is the wrong measure, because the height climbs by one unit every time the argument doubles, not every time it grows by . The exponent reaches the halfway height at
so the midpoint of the interval sits above , not at the arithmetic middle . Since and the logarithm is increasing, lies in the lower half of the interval. Even without that refinement, knowing which two integers a logarithm lives between is enough to sanity-check almost any answer.
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.