Skip to content
Mathematics

Logarithms

Find the exponent, understand why logarithms are useful, and derive their rules from the laws of powers. Explore the graph and check your understanding with worked examples.

What is a logarithm?

A logarithm answers: to what power must we raise a given base to get this number? Exponentiation starts with a base and an exponent; logarithms recover the exponent from the result.

a ⁣log⁡x=t⟺at=x{}^{a}\!\log x=t\quad\Longleftrightarrow\quad a^t=x

Here aa is the base, xx is the argument, and tt is the exponent. For example:

23=8⟺2 ⁣log⁡8=32^3=8\quad\Longleftrightarrow\quad {}^{2}\!\log 8=3

This page uses Indonesian notation, with the base at the upper left. International notation writes the same base as a subscript:

a ⁣log⁡x=log⁡ax{}^{a}\!\log x=\log_a x

Conditions for real logarithms

a>0,a≠1,x>0a>0,\qquad a\ne1,\qquad x>0

A valid positive base has positive powers, so a real logarithm cannot take zero or a negative number as its argument. Base one always produces one and cannot identify a unique exponent. Negative bases do not give a real exponential function for every real exponent. The logarithm’s output can be any real number, including zero and negative values.

2 ⁣log⁡1=0,2 ⁣log⁡14=−2{}^{2}\!\log 1=0,\qquad {}^{2}\!\log\frac14=-2

Why do logarithms exist?

Logarithms fill the gap when the unknown is an exponent. They also convert multiplication into addition and make quantities spanning many orders of magnitude easier to compare.

Find time in a growth model

If a population doubles each period, logarithms tell us how many periods it takes to reach ten times its starting size.

2t=102^t=10
t=2 ⁣log⁡10≈3.322t={}^{2}\!\log 10\approx3.322

Turn products into sums

Before electronic calculators, logarithm tables turned long multiplication and division into addition and subtraction. Exponent laws explain why this works.

102⋅103=102+310^2\cdot10^3=10^{2+3}

Compare multiplicative changes

Equal ratios become equal differences. Sound levels use this idea: multiplying intensity by ten adds ten decibels, relative to a fixed positive reference intensity.

L=10log⁡II0L=10\log\frac{I}{I_0}

Common logarithms and natural logarithms

In this lesson, a logarithm without a written base means base ten. The natural logarithm uses Euler’s number as its base and is written with its own symbol. Base two is useful for repeated doubling and binary information.

log⁡x=10 ⁣log⁡x,ln⁡x=e ⁣log⁡x\log x={}^{10}\!\log x,\qquad \ln x={}^{e}\!\log x
e≈2.71828,ln⁡e=1e\approx2.71828,\qquad \ln e=1

Always check the base convention in the context you are reading. Changing the base changes the output, but every valid base follows the same rules.

Explore the logarithmic graph

Choose a base and move the input. Compare increasing and decreasing curves, then show the exponential inverse.

y=2 ⁣log⁡xy={}^{2}\!\log x

The solid blue curve is the logarithm. It passes through (1,0)(1,0) and approaches the vertical asymptote x=0x=0 without reaching it.

Choose a base

The input stays positive so the logarithm is defined.

Find the exponent

2 ⁣log⁡4≈2{}^{2}\!\log 4\approx2

Raising this base to the displayed exponent gives the input, approximately. Displayed outputs are rounded to three decimals.

Increasing

With a base greater than one, larger inputs give larger logarithms.

Common rules — sifat-sifat logaritma

Every rule below comes from the definition and exponent laws. Unless stated otherwise, a,b>0a,b>0 and a,b≠1a,b\ne1 whenever used as bases, arguments x,y,c>0x,y,c>0, and powers are real. Open any derivation to follow the steps.

  1. 1. Logarithm of one and of the base

    a ⁣log⁡1=0,a ⁣log⁡a=1{}^{a}\!\log 1=0,\qquad {}^{a}\!\log a=1

    Ask which exponent produces one, then which produces the base itself.

    Show derivation
    1. a0=1⟹a ⁣log⁡1=0a^0=1\quad\Longrightarrow\quad {}^{a}\!\log 1=0
    2. a1=a⟹a ⁣log⁡a=1a^1=a\quad\Longrightarrow\quad {}^{a}\!\log a=1

    Example

    7 ⁣log⁡1=0,7 ⁣log⁡7=1{}^{7}\!\log 1=0,\qquad {}^{7}\!\log 7=1
  2. 2. Inverse identities

    a ⁣log⁡(at)=t,aa ⁣log⁡x=x{}^{a}\!\log(a^t)=t,\qquad a^{{}^{a}\!\log x}=x

    Exponentiation and logarithms undo each other when the bases match. The exponent can be any real number.

    Show derivation
    1. at=x⟺a ⁣log⁡x=ta^t=x\quad\Longleftrightarrow\quad {}^{a}\!\log x=t
    2. a ⁣log⁡(at)=t{}^{a}\!\log(a^t)=t
    3. aa ⁣log⁡x=at=xa^{{}^{a}\!\log x}=a^t=x

    Example

    2 ⁣log⁡(2−3)=−3,22 ⁣log⁡5=5{}^{2}\!\log(2^{-3})=-3,\qquad 2^{{}^{2}\!\log 5}=5
  3. 3. Product rule — sifat perkalian

    a ⁣log⁡(xy)=a ⁣log⁡x+a ⁣log⁡y{}^{a}\!\log(xy)={}^{a}\!\log x+{}^{a}\!\log y

    Multiplying powers with the same base adds their exponents. Here both factors must be positive.

    Show derivation
    1. u=a ⁣log⁡x,v=a ⁣log⁡yu={}^{a}\!\log x,\quad v={}^{a}\!\log y
    2. x=au,y=avx=a^u,\quad y=a^v
    3. xy=auav=au+vxy=a^u a^v=a^{u+v}
    4. a ⁣log⁡(xy)=u+v{}^{a}\!\log(xy)=u+v

    Example

    2 ⁣log⁡(4⋅8)=2+3=5{}^{2}\!\log(4\cdot8)=2+3=5
  4. 4. Quotient rule — sifat pembagian

    a ⁣log⁡xy=a ⁣log⁡x−a ⁣log⁡y{}^{a}\!\log\frac{x}{y}={}^{a}\!\log x-{}^{a}\!\log y

    Dividing powers with the same base subtracts their exponents. Both numerator and denominator must be positive.

    Show derivation
    1. u=a ⁣log⁡x,v=a ⁣log⁡yu={}^{a}\!\log x,\quad v={}^{a}\!\log y
    2. xy=auav=au−v\frac{x}{y}=\frac{a^u}{a^v}=a^{u-v}
    3. a ⁣log⁡xy=u−v{}^{a}\!\log\frac{x}{y}=u-v

    Example

    3 ⁣log⁡813=4−1=3{}^{3}\!\log\frac{81}{3}=4-1=3
  5. 5. Power rule — sifat perpangkatan

    a ⁣log⁡(xr)=r a ⁣log⁡x{}^{a}\!\log(x^r)=r\,{}^{a}\!\log x

    Raising a power to another power multiplies the exponents. This holds for any real exponent when the argument is positive.

    Show derivation
    1. u=a ⁣log⁡x⟹x=auu={}^{a}\!\log x\quad\Longrightarrow\quad x=a^u
    2. xr=(au)r=aurx^r=(a^u)^r=a^{ur}
    3. a ⁣log⁡(xr)=ur=r a ⁣log⁡x{}^{a}\!\log(x^r)=ur=r\,{}^{a}\!\log x

    Example

    2 ⁣log⁡(82)=2⋅3=6{}^{2}\!\log(8^2)=2\cdot3=6
  6. 6. Root rule — sifat akar

    a ⁣log⁡xn=1n a ⁣log⁡x{}^{a}\!\log\sqrt[n]{x}=\frac{1}{n}\,{}^{a}\!\log x

    A root is a fractional power, so this follows directly from the power rule. The root index is a positive integer.

    Show derivation
    1. xn=x1/n\sqrt[n]{x}=x^{1/n}
    2. a ⁣log⁡xn=a ⁣log⁡(x1/n){}^{a}\!\log\sqrt[n]{x}={}^{a}\!\log(x^{1/n})
    3. a ⁣log⁡(x1/n)=1n a ⁣log⁡x{}^{a}\!\log(x^{1/n})=\frac{1}{n}\,{}^{a}\!\log x

    Example

    2 ⁣log⁡16=12⋅4=2{}^{2}\!\log\sqrt{16}=\frac12\cdot4=2
  7. 7. Reciprocal argument

    a ⁣log⁡1x=−a ⁣log⁡x{}^{a}\!\log\frac1x=-{}^{a}\!\log x

    Taking the reciprocal changes the sign of the exponent. This is the power rule with exponent negative one.

    Show derivation
    1. 1x=x−1\frac1x=x^{-1}
    2. a ⁣log⁡(x−1)=−a ⁣log⁡x{}^{a}\!\log(x^{-1})=-{}^{a}\!\log x

    Example

    2 ⁣log⁡18=−3{}^{2}\!\log\frac18=-3
  8. 8. Change of base — perubahan basis

    a ⁣log⁡x=b ⁣log⁡xb ⁣log⁡a{}^{a}\!\log x=\frac{{}^{b}\!\log x}{{}^{b}\!\log a}

    Use any valid new base. The denominator is nonzero because the original base is not one. This is how a calculator evaluates other bases with natural logarithms.

    Show derivation
    1. t=a ⁣log⁡x⟹at=xt={}^{a}\!\log x\quad\Longrightarrow\quad a^t=x
    2. b ⁣log⁡(at)=b ⁣log⁡x{}^{b}\!\log(a^t)={}^{b}\!\log x
    3. t b ⁣log⁡a=b ⁣log⁡xt\,{}^{b}\!\log a={}^{b}\!\log x
    4. t=b ⁣log⁡xb ⁣log⁡at=\frac{{}^{b}\!\log x}{{}^{b}\!\log a}

    Example

    2 ⁣log⁡8=ln⁡8ln⁡2=3{}^{2}\!\log 8=\frac{\ln 8}{\ln 2}=3
  9. 9. Reciprocal bases

    a ⁣log⁡b=1b ⁣log⁡a{}^{a}\!\log b=\frac{1}{{}^{b}\!\log a}

    Swapping a valid base and a valid argument gives the reciprocal. Both numbers must be positive and different from one.

    Show derivation
    1. a ⁣log⁡b=b ⁣log⁡bb ⁣log⁡a{}^{a}\!\log b=\frac{{}^{b}\!\log b}{{}^{b}\!\log a}
    2. b ⁣log⁡b=1{}^{b}\!\log b=1
    3. a ⁣log⁡b=1b ⁣log⁡a{}^{a}\!\log b=\frac{1}{{}^{b}\!\log a}

    Example

    2 ⁣log⁡8=3,8 ⁣log⁡2=13{}^{2}\!\log 8=3,\qquad {}^{8}\!\log 2=\frac13
  10. 10. Chain rule for bases

    (a ⁣log⁡b)(b ⁣log⁡c)=a ⁣log⁡c({}^{a}\!\log b)({}^{b}\!\log c)={}^{a}\!\log c

    An intermediate base cancels through change of base. The intermediate number must be a valid base; the final argument only needs to be positive.

    Show derivation
    1. b ⁣log⁡c=a ⁣log⁡ca ⁣log⁡b{}^{b}\!\log c=\frac{{}^{a}\!\log c}{{}^{a}\!\log b}
    2. (a ⁣log⁡b)a ⁣log⁡ca ⁣log⁡b=a ⁣log⁡c({}^{a}\!\log b)\frac{{}^{a}\!\log c}{{}^{a}\!\log b}={}^{a}\!\log c

    Example

    (2 ⁣log⁡8)(8 ⁣log⁡64)=3⋅2=6({}^{2}\!\log 8)({}^{8}\!\log 64)=3\cdot2=6
  11. 11. Powers in the base and argument

    ap ⁣log⁡(xq)=qp a ⁣log⁡x{}^{a^p}\!\log(x^q)=\frac{q}{p}\,{}^{a}\!\log x

    Combine change of base with the power rule. The exponent on the base must be nonzero, otherwise the new base would be one.

    Show derivation
    1. ap ⁣log⁡(xq)=a ⁣log⁡(xq)a ⁣log⁡(ap){}^{a^p}\!\log(x^q)=\frac{{}^{a}\!\log(x^q)}{{}^{a}\!\log(a^p)}
    2. a ⁣log⁡(xq)=q a ⁣log⁡x{}^{a}\!\log(x^q)=q\,{}^{a}\!\log x
    3. a ⁣log⁡(ap)=p≠0{}^{a}\!\log(a^p)=p\ne0
    4. ap ⁣log⁡(xq)=qp a ⁣log⁡x{}^{a^p}\!\log(x^q)=\frac{q}{p}\,{}^{a}\!\log x

    Example

    4 ⁣log⁡8=32 2 ⁣log⁡2=32{}^{4}\!\log 8=\frac32\,{}^{2}\!\log 2=\frac32
  12. 12. Equal logarithms, equal arguments

    a ⁣log⁡x=a ⁣log⁡y⟺x=y{}^{a}\!\log x={}^{a}\!\log y\quad\Longleftrightarrow\quad x=y

    For the same valid base, each output corresponds to exactly one positive input. This lets you solve logarithmic equations after checking the domain.

    Show derivation
    1. a ⁣log⁡x=a ⁣log⁡y=t{}^{a}\!\log x={}^{a}\!\log y=t
    2. x=at,y=at⟹x=yx=a^t,\quad y=a^t\quad\Longrightarrow\quad x=y
    3. x=y⟹a ⁣log⁡x=a ⁣log⁡yx=y\quad\Longrightarrow\quad {}^{a}\!\log x={}^{a}\!\log y

    Example

    3 ⁣log⁡(x+1)=3 ⁣log⁡5⟹x=4{}^{3}\!\log(x+1)={}^{3}\!\log 5\quad\Longrightarrow\quad x=4

Order and logarithmic inequalities

For a base greater than one, exponential powers grow as the exponent increases. Their logarithmic inverse therefore preserves order. A base between zero and one gives decreasing powers, so its inverse reverses order. Both arguments must be positive.

a>1:x<y ⟺ a ⁣log⁡x<a ⁣log⁡ya>1:\quad x<y\ \Longleftrightarrow\ {}^{a}\!\log x<{}^{a}\!\log y
0<a<1:x<y ⟺ a ⁣log⁡x>a ⁣log⁡y0<a<1:\quad x<y\ \Longleftrightarrow\ {}^{a}\!\log x>{}^{a}\!\log y

For example, the decreasing base reverses the inequality below. Combine the resulting bound with the original domain condition.

1/2 ⁣log⁡x>2⟺0<x<14{}^{1/2}\!\log x>2\quad\Longleftrightarrow\quad 0<x<\frac14

Common mistakes

A sum inside a logarithm does not split

The product rule follows from multiplying powers. There is no matching exponent law that turns a sum of arguments into a sum of logarithms. A counterexample is enough to show why that proposed rule fails.

2 ⁣log⁡(4+4)=3≠4=2 ⁣log⁡4+2 ⁣log⁡4{}^{2}\!\log(4+4)=3\ne4={}^{2}\!\log4+{}^{2}\!\log4

Check the original domain before combining

A positive product does not guarantee that each factor is positive. Keep the separate domain conditions when combining logarithms. Also, the power rule above assumes a positive argument; for a squared nonzero real value the correct expansion uses absolute value.

a ⁣log⁡(x2)=2 a ⁣log⁡∣x∣,x≠0{}^{a}\!\log(x^2)=2\,{}^{a}\!\log|x|,\qquad x\ne0

A logarithm is not a factor you can cancel

Logarithms are functions. Use change of base for a quotient of logarithms; dividing their arguments gives a different expression.

log⁡100log⁡10=2,log⁡10010=1\frac{\log100}{\log10}=2,\qquad \log\frac{100}{10}=1

Try it yourself

Work out each answer, then reveal the solution.

  1. 1. Evaluate a fractional argument

    3 ⁣log⁡127{}^{3}\!\log\frac1{27}
    Show solution
    1. 127=3−3\frac1{27}=3^{-3}
    2. 3 ⁣log⁡127=−3{}^{3}\!\log\frac1{27}=-3

    A logarithm can be negative. Its argument must still be positive.

  2. 2. Expand a combined expression

    a ⁣log⁡x2yz{}^{a}\!\log\frac{x^2\sqrt y}{z}
    Show solution
    1. a ⁣log⁡(x2)+a ⁣log⁡y−a ⁣log⁡z{}^{a}\!\log(x^2)+{}^{a}\!\log\sqrt y-{}^{a}\!\log z
    2. 2 a ⁣log⁡x+12 a ⁣log⁡y−a ⁣log⁡z2\,{}^{a}\!\log x+\frac12\,{}^{a}\!\log y-{}^{a}\!\log z

    Assume all three variables are positive. Apply quotient, product, and power rules in that order.

  3. 3. Solve an exponential equation

    32t−1=73^{2t-1}=7
    Show solution
    1. 2t−1=3 ⁣log⁡72t-1={}^{3}\!\log 7
    2. t=1+3 ⁣log⁡72≈1.386t=\frac{1+{}^{3}\!\log 7}{2}\approx1.386

    Take the logarithm with the same base to bring the unknown exponent down.

  4. 4. Solve and reject the invalid root

    2 ⁣log⁡x+2 ⁣log⁡(x−2)=3{}^{2}\!\log x+{}^{2}\!\log(x-2)=3
    Show solution
    1. x>0,x−2>0⟹x>2x>0,\quad x-2>0\quad\Longrightarrow\quad x>2
    2. 2 ⁣log⁡(x(x−2))=3{}^{2}\!\log\bigl(x(x-2)\bigr)=3
    3. x(x−2)=8x(x-2)=8
    4. x2−2x−8=(x−4)(x+2)=0x^2-2x-8=(x-4)(x+2)=0
    5. x=4orx=−2x=4\quad\text{or}\quad x=-2
    6. x>2⟹x=4x>2\quad\Longrightarrow\quad x=4

    Check the original arguments separately. The negative root makes both logarithms undefined over the reals, even though their product is positive.

Further reading

For additional explanations and practice: