Math glossary

Introduction to Logarithms: Meaning, Rules, and Examples

Learn what a logarithm means, convert between exponential and log form, and find the domain, graph, and value with six examples.

TL;DR

A logarithm tells you which exponent produces a number. The equation logbx=y\log_b x=y means by=xb^y=x. For real logarithms, the base must be positive and different from 1, and the input must be positive.

Key Points

  • The base is the number raised to a power. The logarithm gives the power.
  • A logarithm can be negative or fractional even though its input is positive.
  • Common logarithms use base 10, and natural logarithms use base ee.
  • Exponential and logarithmic functions of the same base undo each other.
  • For a base greater than 1, the logarithm increases as the input increases.

What is a logarithm?

An exponent tells you what a base raised to a power equals. A logarithm answers the reverse question. Since 34=813^4=81, the base-3 logarithm of 81 equals 4. Read log381=4\log_3 81=4 as “log base 3 of 81 is 4.”

logbx=y⟺by=x.\log_b x=y \quad\Longleftrightarrow\quad b^y=x.

The three pieces stay the same when you rewrite the equation. The base bb remains the base, the input xx becomes the exponential result, and the logarithm value yy becomes the exponent. To practice the conversion, circle the exponent and underline the exponential result before rewriting the equation. OpenStax, Logarithmic Functions

Exponential form Logarithmic form How to read it
43=644^3=64 log464=3\log_4 64=3 A power of 3 takes 4 to 64
10−2=0.0110^{-2}=0.01 log100.01=−2\log_{10}0.01=-2 A power of −2-2 takes 10 to 0.01
91/2=39^{1/2}=3 log93=1/2\log_9 3=1/2 A square root takes 9 to 3

What are the domain, range, and graph of a logarithm?

Use a real base b>0b>0 with b≠1b\ne1. Every real power of this base is positive. The input to logbx\log_b x must therefore satisfy x>0x>0. The output can be any real number because those outputs are the exponents of bb.

If the base were 1, every power would equal 1, so there would be no unique exponent to recover. Negative bases do not give a single real exponential function on all real exponents. For example, the exponent 1/21/2 would ask for a real square root of a negative value.

The logarithm and the corresponding exponential are inverse functions. Reflect one graph across y=xy=x to get the other. The log graph passes through (1,0)(1,0) and (b,1)(b,1) because b0=1b^0=1 and b1=bb^1=b. It has a vertical asymptote at x=0x=0. It rises when b>1b>1 and falls when 0<b<10<b<1. OpenStax, Evaluate and Graph Logarithmic Functions

The graph of log base two reflects the graph of two to the power x across the line y equals x
Swapping input and output reflects the exponential curve over the diagonal. The point (2,4)(2,4) becomes (4,2)(4,2).

When do you use common and natural logarithms?

A common logarithm has base 10. Many calculators label it log\log. A natural logarithm, marked ln\ln, uses Euler’s number ee, approximately 2.71828. Natural logarithms undo exe^x in continuously growing or decaying models. Computer science often uses base 2. Since log\log without a base can depend on the field, check the convention in the problem.

For a calculator without a button for the desired base, use the change-of-base rule. The numerator and denominator must use the same base.

logbx=lnxlnb=log10xlog10b.\log_b x=\frac{\ln x}{\ln b}=\frac{\log_{10}x}{\log_{10}b}.

The log table guide explains how to estimate base-10 logs without an electronic calculator. OpenStax, Exponential and Logarithmic Functions

Which log rules follow from exponent rules?

Multiplying two powers of the same base adds their exponents. That is why logb(MN)=logbM+logbN\log_b(MN)=\log_b M+\log_b N for positive M,NM,N. Dividing subtracts their exponents, so logb(M/N)=logbM−logbN\log_b(M/N)=\log_b M-\log_b N. Raising a positive input MM to a power pp multiplies the exponent, giving logb(Mp)=plogbM\log_b(M^p)=p\log_b M.

For instance, log2(8·4)=3+2=5\log_2(8\cdot4)=3+2=5. Verify with 25=322^5=32. The log rules guide shows how to expand longer expressions and check that every original log input is allowed. OpenStax, Logarithmic Properties

Worked Logarithm Examples

Example 1

Rewrite 53=1255^3=125 as a logarithm.

  1. The base is 5 and the exponential result is 125.
  2. The exponent 3 becomes the log value.
  3. The equation is log5125=3\log_5 125=3.

Example 2

Evaluate log2(1/16)\log_2(1/16).

  1. Ask which power of 2 equals 1/161/16.
  2. Since 16=2416=2^4, its reciprocal is 2−42^{-4}.
  3. The logarithm is −4-4.

Example 3

Find log255\log_{25}5.

  1. A power of 1/21/2 takes the square root.
  2. The positive square root of 25 is 5.
  3. Therefore log255=1/2\log_{25}5=1/2.

Example 4

Evaluate log1/327\log_{1/3}27.

  1. Rewrite 27 as 333^3.
  2. Raising 1/31/3 to −3-3 takes the reciprocal of its cube and produces 27.
  3. The value is −3-3. For this base, inputs greater than 1 have negative logarithms.

Example 5

Solve log4(x−2)=3\log_4(x-2)=3.

  1. The domain requires x−2>0x-2>0, so x>2x>2.
  2. Rewrite as x−2=43=64x-2=4^3=64.
  3. Add 2 to get x=66x=66. It meets the domain condition.

Example 6

Starting with 12 cultures in a model, a population doubles every two hours. How long until the model reaches 96?

  1. After tt hours the model is 12·2t/212\cdot2^{t/2}.
  2. Divide by 12 to get 2t/2=82^{t/2}=8. Taking a base-2 log gives t/2=3t/2=3.
  3. Thus t=6t=6 hours. Three doublings take six hours and turn 12 into 96.

Mistakes That Change a Logarithm Answer

Mistake 1: Swapping the base and input

log28\log_2 8 asks for a power of 2 and equals 3. log82\log_8 2 asks for a power of 8 and equals 1/31/3.

Mistake 2: Rejecting a negative logarithm value

The input must be positive. The output has no such restriction. For example, log10(1/1000)=−3\log_{10}(1/1000)=-3.

Mistake 3: Splitting a sum inside a logarithm

The addition rule comes from multiplying powers. For example, log2(2+8)\log_2(2+8) is about 3.32, whereas log22+log28\log_2 2+\log_2 8 is 4.

Try It Yourself

  1. Evaluate log3(1/27)\log_3(1/27).
  2. Rewrite lnx=2\ln x=2 using exponential form.
  3. Solve log5(x+4)=2\log_5(x+4)=2.

Answers and Reasoning

  1. −3-3 because 3−3=1/273^{-3}=1/27.
  2. x=e2x=e^2 since ln\ln uses base ee.
  3. x+4=25x+4=25, so x=21x=21. The log input is positive.

Frequently Asked Questions

Why is the logarithm of 1 always zero?

Every allowed base raised to zero equals 1. Therefore logb1=0\log_b 1=0.

Can you take a real logarithm of zero?

No. No real exponent makes an allowed base equal to zero. For b>1b>1, the graph drops without bound as positive xx approaches zero, but the function is undefined at zero.

How do you estimate log220\log_2 20 without a calculator?

Since 24=162^4=16 and 25=322^5=32, the log is between 4 and 5. For a midpoint check, 24.5=162pprox22.632^{4.5}=16\sqrt2pprox22.63, so 20 gives a value below 4.5. Change of base gives approximately 4.32.

Conclusion

  • Rewrite a logarithm as an exponential equation to identify its unknown.
  • Check the base and positivity of the input before solving.
  • Verify the result by raising the base to the recovered exponent.

Read More

Research Behind This Article

  1. OpenStax, Precalculus 2e: Logarithmic Functions. OpenStax
  2. OpenStax, Intermediate Algebra: Evaluate and Graph Logarithmic Functions. OpenStax
  3. OpenStax, Calculus Volume 1: Exponential and Logarithmic Functions. OpenStax
  4. OpenStax, Algebra and Trigonometry 2e: Logarithmic Properties. OpenStax