Precalculus
Logarithms Explained: Definition, Laws and Solving Equations
By MathSolver Pro Editorial Team · Published
A logarithm answers one question: what power do I raise the base to in order to get this number? Every rule and technique in this guide follows from that single idea.
What a logarithm is
Exponents and logarithms are two ways of describing the same relationship. The statement says that raising 2 to the power 3 gives 8. The logarithm turns the question around: to what power must 2 be raised to give 8? The answer is 3, written .
The number is the base, is the argument, and is the exponent you are looking for. The conditions matter. The base must be positive and not equal to 1, because powers of 1 are always 1 and powers of negative numbers are not defined for every real exponent. The argument must be positive, because a positive base raised to any real power is positive.
- , because .
- , because .
- , because .
- for every allowed base, because , and because .
Two bases have their own notation. The common logarithm uses base 10, which suits measurements in powers of ten. The natural logarithm uses base , which appears naturally in growth, decay and calculus. Some textbooks and programming languages write for the natural log, so check the convention in your course.
The three laws of logarithms
Because logarithms are exponents, the exponent rules translate directly into logarithm rules. For positive and and any allowed base:
The product law comes from : multiplying numbers adds their exponents, so it adds their logarithms. The quotient law comes from dividing powers, and the power law from . Before calculators, this is exactly why logarithm tables were used: they turned difficult multiplications into additions.
- , and indeed .
- .
- .
- .
Expanding and condensing expressions
Expanding uses the laws to split one logarithm into simpler pieces; condensing combines several into one. Both are common exam tasks and both are needed when solving equations.
Expand
- Quotient law: .
- Product law on the first part: .
- Power law: , valid for positive , and .
Condense
- Move coefficients inside as powers: .
- Combine additions as products and subtractions as quotients: .
Coefficients must become exponents before you combine. is , not .
Change of base
Calculators usually have keys only for and . Any other base is handled with the change of base formula, which works with any new base :
For example, . A sanity check helps: and , so the answer must lie between 3 and 4. The formula also shows that , so because .
Solving exponential equations
When the unknown is in an exponent, isolate the power, then take a logarithm of both sides so the power law can bring the exponent down.
Example 1:
- Take natural logs of both sides: .
- Power law: .
- Divide: .
- Check: , and the answer lies between 2 and 3 as expected since and .
Example 2:
- Isolate the power first: .
- Since , the exponents must match: , so .
- Check: .
A frequent error in Example 2 is taking the logarithm before dividing by 5. That is not wrong, but it produces , which takes longer to solve. Isolating the power first keeps the work short.
Solving logarithmic equations
When the unknown is inside a logarithm, combine the logarithms into one, then rewrite the equation in exponential form. Because logarithms of zero and negative numbers are undefined, every candidate solution must be checked in the original equation.
Example 3:
- Product law: .
- Exponential form: .
- Rearrange and factor: , so and or .
- Check: gives . The value makes undefined, so it is rejected.
- Solution: .
Example 4:
- Exponential form with base : .
- Solve: .
- Check that the argument is positive: .
The algebra in Example 3 produced a quadratic. If you need a reminder of how to solve one, see how to solve quadratic equations.
The graph of a logarithm
The function is the inverse of , so its graph is the reflection of the exponential graph in the line . For it passes through and , rises slowly without bound, and approaches the y-axis as a vertical asymptote. Its domain is and its range is all real numbers, exactly the reverse of the exponential function's domain and range.
Shifts change the domain. For , the argument must be positive, so the domain is and the asymptote moves to . Working out such domains is covered in the guide to domain and range, and the relationship with exponentials is explained further in inverse functions. You can plot several bases together with the graphing calculator.
Where logarithms are used
- Compound growth: an amount growing 5 percent a year doubles when , so years.
- Chemistry: pH is , so a hydrogen ion concentration of moles per litre gives pH 3, and each pH step is a factor of ten.
- Sound: decibel levels are , so a sound 100 times as intense is 20 decibels louder.
- Computer science: binary search on items needs about steps, so a million items need only about 20.
All four share the same feature: logarithms compress quantities that span many powers of ten into a manageable scale, and they turn multiplicative change into additive change.
Common mistakes
- Writing . The product law is about products, and there is no rule for the log of a sum.
- Writing . The left side is a change of base, .
- Confusing with .
- Forgetting to check solutions of log equations, so an answer that makes an argument negative slips through.
- Mixing up and on a calculator.
The logarithm calculator evaluates any base and shows the change of base step, which makes it a quick way to check the examples above.
A study plan for logarithms
Logarithms feel abstract mainly because the notation hides a simple question. A good way to build fluency is to practise translating in both directions until it is automatic. Take ten powers you already know, such as or , and rewrite each as a logarithm. Then take ten logarithms and rewrite each as a power. After a short session, evaluating or becomes a quick mental step instead of a puzzle.
Next, practise the laws on numbers before using them on variables. Checking that equals by computing both sides makes the product law believable, and it trains you to spot the false versions listed in the next section. Only then move on to expanding and condensing algebraic expressions.
Finally, solve equations in two families: those with the unknown in an exponent and those with the unknown inside a logarithm. The first family is solved by taking a logarithm, the second by rewriting in exponential form. Recognising which family a problem belongs to is half the work, and checking the domain at the end is the other habit that separates correct answers from nearly correct ones.
Frequently asked questions
Why can't you take the logarithm of a negative number?
Because means , and a positive base raised to any real power is positive. No real exponent produces a negative number or zero, so those logarithms are undefined in the real numbers.
Do log and ln mean the same thing?
In most school courses means base 10 and means base . They are related by , roughly . In many programming languages, however, log means the natural logarithm.
How do I evaluate a logarithm without a calculator?
Rewrite it as a power question. For , ask what power of 4 is 64; since , the answer is 3. This works whenever the argument is a recognisable power of the base.
Do I always have to check answers to log equations?
Yes. Combining logarithms can introduce values that make an original argument zero or negative. Substitute each candidate into the original equation and reject any that give an undefined logarithm.