📘 CodingMarble Learn

Logarithms

A logarithm tells you the power you need. log_b x = y means b^y = x. So log₂ 8 = 3 because 2³ = 8. Logs turn multiplying into adding: log(ab) = log a + log b, log(a/b) = log a − log b, log(aⁿ) = n log a. Base 10 is the common log, base e is the natural log (ln). Any base can be changed: log_b x = log x ÷ log b.

🎬 Step-by-step story

  1. Start with 1 ball and double it three times: 1, 2, 4, 8. We multiplied by 2 three times, so log₂ 8 = 3.
  2. Each green block means "times 10". 100 needs 2 blocks, so 10² = 100 and log₁₀ 100 = 2 say the same fact. Base 10 is the common log; base e is the natural log, ln.
  3. 4 needs 2 blocks and 8 needs 3. Stack them: 5 blocks, and 2⁵ = 32. Multiplying numbers means adding their logs.
  4. 8² is two towers of 3 blocks, so its log is 6: the power comes to the front. A calculator changes base with log x ÷ log b.
  5. Watch a worked example, one line at a time: 3^x = 81. Take log, bring x down, divide. x = 4.
  6. Your turn. Move the base and x sliders. Watch the log curve pass (1, 0), rise fast and then slowly.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why is a log just a power?

log₂ 8 asks "2 to what power is 8?". The answer 3 is the power. Count the doublings in the 3D.

Why can't the base be 1 or x be negative?

1 to any power is still 1, so it can never reach other numbers. A positive base to any power is always positive, so a negative x is never reached.

Why does multiplying become adding?

Each number is a tower of blocks. Multiplying stacks the towers, so the block counts (logs) add.

How do I find log₂ 20 on a calculator with no log₂ key?

Use change of base: log 20 ÷ log 2 ≈ 4.32.

When do I use logs to solve an equation?

When the unknown is in the power and you cannot match bases easily. Take log to bring it down.

Why does the log graph flatten out?

To add 1 to the log you must multiply x by the base. Bigger and bigger jumps in x are needed for each step up.

What is a logarithm?

A power like 2³ = 8 has three parts: the base 2, the exponent 3 and the answer 8. A logarithm asks for the exponent.

logb x = y means by = x. Read it as "log base b of x".

Rules for the parts: the base b must be positive and not 1. The number x must be positive. So log(−5) and log 0 do not exist.

Logs and powers undo each other (they are inverses): blog_b x = x and logb(bx) = x.

Common logs and natural logs

Common log: base 10, written log x (or lg x). It fits our number system: log 1000 = 3, log 1 = 0, log 0.1 = −1.

Natural log: base e ≈ 2.718, written ln x. The number e appears in natural growth, like bacteria or continuous interest. ln e = 1, ln 1 = 0.

Real-life log scales: pH = −log[H⁺], decibels = 10 log(I/I₀), earthquake magnitude. On a semi-log plot one axis goes 1, 10, 100, 1000 in equal steps, so fast (exponential) growth looks like a straight line.

History: John Napier (1614) and Henry Briggs made log tables so that sailors and astronomers could multiply big numbers by adding logs. Slide rules worked on the same idea until calculators came.

The laws of logarithms

For positive a, b and base c (c ≠ 1):

Why the product law works: if a = 2³ and b = 2⁴, then ab = 2³⁺⁴. Exponents add when you multiply, and logs are exponents.

Watch out: log(a + b) is NOT log a + log b. There is no simple law for the log of a sum.

The graph of y = log_b x

For b > 1 the graph of y = log_b x:

For 0 < b < 1 the curve falls instead. The graph of y = log_b x is the mirror image of y = bx in the line y = x, because they are inverse functions.

Shifts work as usual: y = log(x − 3) moves the curve 3 right, so the asymptote becomes x = 3.

Solving exponential and log equations

Exponential equation (unknown in the power), e.g. 5x = 40:

  1. Take log of both sides: log 5x = log 40.
  2. Power law: x log 5 = log 40.
  3. Divide: x = log 40 ÷ log 5 ≈ 1.602 ÷ 0.699 ≈ 2.29.

Log equation, e.g. log₂(x + 1) = 3: rewrite as a power: x + 1 = 2³ = 8, so x = 7. Always check that the number inside each log stays positive.

Inequalities: for base > 1, log is increasing, so log_b u < log_b v means u < v (with u, v > 0).

Modelling: growth A = P(1 + r)t. To find the time t, use t = log(A/P) ÷ log(1 + r).

Key formulas and definitions

Worked examples

1. Find log₃ 81.

3 × 3 × 3 × 3 = 81, so 3⁴ = 81 and log₃ 81 = 4.

2. Write 10⁻³ = 0.001 in log form.

log₁₀ 0.001 = −3.

3. Simplify log 2 + log 5.

Product law: log(2 × 5) = log 10 = 1.

4. Expand log(x³y/z).

3 log x + log y − log z.

5. Find log₂ 20 with a calculator.

Change of base: log 20 ÷ log 2 = 1.301 ÷ 0.301 ≈ 4.32. Check: 2^4.32 ≈ 20.

6. Solve 2^(x+1) = 48.

(x + 1) log 2 = log 48 → x + 1 = 1.681 ÷ 0.301 ≈ 5.585 → x ≈ 4.585.

7. Solve log x + log(x − 3) = 1.

log[x(x − 3)] = 1 → x² − 3x = 10 → (x − 5)(x + 2) = 0. x = −2 makes log x undefined, so x = 5.

8. ₹10,000 grows at 8% a year. After how many years is it ₹20,000?

20000 = 10000 × 1.08^t → 1.08^t = 2 → t = log 2 ÷ log 1.08 = 0.301 ÷ 0.0334 ≈ 9.0 years.

Common mistakes

Practice quiz

1. log₂ 32 equals:
2. log a + log b equals:
3. ln e equals:
4. Which does NOT exist?
5. The graph of y = log x passes through:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is a logarithm in simple words?

The power you need. log_b x is how many times you multiply b to reach x.

What is the difference between log and ln?

log usually means base 10; ln means base e ≈ 2.718. Both follow the same laws.

What is the change of base formula?

log_b x = log x ÷ log b (or ln x ÷ ln b).

Where this is taught

Canada (Ontario)Grade 12A. Exponential Functions
Canada (Ontario)Grade 12A. Exponential and Logarithmic Functions
ItalySecondaria di secondo grado – classe 3ªRelations and functions
ItalySecondaria di secondo grado – classe 4ªRelations and functions
PolandLiceum ogólnokształcące, klasa IReal numbers
PolandLiceum ogólnokształcące, klasa IReal numbers
RomaniaClasa a X-aSets of numbers
RomaniaClasa a X-aSets of numbers
RomaniaClasa a X-aSets of numbers
Ukraine11 класAlgebra: exponential and logarithmic functions (36 h)
Ukraine11 класAlgebra: exponential and logarithmic functions (40 h)
Ukraine11 класAlgebra: exponential and logarithmic functions (16 h)
CBSE (India)Class 9Advanced Level (optional): Logarithms
CBSE (India)Class 11Numbers, Quantification and Numerical Applications
England (GCSE, A level)Year 12F Exponentials and logarithms
USA (Common Core, NGSS, AP)Grade 11Modeling with functions
USA (Common Core, NGSS, AP)Grade 12Exponential and Logarithmic Functions
USA (Common Core, NGSS, AP)Grade 12Functions and their inverses
Japan高校(専門学科)1〜3年Advanced Mathematics I
Japan高校2年Exponential and logarithmic functions
South Korea고등학교 2학년Exponential and logarithmic functions
South Korea고등학교 3학년Exponential and logarithmic functions
Germany (Bavaria)Jahrgangsstufe 12Functions: quotient rule and inverse functions
FranceTerminaleStudy themes
FranceTerminaleAnalysis
FranceTerminaleMathematics
FranceTerminaleMathematics
FranceTerminaleMathematics (2019 programme)
Russia10 классNumbers and calculations
Russia11 классNumbers and calculations
China高一Ch.4 Exponential and logarithmic functions

Learn first

Related lessons

All Maths lessons