Logarithmic Functions

The logarithm answers the question: "To what power must I raise to get ?" It is the inverse of the exponential function, and its graph is the mirror image of the exponential graph across the line . Understanding logarithms unlocks the ability to solve exponential equations, work with the decibel and Richter scales, analyze algorithm complexity, and prepare for calculus where the natural logarithm plays a starring role.

Quick Reference

Property Formula
Definition
Domain of
Range of
-intercept for every base
Cancellation identities and
Product rule
Power rule
Quotient rule
Common logarithm
Natural logarithm
Change of base

Definition of the Logarithm

For and , the exponential function is either strictly increasing (when ) or strictly decreasing (when ). Either way, it is one-to-one: for any given positive , there is exactly one value of satisfying .

Graphs illustrating the one-to-one property of exponential functions for b > 1 and 0 < b < 1, showing that each y-value corresponds to exactly one x-value.
Exponential functions are one-to-one: for any , there is exactly one with .

This unique value of is given a name:

Let , , and . The logarithm of to the base , written , is the unique exponent such that

Equivalently:

Some immediate examples:


The Logarithmic Function

The definition gives as a function of . Renaming the input variable and the output in the conventional way, the logarithmic function with base is

Its domain is because the argument of a logarithm must be positive (we need a positive input ). Since can be any real number, the range is .


The Inverse Relationship Between and

The logarithm and exponential are inverses of each other. Substituting one into the other yields the cancellation identities:

Because they are inverses, the domain and range swap:

Let and . Then


Graphs of Logarithmic Functions

Since is the inverse of , its graph is the reflection of the exponential graph across the line . Key observations:

  • The graph of passes through ; the graph of passes through .
  • The vertical asymptote of the logarithm is the -axis ().
  • When , the logarithm is increasing; when , it is decreasing.
Graphs showing the logarithmic function y = log_b(x) as the reflection of the exponential function y = bˣ across the line y = x for b > 1.
(a) When : is increasing, and so is . Both graphs are reflections of each other across .
Graphs showing the logarithmic function y = log_b(x) as the reflection of the exponential function y = bˣ across the line y = x for 0 < b < 1.
(b) When : is decreasing, and so is .

Algebraic Properties of Logarithms

Algebraic Properties of Logarithms. Let , , , , and be any real number.

  1. Product rule: The log of a product equals the sum of the logs.
  2. Power rule: The exponent moves to the front as a coefficient.
  3. Quotient rule: The log of a quotient equals the difference of the logs.
Proof These properties follow from the corresponding laws of exponents. Proof of (1). Set and , so and . Then Proof of (2). Set , so . Then , and Proof of (3). Write and apply Properties (1) and (2):

Common and Natural Logarithms

Any positive number other than 1 can serve as a logarithm base, but in practice two bases dominate:

  • The common logarithm uses base 10 and is written (base omitted by convention).
  • The natural logarithm uses base and is written .

The common logarithm is widely used in algebraic settings and logarithmic-scale graphs (e.g., pH, decibels). The natural logarithm is the more important one in calculus because with no extra constant.

Close-up photo of a scientific calculator showing the LOG and LN keys.
The LOG key (base 10) and LN key (base ) on a typical scientific calculator.

Warning. In computing languages such as Python, MATLAB, C++, and Fortran, the function called log computes the natural logarithm. In most precalculus and calculus textbooks, log without a base means the base-10 logarithm. Always check the convention of the system you are using.


Change of Base Formula

Calculators provide direct keys for and , but not for arbitrary bases like . The change of base formula lets us compute any logarithm using (or ).

Change of Base Formula. For any positive number with , and any :

To see how this works, consider computing . Set , so . Taking of both sides and applying the power rule:

The same formula works with (base 10) in place of : .


Frequently Asked Questions

Why must the argument of a logarithm be positive? Because asks for the exponent satisfying . Since for all real and all , the equation has no solution when . Logarithms of zero or negative numbers are undefined in the real number system (they do exist in complex analysis, but that is a different story).

What is and why? for any valid base , because by definition. On the graph, this means every logarithmic function passes through the point .

How do I use the algebraic properties to simplify logarithmic expressions? Identify the structure of the expression and apply the rules in reverse: combine sums of logs into a single log using the product rule, move coefficients up into exponents using the power rule, and convert differences to quotients using the quotient rule. For example:

When is negative? When and : raising to a negative power produces a fraction, so for . Similarly, when and , the logarithm is negative. More precisely, whenever and are on opposite sides of 1.

What is the difference between the common log and the natural log in practice? Both measure "how many times you multiply the base to get ," just with different bases. In algebra and engineering, (base 10) is convenient because our number system is base 10: directly tells you the number has 4 digits. In calculus and analysis, (base ) is preferred because its derivative contains no extra constants, leading to simpler formulas throughout integration and differential equations.

Can I use the change of base formula with instead of ? Yes. The change of base formula works with any common logarithm: . Both forms are equivalent. Use whichever key your calculator provides. For hand calculation, is often more convenient because natural log tables were historically more complete, and arises naturally in calculus.