Skip to main content
Mathematics LibreTexts

1.5: Logarithms and Exponential Functions

  • Page ID
    62176
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    In this section, we will discuss logarithmic functions and exponential functions. The exponent rules we learned last section also apply to the exponents we see in exponential functions, so here we will focus on the relationship between exponential and logarithmic functions. As we mentioned previously, these functions are inverses of each other, in the same sense that square roots and squaring are inverses of each other.

    Logarithmic functions and exponential functions are both used to describe many applications such as population growth and value of investments over time. Logarithmic are very prevalent in later courses like differential equations, so a solid understanding of their properties now will help you prepare for these later courses.

    1.5.1: The Relationship Between Logarithmic and Exponential Functions

    We saw earlier that an exponential function is any function of the form \(f(x)=b^x\), where \(b>0\) and \(b\neq1\). A logarithmic function is any function of the form \(g(x)=\log_b{(x)}\), where \(b>0\) and \(b\neq1\). It is no coincidence that both forms have the same restrictions on \(b\) because they are inverses of each other. This means that, for the same value of \(b\), \(b^{\log_b{(x)}}=x\) for \(x>0\) and \(\log_b{b^x}=x\).

    We also discussed two commonly used logarithmic functions that have special notation. The logarithmic function \(f(x)=\log{(x)}\) is a special way of writing \(f(x)=\log_{10}{(x)}\) and \(g(x)=\ln{x}\) is a special way of writing \(g(x)=\log_e{(x)}\). These also have special names; \(\log{(x)}\) is called the common logarithm and \(\ln{(x)}\) is called the natural logarithm. Note that \(e\) is just a number: \(e \approx 2.71828\); \(e\) is an irrational number, just like \(\pi\), meaning it can’t be written as a fraction of whole numbers.

    Let’s look at some concrete examples to help illustrate this relationship. Let’s look at \(b=2\). For \(b=2\), \(f(x)=2^x\). Then, we can see that \(f(3)=2^3 = 8\). Since they are inverse functions, \(g(8) = \log_2{(8)} =3\). In general this is explained as:

    \[ \text{If }a=b^c \text{, then }c=\log_b{(a)}. \label{log}\]

    Another way of thinking about it is to use the question “y is b raised to what power?” when you see \(\log_b{(y)}\). For example, when we see \(\log_2{(16)}\), we ask “16 is 2 raised to what power?” Through a bit of guess and check we get \(2^1=2\), \(2^2=4\), \(2^3=8\), and \(2^4=16\). This tells us that 2 raised to the 4\(^{th}\) power gives us 16, so \(\log_2{(16)}=4\). Let’s look at a few more examples.

    Example \(\PageIndex{1}\): Evaluating Logarithmic Functions

    Evaluate each of the following statements:

    \[\begin{array}{lll}{\text{1. }\log_{3}(9)}&{\qquad}&{\text{4. }\log_{2}(2)} \\ {\text{2. }\log_{3}\left(\frac{1}{9}\right)}&{\qquad}&{\text{5. }\log_{2}\left(\frac{1}{2}\right)} \\ {\text{3. }\log_{9}(3)}&{\qquad}&{\text{6. }\log_{2}1}\end{array}\nonumber\]

    Solution

    We’ll work on these one at a time.

    1. For this statement, we are answering the question “9 is 3 raised to what power?” We can see through a little bit of trial and error that \(3^2=9\), so we get that
      \[\log_{3}(9)=2\]
    2. For this statement, we are answering the question “\(\frac{1}{9}\) is 3 raised to what power?” We saw in the previous question that \(\log_3{(9)} = 2\) which gives us a hint that our answer is related to 2, but that we need \(3^2\) to be in the denominator. Since \(3^{-2} = \frac{1}{9}\), we get that
      \[\log_{3}\left(\frac{1}{9}\right)=-2\]
    3. For this statement, we have a different base. Here our base is 9, so we are answering the question “3 is 9 raised to what power?” You may recognize that \(\sqrt{9}=3\); we saw in our last section that another way of writing \(\sqrt{9}\) is \(9^{1/2}\). This tells us that
      \[\log_{9}(3)=\frac{1}{2}\]
    4. For this statement, we are answering the question “2 is 2 raised to what power?” We can quickly see that \(2^1=2\), so we get that
      \[\log_{2}(2)=1\]
    5. For this statement, we are answering the question “\(\frac{1}{2}\) is 2 raised to what power?” This one is a bit tricky, but we’ve seen something similar in question 2. In question 2, we saw that because we had a fraction with a power of 3 (the base we were working with) in the denominator, that our final answer was negative. Here if we try \(2^{-1}\), we get \(\frac{1}{2}\). This tells us that
      \[\log_{2}\left(\frac{1}{2}\right)=-1\]
    6. For this statement, we are answering the question “1 is 2 raised to what power?” We know our answer can’t be a positive integer because 2 raised to a positive integer gets bigger, and we know it can’t be a negative integer since 2 raised to a negative integer gives numbers less than 1. Let’s see what happens if we try zero: \(2^0=1\), so we have that
      \[\log_{2}(1)=0\]

    We recommend looking through these questions and identifying patterns. When did we get a positive answer? When did we get a negative answer? When did we get a fractional answer? Can you try out some similar problems and see if your answers fit the patterns you identified? We didn’t have any answers that were negative fractions; can you come up with such a problem? Notice that all of our questions had positive inputs; it is not possible to find an answer with a negative input. Why? Let’s think back to the question we asked for each problem above. If we try to evaluate \(\log_2{(-2)}\) we would ask “-2 is 2 raised to what power?” Is there an exponent, say \(x\), where \(2^x=-2\)? No! We can’t take a positive number and raise it to a power and end up with a negative number.

    1.5.2: Logarithm Rules​​​​​​

    We have five main rules that we will need to use when working with logarithms. These rules are all based off of the rules we have for exponents. Be sure to be careful of the details in each of these rules; in some of them all of the logarithms have the same base, but in others the base changes to show the relationship between different logarithmic functions. As we have already seen, the base plays a big role in the specific meaning of the function, so be aware of the rules that have the same base everywhere and the rules where the base changes. Additionally, remember that every base must be positive and not equal to one; also, all inputs must be positive.

    • \(\log_b{(x^a)} = a \log_b{(x)}\)

    • \(\log_b{(xy)} = \log_b{(x)} + \log_b{(y)}\)

    • \(\displaystyle \log_b{\Bigg( \frac{x}{y} \Bigg)} = \log_b{(x)} - \log_b{(y)}\)

    • \(\displaystyle \log_a{(b)} = \frac{1}{\log_b{(a)}}\)

    • \(\displaystyle \log_b{(x)} = \frac{\log_c{(x)}}{\log_c{(b)}}\)

    All of these rules can be used in either direction; you can start with the form on the left and rewrite as the form on the right or you can start with the form on the right and rewrite as the form on the left. We won’t explain all of these in detail, but we will illustrate examples for the first two.

    With the first rule, we can get insight from the question we used earlier to evaluate our logarithms. We’ll look at a concrete example rather than a general case. Suppose we want to evaluate \(\log_2{(8^4)}\). Before we get to our question, let’s rewrite this a bit. We can write \(\log_2{(8^4)}=\log_2{((2^3)^4)}\) since \(8=2^3\). Next, we can use our exponent rules to get \(\log_2{((2^3)^4)} = \log_2{(2^{12})}\). Now, answering our question “ \(2^{12}\) is 2 raised to what power?,” we get 12. So, overall, we have \(\log_2{(8^4)} = 12\). Now, working on the other side, we have \[\begin{align}\begin{aligned}\begin{split} 12 &= 4 \times 3 \\ &= 4 \log_2{(8)} \end{split}\end{aligned}\end{align}\] Putting both pieces together, we have \(\log_2{(8^4)} = 4\log_2{(8)}\).

    The second rule also follows from exponent rules. Let’s take a look:

    \[\begin{align}\begin{aligned}\begin{split} \log_2{(2^3)} + \log_2{(2^4)} & = 3 + 4 \text{ from the definition of log base 2}\\ & = 7 \\ & = \log_2{(2^7)} \\ & = \log_2{(2^3\times 2^4)} \text{ from our exponent rules} \end{split}\end{aligned}\end{align}\]

    We illustrated each of these rules using some easy to work with values, but they are true for all values, as long as we have a positive base that is not one and avoid negative inputs. The other rules can all be illustrated in similar ways. (Note: you may want to try to come up with your own examples for these rules to help you understand why these rules are true.) Let’s look at an example where we put these rules to use.

    Example \(\PageIndex{2}\): Combining Logarithms

    Write \(5\log_2{(x)} + 3\log_2{(2y)}\) as a single logarithm.

    Solution

    Currently, this term is the sum of two logarithms, both with the same base, and we want to write it as a single logarithm. It looks like we may want to start with the second rule, \(\log_b{(xy)} =\log_b{(x)} + \log_b{(y)}\). It looks like we are already in the form on the right side. However, there is one issue. Currently, both of our logarithms are multiplied by a constant, and the second rule doesn’t have coefficients on the logarithms. We’ll need to use the first rule to move these coefficients inside of the logarithms before we use the second rule. We get

    \[\begin{align}\begin{aligned}\begin{split} 5\log_2{(x)} + 3\log_2{(2y)} & = \log_2{(x^5)} + \log_2{((2y)^3)} \\ & = \log_2{(x^5)} + \log_2{(8y^3)} \\ & = \log_2{[(x^5)(8y^3)]} \\ & = \log_2{(8x^5y^3)} \end{split}\end{aligned}\end{align}\] Notice that when the 3 on the second term came inside, we were careful to apply it as an exponent to everything inside of the logarithm, and not just the \(y\). We get that

    \[5\log_{2}(x)+3\log_{2}(2y)=\log_{2}(8x^{5}y^{3})\]

    Sometimes we will want to go in the opposite direction and split a single logarithm into the sum or different of many logarithms. Let’s take a look at an example.

    Example \(\PageIndex{3}\): Splitting Logarithms

    Expand \(\displaystyle \ln{\Bigg( \frac{2x^3y^3}{wz^5}\Bigg)}\) into the sum and/or difference of multiple logarithms.

    Solution

    Here, we want to rewrite as many simpler logarithms. First, we see that the logarithms has a quotient inside, so we can use the third rule to split it:

    \[\ln{\Bigg( \frac{2x^3y^3}{wz^5}\Bigg)} = \ln{(2x^3y^3)} - \ln{(wz^5)}\]

    Now, we have products inside of both terms, so we can use the second rule to split these:

    \[\begin{align}\begin{aligned}\begin{split} \ln{(2x^3y^3)} - \ln{(wz^5)} &= \ln{(2)} + \ln{(x^3y^3)} - \ln{(wz^5)} \\ & = \ln{(2)} + \ln{(x^3)} + \ln{(y^3)} - \ln{(wz^5)} \\ & = \ln{(2)} + \ln{(x^3)} + \ln{(y^3)} - [\ln{(w)} + \ln{(z^5)}] \\ & = \ln{(2)} + \ln{(x^3)} + \ln{(y^3)} - \ln{(w)} - \ln{(z^5)} \end{split}\end{aligned}\end{align}\]

    Now, for the last step, we can bring the exponents to the outside of each term, giving us

    \[= \ln{(2)} + 3\ln{(x)} + 3\ln{(y)} - \ln{(w)} -5\ln{(z)}\]

    Notice that we were careful to use parentheses around \(\ln{(wz^5)}\) when we split it because of the negative sign. In the original form we are dividing by w and by \(z^3\) so we need to make sure both of these terms are subtracted when we split the logarithms. Also, we did not evaluate \(\ln{(2)}\). Since \(\ln{(2)}\) is really \(\log_e{(2)}\) and 2 is not made by raising \(e\) to an integer or fraction, \(\ln{(2)}\) is a non-repeating decimal. This means it is better to leave \(\ln{(2)}\) in our answer than to use a calculator to evaluate it because this form is more precise. This means that our final answer is

    \[\ln\left(\frac{2x^{3}y^{3}}{wz^{5}}\right)=\ln(2)+3\ln(x)+3\ln(y)-\ln(w)-5\ln(z)\]

    1.5.3: Solving Exponential Statements

    Logarithms are also used to solve exponential statements, statements where the variable is part of an exponent. When solving an exponential statement, we first need to isolate the exponential term. Once we have isolated the exponential term, we can take a logarithm of both sides. We don’t want to take just any logarithm, we want to use a logarithm that has the same base as the exponent so that we can easily simplify our final answer. After we have taken a logarithm of both sides, we can use our logarithm rules to bring the exponent (which has the variable) outside of the logarithm so that we can solve for the variable. Let’s take a look.

    Example \(\PageIndex{4}\): Solving an Exponential Statement

    Solve \(5^{3x-1} - 2 =0\) for x.

    Solution

    First, we will need to isolate the exponential term, \(5^{3x-1}\). Then, we will take log base 5 of both sides since the exponent has 5 as its base.

    \[\begin{align}\begin{aligned}\begin{split} 5^{3x-1} - 2 & = 0 \\ 5^{3x-1} & = 2 \\ \log_5{\Big( 5^{3x-1} \Big)} & = \log_5{(2)} \\ \end{split}\end{aligned}\end{align}\]

    Now, we will use our logarithm rules to bring x outside of the logarithm. This gives

    \[\begin{align}\begin{aligned}\begin{split} (3x-1)\log_5{(5)} & = \log_5{(2)} \\ (3x-1)(1) & = \log_5{(2)} \\ 3x-1 & = \log_5{(2)} \\ 3x & = \log_5{(2)} +1 \\ x & = \frac{\log_5{(2)}+1}{3} \end{split}\end{aligned}\end{align}\]

    Notice that when we brought the exponent outside of the logarithm, we kept the entire exponent inside of parentheses. This is to make sure that we do not incorrectly distribute terms. Additionally, notice that our final answer still includes a logarithm term. This is because \(\log_5{(2)}\) does not evaluate to a “nice” number, so it is more precise to write our final answer this way rather than using a calculator or computer to evaluate that term. Our final answer is

    \[5^{3x-1}-2=0\text{ solves to give }x=\frac{\log_{5}(2)+1}{3}\]

    Notice that in this example, we end up with \(\log_5{(5)}\) as part of our work. We know that this simply evaluates to 1. This is why we used log base 5, and not a different logarithm. Any logarithm would allow us to solve for \(x\), but using log base 5 makes it easier to simplify our final answer.

    Sometimes you will need to solve for a statement that has two exponential terms. When this happens, you may be able to employ a useful technique to solve. Let’s take a look at an example.

    Example \(\PageIndex{5}\): Solving an Exponential Statement

    Solve \(4^{2y+1} = 2^{y-1}\) for \(y\).

    Solution

    With these types of problems, we want to look at both bases and see if they are related in any way. Here, we have a base of 2 on the right and a base of 4 on the left. You’ll probably notice that \(4=2^2\); we can use this to our advantage when solving. Let’s start by rewriting our statement using this fact.

    \[\begin{align}\begin{aligned}\begin{split} 4^{2y+1} &= 2^{y-1} \\ (2^2)^{2y+1} & = 2^{y-1} \\ 2^{2(2y+1)} & = 2^{y-1} \\ 2^{4y+2} & = 2^{y-1} \end{split}\end{aligned}\end{align}\]

    Notice that we are using our exponent rules here, specifically the rule \((x^a)^b=x^{ab}\). This allows us to rewrite the statement so that both terms have the same base. Since the two terms have the same base and are equal to each other, we know that they must have equal exponents. This gives us

    \[\begin{align}\begin{aligned}\begin{split} 4y+2 &= y-1 \\ 3y &=-3 \\ y&= -1 \end{split}\end{aligned}\end{align}\] Our final answer is

    \[4^{2y+1}=2^{y-1}\text{ solves to give }y=-1\]

    We could solve this problem without using this technique. We would want to take either log base 2 of both side or log base 4 of both sides. Then, we would need to use logarithm rules to simplify and bring the \(y\) terms outside of the logarithm before we solve. Both methods result in the same answer; you can practice your logarithm skills by using this alternative method and comparing your final answer to the one above; they should be identical.

    1.5.4: Solving Logarithmic Statements

    A logarithmic statement is a statement in which the variable of interest is an input to a logarithm. As we know, logarithms and exponential functions are closely related, so it’s no surprise that we will use exponential functions to help solve logarithmic statements. Here, we will again use the fact that they are inverse functions, as shown by our definition of a logarithm. Let’s look at an example.

    Example \(\PageIndex{6}\): Solving a Logarithmic Statement

    Solve \(\log_5{(2x+3)}=2\) for \(x\).

    Solution

    Here, the logarithm is already isolated on one side, so we can start off by using the definition of logarithms shown in equation \(\eqref{log}\) to remove the logarithm from our equation.

    \[\begin{align}\begin{aligned}\begin{split} \log_5{(2x+3)} & = 2 \text{, then, from our definition,} \\  2x+3 &= 5^2 \\ 2x+3 &= 25 \\ 2x & = 22 \\ x &= 11 \end{split}\end{aligned}\end{align}\] Our final answer is

    \[\log_{5}(2x+3)=2\text{ solves to give }x=11\]

    Remember when working with either logarithms or exponential functions that they are strongly tied together: when solving a logarithmic statement we need to use exponents and when solving exponential statements we need to use logarithms.


    This page titled 1.5: Logarithms and Exponential Functions is shared under a CC BY-NC license and was authored, remixed, and/or curated by Amy Givler Chapman, Meagan Herald, Jessica Libertini.

    • Was this article helpful?