16. Logarithms & Properties
Before you start
- Evaluate exponential expressions for integer and rational exponents
- Apply rational-exponent and inverse-function notation
- Recognize the natural log $\ln$ as $\log_e$
- Convert simple exponential equations using base-matching
By the end you'll be able to
- Convert between logarithmic form and exponential form in both directions
- Apply the product rule, quotient rule, and power rule of logarithms to expand or condense expressions
- Solve exponential equations by taking the log of both sides
- Solve logarithmic equations by converting to exponential form
- Identify domain restrictions for log expressions (argument must be positive)
Logarithms & Properties
A logarithm is the inverse of exponentiation.
Because
Two special bases
- Common log
is base 10 (often written ). - Natural log
is base (i.e., ).
Most ML uses natural log, because
Inverse properties
Internalize these. They show up everywhere.
The three core rules
| Rule | Identity |
|---|---|
| Product | |
| Quotient | |
| Power |
Logs convert multiplication into addition, division into subtraction, and exponentiation into multiplication. This is why logs are useful for any problem where multiplying many numbers would cause precision issues.
Solving exponential equations
Take the log of both sides (any consistent base; usually
Change of base
Useful when your calculator only does
ML connection — log-likelihood
Most ML algorithms maximize a likelihood — the probability the model assigns to the observed
data. For a dataset of
If each
A sum of log-probabilities is numerically stable even for
ML connection — cross-entropy
The cross-entropy loss for classification:
Comes directly from the log-likelihood of the model being correct on the training data. The
log here uses the same product/quotient rules you just drilled — when you simplify
You finished math-1
The 16-week journey from −(−6) to log-likelihood is over. Every concept you touched is
load-bearing for the math you’ll meet in trig, calculus, linear algebra, and statistics. Take
a break. The next stop on the math track (math-3, Trigonometry) builds on the function and
graph intuition you developed here.
Common mistakes
These are the traps learners hit most often on this topic. Knowing them in advance is half the fix.
Treating $\log$ like a variable
. Logs only split products, not sums. The product rule is — note multiplication on the inside. Applying the power rule to bases instead of exponents
— the exponent comes out as a coefficient. You can’t pull a base out the same way: is a different (change-of-base) story. Forgetting the domain
is defined only for . After solving an equation, discard any candidate that makes the log argument zero or negative.
Practice problems
Try each on paper first. Click Show solution only after you've made a real attempt.
- Problem 1Convert to exponential form:
. Show solution
. - Problem 2Evaluate:
. Show solution
. - Problem 3Use the product rule: expand
. Show solution
. - Problem 4Solve for
: . Show solution
. - Problem 5Solve:
. Show solution
Candidate
violates the log domain. . - Problem 6Expand:
. Show solution
. - Problem 7Solve:
. Show solution
.
Practice quiz
- Question 1log_2(8) =?
- Question 2ln(e) =?
- Question 3Product rule: log(xy) =?
- Question 4Power rule: log(x^k) =?
- Question 5Solve: log_2(x) = 5
- Question 6Expand: log(x²y) using log rules
- Question 7log_a(1) =?
- Question 8Solve: 5e^(0.2t) + 10 = 85
- Question 9Why use log-likelihood instead of likelihood in ML?
- Reflection 10How is cross-entropy related to logarithms?
Week 16 recap
You converted between logarithmic and exponential forms, applied the product,
quotient, and power rules to expand and condense expressions, solved
exponential equations using natural log, and connected log-likelihood and
cross-entropy to the log rules you just drilled. Three trap families fell:
the log-of-sum trap (writing
Saved in your browser only — no account, no server.