Algebra › Section J · Exponential and logarithmic functions › Topic J.3
Logarithmic functions and their graphs
Every exponential question has a mirror-image question: instead of "what is 2 to the fifth?", the logarithm asks "two to the what is 32?" The answer function is the exponential's inverse - and its graph is the reflection you already know how to draw.
The logarithm, defined
The logarithm base \(b\) of \(x\) is the exponent you put on \(b\) to get \(x\): \(\log_b x = y\) means exactly \(b^y = x\). Read every log as a question - "\(b\) to the what is \(x\)?" - and the notation stops being intimidating. So \(\log_3 81 = 4\) because \(3^4 = 81\), and \(\log_4 \tfrac{1}{16} = -2\) because \(4^{-2} = \tfrac{1}{16}\). The restrictions mirror the exponential's: the input \(x\) must be positive (a positive base powered to anything real never reaches zero or below), the base satisfies \(b > 0\) and \(b \neq 1\).
Common and natural logs
Two bases earn their own notation. The common logarithm, written \(\log x\) with no base displayed, is base 10 - the counting base, so \(\log 100{,}000 = 5\). The natural logarithm, written \(\ln x\), is base \(e \approx 2.718\) - the calculus base from the previous topic, whose exponential's rate of change equals itself. The two special evaluations worth memorizing: \(\log_b 1 = 0\) for every legal base (anything to the zero is 1), and \(\log_b b = 1\) (the base to the first is itself).
Worked example: evaluating by rewriting
Evaluate \(\log_5 125\), \(\log_2 64\), and \(\log_{10} 0.001\). No calculator needed - rewrite each as an exponential question. \(5\) to the what is \(125\)? Since \(5^3 = 125\), the answer is 3. \(2\) to the what is \(64\)? Count the doublings: \(2^6 = 64\), so the answer is 6. Ten to the what is \(0.001\)? Since \(0.001 = 10^{-3}\), the answer is \(-3\) - negative outputs are completely normal; they mean the input was a proper fraction. The evaluation routine is always the same: translate the log to its exponential question, then answer it.
The inverse relationship
The functions \(y = b^x\) and \(y = \log_b x\) undo each other, exactly as inverses did in the composite-inverse topic: \(\log_b(b^x) = x\) and \(b^{\log_b x} = x\). Each one's question runs the other backwards. The exponential asks "\(b\) to the \(x\) is what?"; the log asks "\(b\) to the what is \(x\)?" Because they are inverse functions, their graphs are reflections across the line \(y = x\): the point \((1, 2)\) on \(y = 2^x\) reflects to \((2, 1)\) on \(y = \log_2 x\), and \((3, 8)\) reflects to \((8, 3)\). The exponential's horizontal asymptote becomes the log's vertical asymptote under the swap - the reflection trades the axes.
Graph features
The graph of \(y = \log_b x\) for \(b > 1\) rises slowly to the right: it passes through \((1, 0)\) always, then \((b, 1)\), then \((b^2, 2)\), needing an eightfold input gain just to climb from height 3 to height 4 when \(b = 2\). The domain is \(x > 0\) - nothing at or left of the y-axis - and the range is all real numbers, since some exponent answers every "to the what." The y-axis itself (the line \(x = 0\)) is a vertical asymptote: the curve plunges toward it as \(x\) shrinks toward zero, never touching. Larger bases climb more slowly; the graph of \(\log_{10} x\) is a lazier rise than \(\log_2 x\).
Worked example: sketching from points
Sketch \(y = \log_2 x\). Anchor points from the definition: \(\log_2 1 = 0\) gives \((1, 0)\); \(\log_2 2 = 1\) gives \((2, 1)\); \(\log_2 4 = 2\) gives \((4, 2)\); \(\log_2 8 = 3\) gives \((8, 3)\); and \(\log_2 \tfrac{1}{2} = -1\) gives \((\tfrac{1}{2}, -1)\). Plot these, note the y-axis as a wall the curve approaches without touching on the left, and connect with a slowly steepening rise. The sketch is the mirror image of \(y = 2^x\) drawn across \(y = x\) - same points, coordinates swapped - and that reflection is the fastest self-check available.
Domains of logarithmic functions
A logarithmic function accepts only positive inputs, so a shifted log function inherits a domain restriction exactly the way even-root functions did in the radical-functions topic. For \(f(x) = \log_4(x - 3)\), the input to the log is \(x - 3\), which must be positive: \(x > 3\), domain \((3, \infty)\). The graph is \(y = \log_4 x\) shifted right 3 - its vertical asymptote moves from \(x = 0\) to \(x = 3\), and the anchor point \((1, 0)\) moves to \((4, 0)\). Whenever a log's argument is more than a bare \(x\), solve argument \(> 0\) to find the domain before doing anything else.
Change of base
Calculators ship with \(\log\) and \(\ln\) keys but not \(\log_3\), so any log can be converted: \(\log_b x = \frac{\ln x}{\ln b}\) (or equivalently \(\frac{\log x}{\log b}\)). To evaluate \(\log_3 40\): \(\frac{\ln 40}{\ln 3} \approx \frac{3.689}{1.099} \approx 3.35\). The check is a translation back: \(3^{3.35}\) should be about 40, and it is - \(3^3 = 27\), and \(27 \cdot 3^{0.35} \approx 27 \cdot 1.5 \approx 40\). The formula works in any base because logs in different bases are just rescalings of each other.
Common mistakes to avoid
First, asking for \(\log_2 8\) and answering 6 or 16 - the log is the exponent, 3, not a product of the numbers in view. Second, evaluating \(\log\) of zero or a negative - undefined in the reals, in any base. Third, swapping base and argument: \(\log_3 9\) is 2, while \(\log_9 3\) is \(\tfrac{1}{2}\) - direction matters. Fourth, forgetting the domain restriction when the argument is a function of \(x\): \(\log_4(x - 3)\) does not exist at \(x = 3\) or below. Fifth, drawing the log graph through the origin - it passes through \((1, 0)\), and the y-axis is a wall, not a crossing.
Key takeaways
A logarithm answers "the base to the what?": \(\log_b x = y\) means \(b^y = x\), with \(x > 0\), \(b > 0\), \(b \neq 1\). Common logs use base 10, natural logs use \(e\); \(\log_b 1 = 0\) and \(\log_b b = 1\) in every base. The log is the exponential's inverse - \(\log_b(b^x) = x\) - so its graph reflects across \(y = x\), passes through \((1, 0)\), rises slowly for \(b > 1\), and has a vertical asymptote at \(x = 0\) with domain \(x > 0\) and range all reals. Shifted logs get domains from argument \(> 0\), and change of base \(\log_b x = \frac{\ln x}{\ln b}\) makes every log calculator-ready.
Flashcards
Flashcard
log_b x = y means b^y = x
Test your understanding
Question 1 of 5
What is log base 3 of 81?
Question 2 of 5
What is log base 4 of 1/16?
Question 3 of 5
What is the domain of f(x) = log base 4 of (x - 3)?
Question 4 of 5
What is log base 2 of 64?
Question 5 of 5
Where is the vertical asymptote of y = log base 2 of x?
