Skip to content

The logarithmic function

The logarithmic function

The inverse function of ax\displaystyle a^x

The function y=log⁡ax\displaystyle {y}={\log_a x} is the inverse function of y=ax\displaystyle {y}={a^x}: it takes the result back to the exponent.

  • 23=8\displaystyle {2^3}={8}, so log⁡28=3\displaystyle {\log_2 8}={3}: the point (3,8)\displaystyle (3,8) is on the graph of 2x\displaystyle 2^x, and the point (8,3)\displaystyle (8,3) on the graph of log⁡2x\displaystyle \log_2 x.
  • So at every point: (x,y)\displaystyle (x,y) is on the graph of ax\displaystyle a^x exactly when (y,x)\displaystyle (y,x) is on the graph of log⁡ax\displaystyle \log_a x.
f(x)=2x\displaystyle f(x)=2^{x}
g(x)=log⁡2x\displaystyle g(x)=\log_{2}x
y=x\displaystyle y=x
A=(1,2)\displaystyle A=(1,2)
B=(2,1)\displaystyle B=(2,1)
  • Swapping x\displaystyle x and y\displaystyle y is a reflection in the line y=x\displaystyle {y}={x}: the point A(1,2)\displaystyle A(1,2) goes to B(2,1)\displaystyle B(2,1).
  • So the graph of log⁡2x\displaystyle \log_2 x is the reflection of the graph of 2x\displaystyle 2^x in the line y=x\displaystyle {y}={x}.
The properties of log⁡ax\displaystyle \log_a x

Every property of ax\displaystyle a^x passes, reflected, to a property of log⁡ax\displaystyle \log_a x (a>0\displaystyle a>0, a≠1\displaystyle a\neq1):

  • The domain: x>0\displaystyle x>0 – because ax\displaystyle a^x takes only positive values.
  • The function takes every value y\displaystyle y.
  • The graph passes through (1,0)\displaystyle (1,0), because log⁡a1=0\displaystyle {\log_a1}={0}, and through (a,1)\displaystyle (a,1), because log⁡aa=1\displaystyle {\log_a a}={1}.
  • The vertical asymptote: x=0\displaystyle {x}={0} – the reflection of the horizontal asymptote y=0\displaystyle {y}={0} of ax\displaystyle a^x.
  • When a>1\displaystyle a>1 the function increases; when 0<a<1\displaystyle 0<a<1 it decreases.
A reciprocal base: log⁡1ax\displaystyle \log_{\frac{1}{a}}x

By the change of base, log⁡1ax=log⁡axlog⁡a1a=log⁡ax−1\displaystyle {\log_{\frac{1}{a}}x}={\frac{\log_a x}{\log_a\frac{1}{a}}}={\frac{\log_a x}{-1}}:

log⁡1ax\displaystyle \log_{\frac{1}{a}}x =\displaystyle = −log⁡ax\displaystyle -\log_{a}x
f(x)=log⁡2x\displaystyle f(x)=\log_{2}x
g(x)=log⁡12x\displaystyle g(x)=\log_{\frac{1}{2}}x
h(x)=log⁡3x\displaystyle h(x)=\log_{3}x
k(x)=log⁡13x\displaystyle k(x)=\log_{\frac{1}{3}}x
  • The graph of log⁡12x\displaystyle \log_{\frac{1}{2}}x is the reflection of the graph of log⁡2x\displaystyle \log_2 x in the x-axis; so are log⁡13x\displaystyle \log_{\frac{1}{3}}x and log⁡3x\displaystyle \log_3 x (dashed).
  • All four graphs pass through (1,0)\displaystyle (1,0).
  • log⁡3x\displaystyle \log_3 x rises more slowly than log⁡2x\displaystyle \log_2 x when x>1\displaystyle x>1: log⁡28=3\displaystyle {\log_2 8}={3}, but log⁡38<2\displaystyle \log_3 8<2.
The domain of log⁡af(x)\displaystyle \log_a f(x)

log⁡af(x)\displaystyle \log_a f(x) is defined only where f(x)>0\displaystyle f(x)>0. To find the domain, solve the inequality f(x)>0\displaystyle f(x)>0.

  • log⁡3(5−x)\displaystyle \log_3(5-x): 5−x>0\displaystyle 5-x>0, that is x<5\displaystyle x<5.
  • log⁡2(x2−4x)\displaystyle \log_2(x^2-4x): x2−4x>0\displaystyle x^2-4x>0, that is x(x−4)>0\displaystyle x(x-4)>0 – x<0\displaystyle x<0 or x>4\displaystyle x>4.
  • log⁡2(x2+1)\displaystyle \log_2(x^2+1): x2+1>0\displaystyle x^2+1>0 for every x\displaystyle x, so the function is defined for every x\displaystyle x.
Transformations of log⁡ax\displaystyle \log_a x

The example below investigates two transformations of log⁡2x\displaystyle \log_2 x:

  • f(x)=log⁡2(x−3)+1\displaystyle {f(x)}={\log_2(x-3)+1}: a shift 3 to the right and 1 up. The domain is x>3\displaystyle x>3, and the vertical asymptote x=3\displaystyle {x}={3}.
  • The point on the x-axis: log⁡2(x−3)=−1\displaystyle {\log_2(x-3)}={-1}, that is x−3=12\displaystyle {x-3}={\frac{1}{2}} and x=3.5\displaystyle {x}={3.5}. The graph does not meet the y-axis, because x=0\displaystyle {x}={0} is not in the domain.
  • g(x)=log⁡2(−x)\displaystyle {g(x)}={\log_2(-x)}: a reflection of log⁡2x\displaystyle \log_2 x in the y-axis. The domain is x<0\displaystyle x<0, and the graph passes through (−1,0)\displaystyle (-1,0).
f(x)=log⁡2(x−3)+1\displaystyle f(x)=\log_{2}(x-3)+1
x=3\displaystyle x=3
g(x)=log⁡2(−x)\displaystyle g(x)=\log_{2}(-x)
x=0\displaystyle x=0
Exercise 1

The function f(x)=log⁡3(x+2)−1\displaystyle {f(x)}={\log_3(x+2)-1} is given.

a

Find the domain of the function: write an inequality and solve it.

b

Find the point where the graph meets the x-axis: solve the equation.

    c

    Write the equation of the vertical asymptote, and mark on the graph the points where it meets the axes.

    f(x)=log⁡3(x+2)−1\displaystyle f(x)=\log_{3}(x+2)-1

    Exercise 2

    Find the domain: write an inequality and solve it.

    a

    f(x)=log⁡2(x2−9)\displaystyle {f(x)}={\log_2(x^2-9)}

    b

    g(x)=log⁡(4x−x2)\displaystyle {g(x)}={\log(4x-x^2)}

    Exercise 3

    The graph in the drawing is the graph of a function of the form y=log⁡ax\displaystyle {y}={\log_a x}.
    The graph passes through the point (9,2)\displaystyle (9,2).
    Find a\displaystyle a, and write the function.

    y= ?\displaystyle y=\,?
    (9,2)\displaystyle (9,2)

    Exercise 4

    The function f(x)=log⁡12x\displaystyle {f(x)}={\log_{\frac{1}{2}}x} is given.

    a

    Does the function increase or decrease? Explain with log⁡12x=−log⁡2x\displaystyle {\log_{\frac{1}{2}}x}={-\log_2 x}.

    b

    Solve the inequality f(x)>−3\displaystyle f(x)>-3.

      Exercise 5

      The functions f(x)=log⁡2x\displaystyle {f(x)}={\log_2 x} and g(x)=log⁡2(8−x)\displaystyle {g(x)}={\log_2(8-x)} are given.

      a

      Find the x-coordinate of the point where the graphs meet: solve the equation.

        b

        Mark the meeting point on the graph.

        f(x)=log⁡2x\displaystyle f(x)=\log_{2}x
        g(x)=log⁡2(8−x)\displaystyle g(x)=\log_{2}(8-x)