topic badge

7.05 Logarithmic functions

Introduction

Exponential functions are one-to-one functions which means they have an inverse function. The inverse of an exponential function is a special type of function called a logarithm. We will explore logarithms as the inverses of exponential equations and learn to graph and transform them in this lesson.

Logarithms

The inverse of an exponential equation is called a logarithm.

Logarithm

A value representing the exponent to which a fixed number (the base) must be raised to produce a given number.

Since a logarithm is defined as the inverse of an exponential equation, we can use this relationship to change between exponential and logarithmic forms:

\displaystyle y=\log_b \left(x\right) \iff b^y=x
\bm{b}
is the base and b>0, b\neq 1

This relationship means that a logarithm of the form \log_b \left(x\right) is equal to the exponent, y, to which we would raise the base, b, in order to obtain the argument, x.

When the logarithm is in the form y=\log_bx, it is sometimes referred to as a common logarithm. When the base of a common logarithm is missing, the understood base is 10. \log x=\log_{10}x

Logarithmic function

A function that contains a variable expression inside a logarithm; a function of the form f\left(x\right)=\log_b\left(x\right), where x>0 and b>0, b\neq 1.

Natural logarithms are logarithms with a base of the mathematical constant e. The natural logarithmic function is y=\log_e x which is commonly written as y=\ln x. The base of natural log is always e, so it is never written as a subscript.

To transform between exponential and logarithmic forms of a natural logarithm, we can use the definition of a natural logarithm:y=\ln \left(x\right) \iff e^y=x

Examples

Example 1

Rewrite the following logarithmic equations in exponential form.

a

y=\ln \left(x-3\right)

Worked Solution
Create a strategy

The understood base of a natural logarithm is e. We can use the property \ln \left(x\right)=y \iff x=e^y to rewrite it in exponential form.

Apply the idea

The equation in exponential form is e^y=x-3

Reflect and check

The base of the logarithm is always the same as the base of the exponent. For natural logarithms, the base is always e.

b

y=\log\left(\dfrac{1}{10}\right)

Worked Solution
Create a strategy

Whenever the base of a common logarithm is not written, it is understood to be 10. We can use the property \log_b \left(x\right)=n \iff x=b^n with b=10, x=\dfrac{1}{10}, and n=y.

Apply the idea

This equation in exponential form is 10^{y}=\dfrac{1}{10}

Reflect and check

Now that is it in exponential form, it may be easier to recognize that y=-1 makes this equation true. 10^{-1}=\dfrac{1}{10} by the negative exponent property.

Example 2

Evaluate \log_\frac{1}{3} 9 .

Worked Solution
Create a strategy

To evaluate the logarithm, we need to set it equal to a variable and rewrite the equation in exponential form. Then, we can solve for the variable.

Apply the idea

Let \log_{\frac{1}{3}}9=y. We can rewrite this equation as 9=\left(\dfrac{1}{3}\right)^y

To solve for y, we want to find the exponent that we would raise \dfrac{1}{3} by, to obtain a result of 9. To do this, we want to rewrite 9 and \dfrac{1}{3} as exponential expressions with the same base. We can see that 9=3^2 and \left(\dfrac{1}{3}\right)^y=\dfrac{1}{3^y}=3^{-y}.

\displaystyle 9\displaystyle =\displaystyle \left(\dfrac{1}{3}\right)^yOriginal equation
\displaystyle 3^2\displaystyle =\displaystyle 3^{-y}Rewrite both sides as a power of 3
\displaystyle 2\displaystyle =\displaystyle -yIf a^m=a^n, then m=n.
\displaystyle -2\displaystyle =\displaystyle yDivide by -1

Therefore, \log_{\frac{1}{3}}9=-2

Reflect and check

Any time the base is a fraction and the argument is a whole number or vice versa, the negative exponent property will be used. This means the result will always be a negative value.

Example 3

Write the inverse function for each of the following:

a

f\left(x\right)=\ln\left(\dfrac{x}{2}\right)

Worked Solution
Create a strategy

We want to replace f\left(x\right) with y, then swap x and y to find the inverse. We can then solve for y to find the inverse function.

Apply the idea
\displaystyle f\left(x\right)\displaystyle =\displaystyle \ln\left(\frac{x}{2}\right)State the equation
\displaystyle y\displaystyle =\displaystyle \ln\left(\frac{x}{2}\right)Rewrite the function with y

Inverse:

\displaystyle x\displaystyle =\displaystyle \ln\left(\frac{y}{2}\right)Swap x and y
\displaystyle e^x\displaystyle =\displaystyle \frac{y}{2}Definition of natural logarithm
\displaystyle 2e^x\displaystyle =\displaystyle yMultiply by 2
\displaystyle y\displaystyle =\displaystyle 2e^xSymmetric property of equality

The inverse function is f^{-1}\left(x\right)=2e^x.

Reflect and check
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

A function and its inverse are reflected across the line y=x when graphed.

We can use technology to see that this is true for f\left(x\right) and f^{-1}\left(x\right) in this problem.

b

f\left(x\right)=7^{3x+1}

Worked Solution
Create a strategy

We want to replace f\left(x\right) with y, and then swap x and y to find the inverse. We can then solve for y to find the inverse function.

Apply the idea
\displaystyle f\left(x\right)\displaystyle =\displaystyle 7^{3x+1}Original equation
\displaystyle y\displaystyle =\displaystyle 7^{3x+1}Rewrite the function with y

Inverse:

\displaystyle x\displaystyle =\displaystyle 7^{3y+1}Swap x and y
\displaystyle \log_7 \left(x\right)\displaystyle =\displaystyle 3y+1Definition of logarithm
\displaystyle \log_7 \left(x\right)-1\displaystyle =\displaystyle 3ySubtract 1
\displaystyle \frac{\log_7 \left(x\right)-1}{3}\displaystyle =\displaystyle yDivide by 3
\displaystyle y\displaystyle =\displaystyle \frac{\log_7 \left(x\right)-1}{3}Symmetric property of equality

The inverse function is f^{-1}\left(x\right)=\dfrac{\log_7 \left(x\right)-1}{3}.

Reflect and check

The inverse can also be written as f^{-1}\left(x\right)=\dfrac{1}{3}\left[\log_7 \left(x\right)-1\right] or f^{-1}\left(x\right)=\dfrac{1}{3}\log_7 \left(x\right)-\dfrac{1}{3}

Idea summary

A logarithm is defined as the inverse of an exponential equation. We can convert between exponential and logarithmic forms using the property y=\log_b \left(x\right) \iff b^y=x for common logarithms or y=\ln \left(x\right) \iff e^y=x for natural logarithms.

If the base of a common logarithm is not written, the understood base is 10. The base of a natural logarithm is always e.

Logarithmic functions

We can use the inverse relationship between logarithmic and exponential functions to explore the graphs and characteristics of the parent logarithmic functions, including natural logarithmic functions.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

The graph of f\left(x\right)=b^x has a point at \left(0,1\right), a point at \left(1,b\right), and an asymptote at y=0.

Since f\left(x\right)=\log_b\left(x\right) is the inverse of f\left(x\right)=b^x, and an inverse function is a reflection across the line y = x which maps each point \left(x, y\right) to \left(y, x\right), its graph has a point at \left(1,0\right) and \left(b,1\right) and an asymptote of x=0.

The points that were approaching the y-axis on the parent exponential function are now approaching the x-axis in the logarithmic function. This means the parent logarithmic function will have a vertical asymptote, in contrast to the parent exponential function which has a horizontal asymptote.

-1
1
2
3
4
5
6
7
8
9
x
-4
-3
-2
-1
1
2
3
4
y

When the base b>1, the graph of the parent logarithmic function is a rising curve that increases at a decreasing rate. Note, that even though there is a decreasing rate of increase, there is no limit on the function's range.

  • The graph is a strictly increasing function

  • The domain is \left(0, \infty\right)

  • The range is \left(-\infty, \infty\right)

  • The x-intercept is at \left(1,\, 0\right)

  • The vertical asymptote is x=0

When we examine the end behavior on the left side of the graph, we can see there is now a vertical asymptote at x = 0. As the x-values approach 0 from the positive side, x\to 0^{+}, f\left(x\right)\to -\infty.

-1
1
2
3
4
5
6
7
8
9
x
-4
-3
-2
-1
1
2
3
4
y

When 0<b<1, the graph is a falling curve that decreases at a decreasing rate.

  • The graph is a strictly decreasing function

  • The domain is \left(0, \infty\right)

  • The range is \left(-\infty, \infty\right)

  • The x-intercept is at \left(1,\, 0\right)

  • The vertical asymptote is x=0

Logarithmic functions can be dilated, reflected, and translated in a similar way to other functions.

The logarithmic parent function f\left(x\right)=\log_b\left(x\right) can be transformed to f\left(x\right)=a\log_b\left[c\left(x-h\right)\right]+k

  • If a<0, the basic curve is reflected across the x-axis

  • The graph is vertically stretched or compressed by a factor of a

  • If c<0, the basic curve is reflected across the y-axis

  • The graph is horizontally stretched or compressed by a factor of c

  • The graph is translated horizontally by h units

  • The graph is translated vertically by k units

Examples

Example 4

Consider the function f\left(x\right)=\log_{\frac{1}{4}}x.

a

State the domain and range.

Worked Solution
Create a strategy

The function has not been translated, so the domain and range will be the same as the parent logarithmic function.

Apply the idea

Domain: \left(0,\infty\right)

Range: \left(-\infty,\infty\right)

b

Sketch a graph of the function.

Worked Solution
Create a strategy

Since 0<b<1, we know that this is a decreasing logarithmic function. The inverse of this function is y=\left(\frac{1}{4}\right)^x. We can use the inverse to find key points, then graph the given function by switching the x- and y-values of the key points.

Apply the idea

We will begin by making a table of values for y=\left(\frac{1}{4}\right)^x.

x-2-1012
y1641\frac{1}{4}\frac{1}{16}

Because f\left(x\right)=\log_{\frac{1}{4}}x is the inverse, switching the rows of the above table creates a table of values for f\left(x\right).

x1641\frac{1}{4}\frac{1}{16}
f\left(x\right)-2-1012

Now, we can use the table to graph the function.

2
4
6
8
10
12
14
16
x
-4
-3
-2
-1
1
2
3
4
y
Reflect and check

Although we could have used a calculator to build the table of values, using the inverse relationship allowed us to find nice points instead of estimating decimals on the graph.

Example 5

Consider the graph of the logarithmic function f\left(x\right).

-5
-4
-3
-2
-1
1
2
3
4
5
x
-5
-4
-3
-2
-1
1
2
3
4
5
y
a

Determine the equation of the asymptote and two points on the curve.

Worked Solution
Create a strategy

The asymptote is displayed visually as a dashed line that the function approaches, but does not cross. On this graph, it is a vertical line which means the equation will be in the form x=c.

Apply the idea

The equation of the asymptote is x=-4 and the graph has points at \left(-3,0\right) and \left(-2,1\right).

Reflect and check

There are also points located at \left(0,2\right) and \left(4,3\right).

b

Sketch the inverse function on the same coordinate plane.

Worked Solution
Create a strategy
-5
-4
-3
-2
-1
1
2
3
4
5
x
-5
-4
-3
-2
-1
1
2
3
4
5
y

We can graph the inverse relation by reflecting f\left(x\right) across the line y=x.

We can use the key points, that have integer values, at \left(-3, 0\right), \left(-2, 1\right), \left(0, 2\right), and \left(4, 3\right) and swap the x- and y-values.

  • \left(-3, 0\right) \to \left(0, -3\right)
  • \left(-2, 1\right) \to \left(1, -2\right)
  • \left(0, 2\right) \to \left(2, 0\right)
  • \left(4, 3\right) \to \left(3, 4\right)

This allows us to approximate a few more points on the inverse function, then sketch the curve through these inverted points.

The asymptote must also be reflected across the line y=x. This takes x=-4 to y=-4.

Apply the idea
-5
-4
-3
-2
-1
1
2
3
4
5
x
-5
-4
-3
-2
-1
1
2
3
4
5
y
c

Write the equation of the inverse function.

Worked Solution
Create a strategy

As f\left(x\right) is a logarithmic function, the inverse will be an exponential function in the form y=ab^{\left(x-h\right)}+k

We will use the graph from part (b) to identify any transformations that were applied to the parent exponential function, y=b^x.

-5
-4
-3
-2
-1
1
2
3
4
5
x
-5
-4
-3
-2
-1
1
2
3
4
5
y

We can use the key features of an exponential function to determine the transformations and values of a, h, and k, then analyze the change in the y-values to find the value of b.

Apply the idea

We can see the asymptote is at y=-4, which indicates a vertical translation of 4 units down has occurred. This tells us k=-4. Since the parent function would have had a y-intercept at y=1, translating it down 4 units would make the new y-intercept at y=-3.

The y-intercept in our exponential graph is at y=-3 which indicates there is no stretch factor, so a=1. It also means that there has not been a horizontal shift, indicating h=0.

Since this function has been transformed, we cannot divide the outputs to determine the constant factor, b. By analyzing the change in y-values we can determine the value of the base, b.

xy\text{Change in }y
0-3
1-2\text{Increases by }1
20\text{Increases by }2
34\text{Increases by }4

Since the change in y is doubling each time, the base of the exponential function is 2.

Therefore, the inverse function is f^{-1}\left(x\right)=2^{x}-4.

Reflect and check

We can confirm this is the correct function by testing some of the other points:

x2^{x}-4y
02^0-3-3
12^1-4-2
22^2-40
32^3-44

Based on the graph, these are the expected values.

Example 6

Sketch the graph of the equation: y=3\log_2\left(x-3\right)+2

Worked Solution
Create a strategy

We can graph this equation by first completing a table of values and drawing the curve that passes through these points, or we can consider how the function f\left(x\right)=\log_2\left(x\right) has been transformed.

When looking at transformations, remember that we need to analyze and determine any stretches, compressions, or reflections first, then analyze the translations.

Apply the idea

Considering each component of the equation separately, we can see that the graph of {y=\log_2\left(x\right)} is vertically stretched by a factor of 3, translated 3 units to the right, and translated 2 units up.

-1
1
2
3
4
5
6
7
8
9
10
x
-10
-8
-6
-4
-2
2
4
6
8
10
y
  • First, the graph of y=\log_2\left(x\right) is stretched vertically by a factor of 3 .
  • This corresponds with the graph of y=3\log_2\left(x\right).
-1
1
2
3
4
5
6
7
8
9
10
x
-10
-8
-6
-4
-2
2
4
6
8
10
y
  • Next, the graph of f\left(x\right)=3\log_2\left(x\right) is translated 3 units to the right.
  • This corresponds with the graph of y=3\log_2\left(x-3\right).
-1
1
2
3
4
5
6
7
8
9
10
x
-10
-8
-6
-4
-2
2
4
6
8
10
y
  • Finally, the graph of y=3\log_2\left(x-3\right) is translated 2 units up.
  • This corresponds with the graph of \\y=3\log_2\left(x-3\right)+2.

The graph of the function is shown below.

-1
1
2
3
4
5
6
7
8
9
10
x
-10
-8
-6
-4
-2
2
4
6
8
10
y
Reflect and check

We could also use a table of values to find some points, then draw the curve through these points. Since the base of the logarithm is 2, we want to use x-values that would make the argument \frac{1}{4}, \frac{1}{2}, 1, 2, and 4 since these will lead to nice points.

Setting up and solving equations to find the x-values, we get \begin{aligned}x-3=\frac{1}{4}&\longrightarrow x=3\frac{1}{4}\\x-3=\frac{1}{2}&\longrightarrow x=3\frac{1}{2}\\x-3=1&\longrightarrow x=4\\x-3=2&\longrightarrow x=5\\x-3=4&\longrightarrow x=7\end{aligned}

Using a calculator or the inverse relationship to y=2^x, we can evaluate the logarithm at each of these values.

x3\log_2\left(x-3\right)+2y
3\frac{1}{4}3\log_2\left(\frac{1}{4}\right)+2=3\left(-2\right)+2-4
3\frac{1}{2}3\log_2\left(\frac{1}{2}\right)+2=3\left(-1\right)+2-1
43\log_2\left(1\right)+2=3\left(0\right)+22
53\log_2\left(2\right)+2=3\left(1\right)+25
73\log_2\left(4\right)+2=3\left(2\right)+28

We can see that these points correspond with points on our transformed graph.

Idea summary

The graph of the parent logarithmic function has the following characteristics:

  • The domain is \left(0, \infty\right)

  • The range is \left(-\infty, \infty\right)

  • The x-intercept is at \left(1,\, 0\right)

  • The vertical asymptote is x=0

When b>1, the function is strictly increasing. When 0<b<1, the function is strictly decreasing.

We can use the inverse relationship between logarithmic and exponential functions to find key points with which to sketch the graph of a logarithmic function.

Outcomes

F.IF.B.4

For a function that models a relationship between two quantities, interpret key features of graphs and tables in terms of the quantities, and sketch graphs showing key features given a verbal description of the relationship. Key features include: intercepts; intervals where the function is increasing, decreasing, positive, or negative; relative maximums and minimums; symmetries; end behavior; and periodicity.

F.LE.A.4

For exponential models, express as a logarithm the solution to ab^(ct) = d where a, c, and d are numbers and the base b is 2, 10, or e; evaluate the logarithm using technology.

What is Mathspace

About Mathspace