math.wiki
Functions › Logarithms › Definition of a logarithm
Open on the map
Algebra 2 · F.BF.B.5 · F.LE.A.4

Definition of a logarithm

The unknown is the exponent, as in 2 to the x equals 12. What number is x, and how do you even write it down?

Where you are 11 in Logarithms

When you reach for it

Some equations put the unknown where none of the usual tools can reach it. In

2^x = 12

the x is an exponent. Adding, subtracting, multiplying, dividing, squaring and taking roots all act on the number 2^x as a whole; none of them brings the x down out of the exponent. You can still say a good deal about the answer. Since 2^3 = 8 and 2^4 = 16, and powers of 2 grow as the exponent grows, x lies between 3 and 4. The graph shows there is exactly one such x.

x
y
1
2
12
\log_2 12
y = 2^x
Figure 1The line y = 12 meets y = 2^x exactly once. The x there is the exponent that turns 2 into 12, and \log_2 12 is its name.

What is missing is a name for that number. It is not a fraction you can write down, and it is not a root, so the notation so far has nothing to call it. The logarithm is that name: \log_2 12 means “the exponent that turns 2 into 12”. With it the equation is solved exactly,

x = \log_2 12 \approx 3.58

So reach for this rewrite whenever the unknown sits in an exponent, as in an exponential function asked “when does it reach this value?”. Reach for it in the other direction too: a statement about a logarithm is often easiest to understand, or to solve, once it is turned back into the power statement it stands for.

The procedure

The definition

Let b be a positive number other than 1, and let x be a positive number. The logarithm of x with base b, written \log_b x, is the exponent that b must be raised to in order to give x:

\log_b x = y \quad\text{means}\quad b^y = x

The two statements say exactly the same thing in two notations. The left one is the logarithmic form, the right one the exponential form. It is read “log base b of x equals y”. The number x is called the argument of the logarithm.

The three numbers keep their jobs when you switch forms, and that is the whole procedure.

  • The base b is the base in both. It sits low beside “log”, and it is the number being raised to a power.
  • The logarithm y is an exponent. It stands alone on one side of the logarithmic form and sits up in the exponent in the exponential form.
  • The argument x is the result of the power. It follows the “log”, and in the exponential form it is what the power equals.

A logarithm is an exponent. Every time you see \log_b x, you can ask “what power of b gives x?”, and the answer is the logarithm.

Why the definition gives exactly one number

For \log_b x to be one definite number, the equation b^y = x must have exactly one solution y. Two facts about exponential functions guarantee it when b > 0, b \neq 1 and x > 0.

There is at most one y. For b > 1 the powers b^y strictly increase as y increases, and for 0 < b < 1 they strictly decrease. Either way two different exponents never give the same power, so the function y \mapsto b^y is one-to-one.

There is at least one y. The powers b^y are always positive, and as y runs over every real number they take every positive value, with no gaps. This is what the picture above shows for base 2: any horizontal line above the x-axis meets the curve, and meets it once.

Because the exponential is one-to-one, it has an inverse function, and the logarithm with base b is that inverse. Switching between the two forms is the same move as switching between y = f(x) and x = f^{-1}(y) for any inverse pair.

Two special notations

Two bases are used so often that their logarithms have their own names.

  • The common logarithm has base 10 and is written without the base: \log x means \log_{10} x.
  • The natural logarithm has base e \approx 2.718, the base of the natural exponential function, and is written \ln x. So \ln x = y means e^y = x.

Both follow the definition exactly. Only the way the base is shown changes.

What the definition says straight away

Four facts follow from the definition and the rules for powers, with nothing else needed. For every allowed base b:

  • \log_b 1 = 0, because b^0 = 1, as the zero exponent rule says.
  • \log_b b = 1, because b^1 = b.
  • \log_b \left(b^y\right) = y for every real number y. The exponent that turns b into b^y is y itself.
  • b^{\log_b x} = x for every positive x. The number \log_b x is, by definition, the exponent that turns b into x, so raising b to it gives x.

The last two say that the exponential and the logarithm with the same base undo each other, which is what being inverse functions means.

Worked examples

Example 1

From logarithmic form to exponential form

Write each statement in exponential form.

(a) \log_5 625 = 4 (b) \displaystyle \log_9 3 = \frac{1}{2} (c) \displaystyle \log_2 \frac{1}{32} = -5 (d) \ln 20 = t

Solution

In each one, find the base, the logarithm (the exponent) and the argument (the result), then put them back in their places: base raised to the logarithm equals the argument.

(a) The base is 5, the logarithm is 4 and the argument is 625. So 5^4 = 625. As a check, 5^2 = 25 and 25^2 = 625.

(b) The base is 9, the logarithm is \displaystyle \frac{1}{2} and the argument is 3. So \displaystyle 9^{\frac{1}{2}} = 3. A power of \displaystyle \frac{1}{2} is a square root, by the meaning of unit fraction exponents, and \displaystyle \sqrt{9} = 3 is true. A logarithm does not have to be a whole number.

(c) The base is 2, the logarithm is -5 and the argument is \displaystyle \frac{1}{32}. So \displaystyle 2^{-5} = \frac{1}{32}, which is true because a negative exponent means the reciprocal: \displaystyle 2^{-5} = \frac{1}{2^5}. A logarithm can be negative even though its argument is positive.

(d) The natural logarithm has base e, so \ln 20 = t says e^t = 20.

Example 2

From exponential form to logarithmic form

Write each statement in logarithmic form.

(a) 4^3 = 64 (b) \displaystyle 6^{-2} = \frac{1}{36} (c) \displaystyle 32^{\frac{3}{5}} = 8 (d) \displaystyle 10^{\frac{1}{2}} = \sqrt{10}

Solution

Now the exponent is the number that ends up standing alone. The base goes under the “log” and the result of the power becomes the argument.

(a) The base is 4 and the exponent is 3, so \log_4 64 = 3.

(b) The base is 6 and the exponent is -2, so \displaystyle \log_6 \frac{1}{36} = -2.

(c) The base is 32 and the exponent is \displaystyle \frac{3}{5}, so \displaystyle \log_{32} 8 = \frac{3}{5}. The power is true: \displaystyle 32^{\frac{1}{5}} = 2 because 2^5 = 32, and then 2^3 = 8.

(d) The base is 10, so this is a common logarithm, and the base need not be written: \displaystyle \log \sqrt{10} = \frac{1}{2}.

Example 3

Finding the argument

Solve each equation for x.

(a) \log_3 x = 4 (b) \log_4 x = -3 (c) \displaystyle \log_{16} x = \frac{3}{4}

Solution

When the unknown is the argument, the exponential form hands it over directly, because the argument is what the power equals.

(a) \log_3 x = 4 means 3^4 = x, so x = 81.

(b) \log_4 x = -3 means \displaystyle x = 4^{-3} = \frac{1}{4^3} = \frac{1}{64}.

(c) \displaystyle \log_{16} x = \frac{3}{4} means \displaystyle x = 16^{\frac{3}{4}}. The fourth root of 16 is 2, because 2^4 = 16, and 2^3 = 8, so x = 8.

In every case the argument came out positive. It has to: a positive base raised to any power is positive.

Example 4

Finding the base

Solve each equation for b.

(a) \log_b 49 = 2 (b) \displaystyle \log_b 8 = \frac{3}{2} (c) \displaystyle \log_b 5 = \frac{1}{3}

Solution

(a) In exponential form, b^2 = 49. Squaring gives 49 for b = 7 and for b = -7, but a base must be positive, so -7 is not allowed. The answer is b = 7. Check: 7^2 = 49, so \log_7 49 = 2.

(b) In exponential form, \displaystyle b^{\frac{3}{2}} = 8. Raise both sides to the power \displaystyle \frac{2}{3}. By the power of a power law, \displaystyle \left(b^{\frac{3}{2}}\right)^{\frac{2}{3}} = b^{\frac{3}{2} \cdot \frac{2}{3}} = b^1 = b, which is safe here because b is positive. So

b = 8^{\frac{2}{3}} = \left(\sqrt[3]{8}\right)^2 = 2^2 = 4

Check: \displaystyle 4^{\frac{3}{2}} = \left(\sqrt{4}\right)^3 = 2^3 = 8.

(c) In exponential form, \displaystyle b^{\frac{1}{3}} = 5, which says the cube root of b is 5. Cubing both sides gives b = 5^3 = 125. Check: \displaystyle \sqrt[3]{125} = 5.

Example 5

When the argument is an expression

Solve each equation.

(a) \log_2(3x - 1) = 4 (b) \log_5(x^2 - 11) = 2

Solution

The argument is a whole expression, but the definition does not care: the base raised to the logarithm equals the argument, whatever the argument is.

(a) In exponential form, 3x - 1 = 2^4 = 16. Adding 1 to both sides gives 3x = 17, and dividing by 3 gives \displaystyle x = \frac{17}{3}. Check: \displaystyle 3 \cdot \frac{17}{3} - 1 = 16, and \log_2 16 = 4 because 2^4 = 16.

(b) In exponential form, x^2 - 11 = 5^2 = 25, so x^2 = 36 and x = 6 or x = -6. Both must be checked against the definition, which needs the argument to be positive. For x = 6 and for x = -6 alike, x^2 - 11 = 25, which is positive, and \log_5 25 = 2. Both solutions stand. It is the argument that must be positive, not x itself.

Example 6

An exponent you cannot write any other way

(a) Solve 3^x = 20 exactly, and say between which two whole numbers the answer lies.

(b) A game starts with a prize of 5 coins, and the prize doubles after every round, so after n rounds it is 5 \cdot 2^n coins. After how many rounds does the prize first reach at least 1000 coins?

Solution

(a) The statement 3^x = 20 is in exponential form with base 3, exponent x and result 20. In logarithmic form it reads

x = \log_3 20

That is the exact answer. To place it, look at nearby powers of 3: 3^2 = 9 and 3^3 = 27. Since 9 < 20 < 27 and the powers of 3 increase with the exponent, x is between 2 and 3. A calculator with a base key, or the method of Change of base, gives \log_3 20 \approx 2.73, and 3^{2.73} \approx 20.1, as close to 20 as a rounded exponent allows.

(b) The equation is 5 \cdot 2^n = 1000. The logarithm can only be read off once the power stands alone, so divide both sides by 5 first:

2^n = 200

In logarithmic form, n = \log_2 200 \approx 7.64. The number of rounds is a whole number, and the prize grows with every round, so the first whole number past 7.64 is the answer: 8 rounds. Check: after 7 rounds the prize is 5 \cdot 2^7 = 640 coins, short of 1000; after 8 it is 5 \cdot 2^8 = 1280 coins.

Example 7

Using the rewrite to find an inverse function

Find the inverse of f(x) = 5^{x-1} + 2, and state its domain.

Solution

Write y = 5^{x-1} + 2 and solve for x. Subtract 2 from both sides so that the power stands alone:

y - 2 = 5^{x-1}

This is exponential form with base 5, exponent x - 1 and result y - 2. In logarithmic form,

x - 1 = \log_5(y - 2)

and adding 1 gives x = 1 + \log_5(y - 2). Swapping the letters to name the inverse as a function of x,

f^{-1}(x) = 1 + \log_5(x - 2)

The argument x - 2 must be positive, so the domain of f^{-1} is x > 2. That matches the original function: 5^{x-1} is always positive, so f(x) is always greater than 2, and the range of f is the domain of f^{-1}. Check with a value: f(3) = 5^2 + 2 = 27, and f^{-1}(27) = 1 + \log_5 25 = 1 + 2 = 3.

Boundaries

The base must be positive and not 1. For b = 1, every power 1^y equals 1, so \log_1 1 would be every number at once and \log_1 5 would be no number at all; neither is a single value. A base of 0 fails the same way, since 0^y is 0 for every positive y and is undefined otherwise. A negative base fails because its powers are not real numbers for many exponents: \displaystyle (-2)^{\frac{1}{2}} would be a square root of -2. Only with b > 0 and b \neq 1 does every positive argument have exactly one logarithm.

The argument must be positive. Every power of a positive base is positive, so no real exponent turns b into 0 or a negative number. \log_b 0 and \log_b(-4) have no real value. (Among the complex numbers logarithms of negative numbers do exist, but they are outside real algebra.)

The logarithm itself may be any real number. Positive, negative, zero or a fraction: the restriction is on the base and the argument, never on the value. \displaystyle \log_2 \frac{1}{32} = -5 and \displaystyle \log_9 3 = \frac{1}{2} are as good as \log_5 625 = 4.

The rewrite is an equivalence only inside these conditions. When an equation is solved by switching forms, the switch itself never introduces an error, but a value found for a base or argument must still be allowed. A base solution that is negative, zero or 1 is rejected, and a value of x that makes an argument zero or negative is rejected. Such answers are taken up in solving logarithmic equations.

The power must stand alone before you switch. 5 \cdot 2^n = 1000 is not the exponential form of anything; 2^n = 200 is. Isolate the power first.

Where this goes next

With logarithms named, they can be worked out. Evaluating a logarithm asks “what power of the base gives this number?” and answers it for numbers that work out exactly, and for common and natural logarithms on a calculator. The laws of logarithms are the laws of exponents read through this definition: since powers with the same base multiply by adding exponents, logarithms turn products into sums. The graph of a logarithm is the graph of the exponential reflected in the line y = x, exactly as for any inverse function. And when the power cannot be isolated as neatly as 2^n = 200, taking a logarithm of both sides brings the exponent down, while Change of base turns any base into one a calculator has.

Exercises

Write in exponential form

  1. \log_2 128 = 7
  2. \displaystyle \log_3 \frac{1}{81} = -4
  3. \displaystyle \log_{125} 5 = \frac{1}{3}
  4. \log 100{,}000 = 5

Write in logarithmic form

  1. 3^5 = 243
  2. \displaystyle 2^{-4} = \frac{1}{16}
  3. \displaystyle 100^{\frac{3}{2}} = 1000
  4. 10^{-2} = 0.01
  5. e^k = 9

Find the unknown

  1. \log_6 x = 3
  2. \log_3 x = -2
  3. \displaystyle \log_{36} x = \frac{1}{2}
  4. \displaystyle \log_8 x = \frac{5}{3}
  5. \log_b 64 = 3
  6. \log_b 81 = 4
  7. \displaystyle \log_b 4 = \frac{2}{5}
  8. \log_7(2x + 3) = 2
  9. \log_2(x^2 + 7) = 4

When the exponent is unknown

  1. Solve 5^x = 40 exactly, say between which two whole numbers x lies, and give x to two decimal places.
  2. Solve 3 \cdot 10^x = 750 exactly, and give x to two decimal places.
  3. Between which two whole numbers does \log_2 1000 lie? Explain without a calculator.
  4. Find the inverse of g(x) = 4^{x+2}, and state its domain.
  5. A patch of pond weed covers 2 square meters and triples in area every week, so after t weeks it covers 2 \cdot 3^t square meters. Find, exactly and to two decimal places, the time at which it covers 150 square meters.

Reasoning

  1. Explain why \log_1 5 has no value, and why \log_b 1 = 0 for every allowed base b.
  2. Explain why \log_2(-8) has no real value while \displaystyle \log_2 \frac{1}{8} does, and find the second.
  3. Use the definition to show that b^{\log_b x} = x for every positive x, and that \log_b\left(b^y\right) = y for every real y.
  4. Bastien writes \log_{-2} 4 = 2, because (-2)^2 = 4. Explain why the definition does not allow the base -2, even though this one power works.
Answers
  1. 2^7 = 128. The base 2 raised to the logarithm 7 gives the argument 128.
  2. \displaystyle 3^{-4} = \frac{1}{81}. True, since \displaystyle 3^{-4} = \frac{1}{3^4}.
  3. \displaystyle 125^{\frac{1}{3}} = 5. That is, the cube root of 125 is 5.
  4. 10^5 = 100{,}000. The common logarithm has base 10.
  5. \log_3 243 = 5. The exponent 5 stands alone; the base 3 goes under the log.
  6. \displaystyle \log_2 \frac{1}{16} = -4.
  7. \displaystyle \log_{100} 1000 = \frac{3}{2}. True, since \displaystyle 100^{\frac{1}{2}} = 10 and 10^3 = 1000.
  8. \log 0.01 = -2. Base 10, so the base is not written.
  9. \ln 9 = k. The base is e, so the logarithm is the natural one.
  10. x = 216. In exponential form x = 6^3 = 216.
  11. \displaystyle x = \frac{1}{9}. In exponential form \displaystyle x = 3^{-2} = \frac{1}{9}.
  12. x = 6. \displaystyle x = 36^{\frac{1}{2}} = \sqrt{36} = 6.
  13. x = 32. \displaystyle x = 8^{\frac{5}{3}} = \left(\sqrt[3]{8}\right)^5 = 2^5 = 32.
  14. b = 4. b^3 = 64, and the only real cube root of 64 is 4.
  15. b = 3. b^4 = 81 gives b = 3 or b = -3, and a base must be positive.
  16. b = 32. \displaystyle b^{\frac{2}{5}} = 4; raising both sides to the power \displaystyle \frac{5}{2} gives \displaystyle b = 4^{\frac{5}{2}} = 2^5 = 32. Check: \displaystyle 32^{\frac{2}{5}} = 2^2 = 4.
  17. x = 23. 2x + 3 = 7^2 = 49, so 2x = 46. The argument is 49, which is positive.
  18. x = 3 or x = -3. x^2 + 7 = 2^4 = 16, so x^2 = 9. For both values the argument is 16, which is positive.
  19. x = \log_5 40 \approx 2.29. It lies between 2 and 3 because 5^2 = 25 < 40 < 125 = 5^3.
  20. x = \log 250 \approx 2.40. Divide by 3 first: 10^x = 250, then switch to logarithmic form. It lies between 2 and 3, since 100 < 250 < 1000.
  21. Between 9 and 10. 2^9 = 512 and 2^{10} = 1024, and 512 < 1000 < 1024; powers of 2 increase with the exponent, so the exponent giving 1000 is between 9 and 10.
  22. g^{-1}(x) = \log_4 x - 2, for x > 0. From y = 4^{x+2}, logarithmic form gives x + 2 = \log_4 y, so x = \log_4 y - 2. The argument must be positive, which matches the range of g. Check: g(1) = 4^3 = 64 and \log_4 64 - 2 = 3 - 2 = 1.
  23. t = \log_3 75 \approx 3.93 weeks. From 2 \cdot 3^t = 150, divide by 2: 3^t = 75, then switch to logarithmic form. It is just under 4 weeks, since 3^4 = 81.
  24. \log_1 5 would be an exponent y with 1^y = 5, but every power of 1 equals 1, so no such y exists. For any allowed base, b^0 = 1, so the exponent that turns b into 1 is 0; it is the only one, because the exponential is one-to-one.
  25. \displaystyle \log_2 \frac{1}{8} = -3, since \displaystyle 2^{-3} = \frac{1}{8}. But \log_2(-8) would need 2^y = -8, and every power of 2 is positive, so no real y works.
  26. By definition \log_b x is the exponent that turns b into x, so raising b to it gives x: b^{\log_b x} = x. For the second, \log_b\left(b^y\right) = z means b^z = b^y, and since two different exponents never give the same power of b, z = y.
  27. The definition needs every positive argument to have exactly one logarithm, and with base -2 that fails. Powers such as \displaystyle (-2)^{\frac{1}{2}} = \sqrt{-2} are not real numbers, and the powers (-2)^n for integers n alternate in sign, so a positive number like 2 is never a real power of -2: \log_{-2} 2 would have no value. A base is allowed only if it works for every positive argument, which is why the base must be positive.
kg1128 · updated 2026-10-19 · CC-BY-SA-4.0