Logarithmic function
A logarithmic function is the inverse of an exponential function. It describes the number to which a given base must be raised in order to obtain \(\large x\).
It is written in this form:
$$ \Large f(x)=\log_a(x) $$
There are some requirements for \(\large a\) and for \(\large x\):
- \(\large a>0\) and \(\large a \neq 1\)
- The base cannot be 1, otherwise the logarithm gives no variation
- \(\large x>0\)
- The logarithm is only defined for positive \(\large x\) values
When you draw a logarithmic function, you get a curve that either increases or decreases slowly depending on the base.
- If \(\large a>1\) the function is increasing
- If \(\large 0
The graph has a vertical asymptote along \(\large x=0\). It intersects the x-axis at \(\large (1,0)\). It does not intersect the y-axis, since the function is not defined for \(\large x\le 0\).
Base and characteristics
\(\large a\) is called the base:
- The base determines whether the graph is increasing or decreasing
- Changing the base stretches or compresses the graph horizontally
The logarithm also satisfies base change and product rules, but here we focus on the shape of the graph itself.
If we look at this function:
$$ \Large y=\log_2(x) $$
The curve is increasing, because \(\large a=2\) is greater than 1. It passes through \(\large (1,0)\) and has a vertical asymptote at \(\large x=0\).
Example
We try the function \(\large y=\log_2(x)\)
\(\Large x\) | 0.25 | 0.5 | 1 | 2 | 4 |
\(\Large y\) | -2 | -1 | 0 | 1 | 2 |