A logarithm answers an exponent question. The statement log b ⁡(x)=y\log _b(x)=y means that b y =xb^{y}=x. For real logarithms, the base must satisfy b>0b>0 and b≠1b\ne 1, and the input must satisfy x>0x>0.

Logarithmic functions are inverses of exponential functions. That inverse relationship explains both their graphs and the algebraic rules used to solve exponential equations.

On this page (9 sections)

Exponential and logarithmic forms

log b ⁡x=y ⟺ b y =x\log_b x=y\quad\Longleftrightarrow\quad b^y=x

For real logarithms, b>0b>0, b≠1b\ne1 and x>0x>0. The logarithm is the exponent needed to turn the base into the argument.

log 2 ⁡8=3 because 2 3 =8\log_2 8=3\quad\text{because}\quad2^3=8
log 10 ⁡(0.01)=−2 because 10 − 2 =0.01\log_{10}(0.01)=-2\quad\text{because}\quad10^{-2}=0.01

The argument must be positive, but the logarithm’s output can be negative, zero or positive. Every valid base gives log b ⁡1=0\log_b1=0 and log b ⁡b=1\log_bb=1.

The common logarithm has base 10. The natural logarithm, written ln⁡x\ln x, has base e≈2.71828e\approx2.71828. An unspecified “log” should be interpreted using the stated convention, not guessed.

Logarithms are inverse functions

The graphs of y= 2 x y=2^x and y= log 2 ⁡xy=\log_2x exchange inputs and outputs. The point (3,8)(3,8) on the exponential becomes (8,3)(8,3) on the logarithm.

A logarithm reverses the exponential assignment

A logarithm reverses the exponential assignmentThe axes use equal units. The solid exponential and dashed logarithm are reflections across the dotted diagonal. The logarithm has only positive inputs but has negative outputs when 0 < x < 1.−202468−202468xy(3, 8)(8, 3)
  • y= 2 x y=2^x
  • y= log 2 ⁡xy=\log_2x
  • Reflection line: y=xy=x
Exchanging (3,8)(3,8) with (8,3)(8,3) gives the inverse pair.
Diagram explained

The axes use equal units. The solid exponential and dashed logarithm are reflections across the dotted diagonal. The logarithm has only positive inputs but has negative outputs when 0 < x < 1.

Exact reference values for this graph
Exponential pointLogarithmic point
(−2,1 / 4)(-2,1/4) (1 / 4,−2)(1/4,-2)
(0,1)(0,1) (1,0)(1,0)
(1,2)(1,2) (2,1)(2,1)
(3,8)(3,8) (8,3)(8,3)

The logarithm’s domain is (0,∞)(0,\infty) and its range is all real numbers: any real output yy is reached by the positive input x= b y x=b^y. The graph passes through (1,0)(1,0) and has vertical asymptote x=0x=0.

For b>1b>1, the logarithm increases. For 0 < b < 1, it decreases. The inverse relationship remains valid in either case.

Basic logarithm laws

For a valid base bb, positive arguments M,NM,N, and real exponent pp, the basic laws are:

Logarithm laws with positive arguments
LawStatement
Product log b ⁡(MN)= log b ⁡M+ log b ⁡N\log_b(MN)=\log_bM+\log_bN
Quotient log b ⁡(M / N)= log b ⁡M− log b ⁡N\log_b(M/N)=\log_bM-\log_bN
Power log b ⁡( M p )=p log b ⁡M\log_b(M^p)=p\log_bM

Why the product law works

Write M= b r M=b^r and N= b s N=b^s. The exponent law gives MN= b r + s MN=b^{r+s}, so the logarithm of the product is r+sr+s. Those are precisely the two individual logarithms.

log 2 ⁡(8⋅4)= log 2 ⁡8+ log 2 ⁡4=3+2=5\log_2(8\cdot4)=\log_2 8+\log_2 4=3+2=5

Conditions matter. The identity ln⁡( x 2 )=2ln⁡x\ln(x^2)=2\ln x requires x>0x>0. On the larger domain x≠0x\ne0, the correct real identity is ln⁡( x 2 )=2ln⁡|x|\ln(x^2)=2\ln|x|.

Solving a logarithmic equation

To solve log 2 ⁡(x−1)=3\log_2(x-1)=3, first require the argument to be positive: x−1>0x-1>0, so x>1x>1.

log 2 ⁡(x−1)=3 ⟺ x−1= 2 3 =8\log_2(x-1)=3\quad\Longleftrightarrow\quad x-1=2^3=8
x=9x=9

The input condition holds, and log 2 ⁡(9−1)= log 2 ⁡8=3\log_2(9-1)=\log_2 8=3 checks the solution. Always test candidates against the arguments in the original logarithmic equation.

Change of base

log b ⁡x= ln ⁡ x ln ⁡ b \log_b x=\frac{\ln x}{\ln b}

If y= log b ⁡xy=\log_b x, then b y =xb^y=x. Taking natural logarithms gives yln⁡b=ln⁡xy\ln b=\ln x; division by the non-zero value ln⁡b\ln b yields the formula.

log 2 ⁡8= ln ⁡ 8 ln ⁡ 2 =3\log_2 8=\frac{\ln8}{\ln2}=3

Any other valid logarithm base works in both numerator and denominator. The base must be the same in both places.

Common logarithm errors

There is no general rule turning a logarithm of a sum into a sum of logarithms. For example, log 10 ⁡(10+90)=2\log_{10}(10+90)=2, whereas log 10 ⁡10+ log 10 ⁡90= log 10 ⁡900\log_{10}10+\log_{10}90=\log_{10}900, which is not 2.

Keep the base, argument and output separate. log 2 ⁡8\log_2 8 asks for an exponent; it does not mean 8 / 28/2. A negative logarithm output is allowed, but zero or negative real arguments are not.

Finally, an exact logarithmic answer need not be replaced by a decimal. Use approximation only when the question or context requires it.

Practice questions

  1. Evaluate log 2 ⁡8\log _{2}8.

  2. Evaluate log 10 ⁡(0.01)\log_{10}(0.01).

  3. Solve log 2 ⁡(x−1)=3\log _{2}(x-1)=3.

Check your answers
  1. 33, since 2 3 =82^3=8.

  2. −2-2, since 10 − 2 =0.0110^{-2}=0.01.

  3. The argument condition is x>1x>1. Exponential form gives x−1=8x-1=8, so x=9x=9, which satisfies the condition.

Related topics

Check the inverse relationship in Exponential Functions; revisit Inverse Functions for branch and domain reasoning.

Sources and further reading