# Graphing Logarithmic Functions

### {{ 'ml-heading-theory' | message }}

## Logarithmic Function

Logarithmic functions are functions that can be written in the form $f(x) = \log_b(x).$ They have a domain restricted to $x>0,$ and their range is all real numbers. For functions with the base $0<b<1,$ the graph of $f(x) = \log_b(x)$ is decreasing over its entire domain.

If the base, $b,$ is greater than $1,$ the graph is increasing over the entire domain.

The reason logarithmic functions are undefined for $x\leq 0$ can be explained by rewriting the logarithm in exponential form. $y=\log_3(x)\quad \Leftrightarrow \quad 3^y=x$ For all real numbers, $y,$ the term $3^y>0.$ Consider a few powers of $3.$ $3^1=3, \quad 3^0=1, \quad 3^{\text{-} 1}=\dfrac{1}{3}, \quad 3^{\text{-}2}=\dfrac{1}{3^2}=\dfrac{1}{9}$

As the exponent decreases, the value of $3^y$ becomes smaller, but never equals $0$ or becomes negative. Since $3^y=x,$ it follows then that $x>0.$## Solving Logarithmic Equations Graphically

A logarithmic equation is an equation which can be written in the form $C=\log_b(x),$

where $C$ is a constant. This type of equation can be solved graphically. This is done by first graphing the function $y=\log_b(x),$ then finding the $x$-coordinate(s) of the point(s) on the graph that has the $y$-coordinate(s) $C.$ All found $x$-coordinates are solutions to the equation.## Inverse Functions

Inverse functions are two functions that undo each other. The functions $f(x)$ and $g(x)$ are inverses of each other if $f\left(g(x)\right)=x \quad \text{and} \quad g\left(f(x)\right)=x.$

When a function is denoted $f(x),$ its inverse is often referred to as $f^{\text{-} 1}(x).$## Inverse Functions to Logarithmic Functions

Logarithmic functions and exponential functions are inverses of each other. This yields $\begin{aligned} f(x)=\log_n(x) \quad &\Leftrightarrow \quad f^{\text{-} 1}(x)=x^n \\ g(x)=x^n \quad &\Leftrightarrow \quad g^{\text{-} 1}(x)=\log_n(x). \end{aligned}$ When two inverse functions are graphed in the same coordinate plane, their graphs are reflections of each other in the line $y=x.$ This can be seen for the function $f(x)=\log_{2}(x)$ and its inverse $g(x)=2^x$.

## Exercises

*settings_overscan*

## {{ 'ml-heading-exercise' | message }} {{ focusmode.exercise.exerciseName }}

*keyboard_backspace*

{{ 'ml-tooltip-premium-exercise' | message }}

{{ 'ml-tooltip-recommended-exercise' | message }}

Programmeringsuppgift | {{ 'course' | message }} {{ exercise.course }}

*keyboard_backspace*{{ 'ml-btn-previous' | message }}

*keyboard_backspace*