2115 Logarithms - JulTob/Mathematics GitHub Wiki
$\color{silver}\text{“Logarithms are indeed }$ $\color{silver}\text{a marvelous help }$ $\color{silver}\text{to calculations.”}$
$\color{silver}\text{John Napier}$ $(1550–1617)$, the ‘inventor’ of logarithms
Logarithms: Measuring the Size of Numbers
Logarithms are sometimes introduced as nothing more than the “inverse of exponentiation.” While that definition is correct, it’s also about as exciting as calling a telescope “a tube with lenses”. It misses the magic!
A Fresh Perspective: How Large Is This Number?
At their core, logarithms answer one very interesting question:
“How big is this number?”
On the surface, it might seem trivial. But once numbers become huge (like the population of an entire planet) or incredibly small (like the size of a virus in meters), we need a systematic way to talk about “bigness” or “smallness.” That is exactly where logarithms shine. This is closely related to another practical question:
“How many digits (or ciphers) do I need to write this number?”
One way to visualize logarithms is to think of them as the "width of signs" or "how many digits" you need to represent a number in a given base.
Imagine you have to write down a certain number in base 10 (our everyday decimal system). If the number is:
- 10 → you need 2 digits.
- 100 → you need 3 digits.
- 1,000 → you need 4 digits.
In each case, the logarithm $(\log_{10})$ tells you how many digits (minus one) the number has! More precisely, $(\lfloor \log_{10}(x) \rfloor + 1)$ equals the number of digits.
So, in a sense, logarithms measure the “width” of a number when written out, like a measuring tape for number size.
A Logarithm is a Measure of Orders of Magnitude
Let’s look at an example using base-10 logarithms $(\log_{10})$:
-
$(\log_{10}(10,000) = 4)$
- Why? Because $(10,000 = 10^4)$.
- This means 10,000 is four orders of magnitude bigger than 1.
- We can also write it as $(1 \times 10^4)$ → A 1 followed by 4 zeros.
-
$(\log_{10}(654,321) = 5.8157)$
- This means that the number is a bit more than five orders of magnitude but not quite six.
- To compare, $(600,000 = 6 \times 10^5)$, and its logarithm is $(\log_{10}(600,000) = 5.778)$.
What Does This Tell Us?
- The integer part of a logarithm gives us the order of magnitude.
- If we round up, we get the number of digits needed to write the number.
A Practical Example
Suppose you want to estimate how many digits are in a large number:
- $(\log_{10}(1,000,000) = 6)$ → A 1+6-digit number.
- $(\log_{10}(500,000) \approx 5.7)$ → Round up to 6, meaning it takes 6 digits to write it.
Imagine you're writing numbers in base $a$ (where $a$ is any number greater than 1). The logarithm of a number to base $a$ tells you how many digits or signs you need to write that number.
They are used in:
- Scientific notation (e.g., (3.2 \times 10^8) m/s for the speed of light).
- Magnitude estimation (e.g., earthquake scales, sound decibels).
- Compressing huge ranges of values (e.g., pH scale, brightness of stars).
🔍 Logarithms as "Width of Signs":
-
Logarithm Definition in this context:
$\color{#FF595E} log_a(x) = y \iff a^y = x$- $a$ is the base of your number system.
- $x$ is the number you're trying to represent.
- $y$ is the size of digits (or "signs") needed to write $x$ in base $a$.
-
Interpreting Logarithms with Width:
- If you want to write $x$ in base $a$, the logarithm tells you how "wide" the number is in terms of digits. The resulting number is the digits that follow the lead (the first digit).
-
As every base is base 10 in its own base, we can check by ranges what to expect for all bases:
base range N. of Digits logarithm $[1-10)$ $1$ $[0-1)$ $[10-100)$ $2$ $[1-2)$ $[100-1000)$ $3$ $[2-3)$ $[1000-10000)$ $4$ $[3-4)$ $[10000-100000)$ $5$ $[4-5)$ -
For example, if you're working in base ten (our regular decimal system), the logarithm $log_{10}(1000) = 3$ tells you that 1000 requires 3+1 digits in base 10.
- This is because $10^3 = 1000$, and the number 1000 has three digits after the leading 1: 1, 0, 0, 0. So its size is 3.
-
In binary (base 2), the logarithm $log_2(8) = 3$ tells you that the number 8 is written with 3 digits after the lead in base 2 (i.e., 1000 in binary).
- This is because $2^3 = 8$, and 1000 in base 2 has 3 digits after the lead. Its size is 3.
So, even if it's not the same number, thinking of logarithms as related to 'digits size' is incredibly useful for quick understanding and estimation of numbers and operations, giving great insight in many areas of analysis.
🏵 Real-World Example: Logarithms as Width of Signs in Base 10
Consider writing numbers in base 10 (our familiar decimal system). Let’s explore the logarithms of some common numbers:
-
$log_{10}(1000) = 3$: This means you need 3 digits to write 1000 in base 10.
- 1000 has 3 zeros, so its "width" or "length" in base 10 is 3.
-
$log_{10}(10,000) = 4$: This means you need 4 digits to write 10,000 in base 10.
- 10,000 has 4 zeros, so its "width" is 4.
In general, when you take the logarithm of a number in base 10, it tells you how many digits that number has. In this sense, the logarithm measures the size of a number in terms of its "width" or "length" when written out.
🏵 Binary Logarithms: Width in Base 2
In base 2 (binary), things get even more interesting. The logarithm $log_2(x)$ tells you how many binary digits (bits) are needed to represent $x$.
-
$log_2(16) = 4$: The number 16 is written as 10000 in binary, which is 4 digits width.
- $2^4 = 16$, so the width of 16 in base 2 is 4 digits.
-
$log_2(8) = 3$: The number 8 is written as 1000 in binary, which is 3 digits long.
- $2^3 = 8$, so its width in base 2 is 3 digits.
This idea is critical in computer science because binary logarithms tell us how many bits are required to store or represent numbers in a computer.
🏵 Logarithms as a Measure of Growth
Thinking of logarithms as measuring the width of signs also ties into how logarithms measure growth. For example, in systems where numbers grow exponentially (like population growth or doubling times), the logarithm tells us how many steps or "orders of magnitude" it takes to reach a certain size.
- In base 10: $log_{10}(x)$ tells you how many times you’ve multiplied by 10 to reach $x$.
- In base 2: $log_2(x)$ tells you how many doublings it took to reach $x$.
Example:
- If a population doubles every year, the number of doublings (or years) it takes to reach a population of 1000 can be found by: $$ log_2(1000) \approx 9.97 $$ This means it takes about 10 doublings to reach a population of 1000.
🏵 More Logarithmic Properties with the "Width of Signs" Metaphor:
Let’s use the width of signs metaphor to explore more logarithmic properties.
Product Rule:
If you're multiplying two numbers, the logarithm of the product tells you the combined width of the two numbers when written out in the same base.
\color{#8161AE}
log_a(mn) = log_a(m) + log_a(n)
- The total width of $mn$ is the combined width of $m$ and $n$.
Quotient Rule:
Dividing two numbers shrinks the overall "width" or number of digits needed to represent the result.
\color{#FF595E}
log_a\left(\frac{m}{n}\right) = log_a(m) - log_a(n)
- The width of $\frac{m}{n}$ is reduced by subtracting the width of $n$ from $m$.
Power Rule:
When you raise a number to a power, the "width" gets stretched by the exponent.
\color{#8AC926}
log_a(m^p) = p \cdot log_a(m)
- Raising a number to a power $p$ is like writing the number out $p$ times—so the total width grows by a factor of $p$.
🏵 Visual Example: Width of Signs in Different Bases
Number | Base 10 | Base 2 | Base 3 |
---|---|---|---|
8 | 1 digit | 3 digits | 2 digits |
16 | 2 digits | 4 digits | 3 digits |
100 | 3 digits | 7 digits | 4 digits |
1000 | 4 digits | 10 digits | 6 digits |
Here, you can see that the number of digits (the "width") depends on the base. A number like 1000 takes 10 digits in base 2 but only 4 digits in base 10. Logarithms measure this width!
🏵 Summary:
By thinking of logarithms as the "width of signs", we can understand logarithms as a measure of how large a number is in a given base:
- The logarithm tells you how many digits or steps it takes to write a number in that base.
- It also captures how much growth is required to reach that number in an exponential system.
Whether you're writing numbers in base 10, base 2, or any other base, logarithms help you measure the "size" or "width" of the number as it grows.
🏵 Logarithms: The Inverse of Exponents
At a formal level, the logarithm is indeed the inverse of exponentiation. If you know how powers of numbers work, logarithms let you undo that process and figure out the exponent. Essentially, logarithms answer the question:
"To what power do I need to raise $a$ to get $x$?"
🔍 Logarithmic Definition:
The logarithmic function is defined as:
\color{#FF595E}
log_a(x) = y \iff a^y = x
- $a$ is the base.
- $x$ is the result of raising $a$ to some power $y$.
- $y$ is the exponent.
Example:
If $a = 2$, then $log_2(8) = 3$ because $2^3 = 8$.
🧑🔬 Logarithmic Properties:
Logarithms have some awesome properties that make them super useful in simplifying multiplication, division, powers, and roots.
1. Basic Logarithmic Values:
- The logarithm of 1 is always 0 for any base:
\color{#FFCA3A}
log_a(1) = 0 \quad \text{(since $a^0 = 1$ for any $a$)}
- The logarithm of the base is always 1:
\color{#8AC926}
log_a(a) = 1 \quad \text{(since $a^1 = a$)}
- The logarithm of a power of the base simplifies to the exponent:
\color{#1982C4}
log_a(a^x) = x
🔧 Logarithmic Rules:
Logarithms transform complex operations into simpler ones, just like a handy calculator 🔢:
2. Product Rule (turns multiplication into addition):
If you're multiplying two numbers inside a logarithm, the log of the product equals the sum of the logs:
\color{#8161AE}
log_a(mn) = log_a(m) + log_a(n)
3. Quotient Rule (turns division into subtraction):
If you're dividing two numbers inside a logarithm, the log of the quotient equals the difference of the logs:
\color{#FF595E}
log_a\left(\frac{m}{n}\right) = log_a(m) - log_a(n)
4. Power Rule:
A logarithm of a power can be simplified by bringing the exponent out front:
\color{#8AC926}
log_a(m^p) = p \cdot log_a(m)
5. Change of Base Formula:
You can convert between logarithms of different bases using this formula:
\color{#1982C4}
log_a(m) = \frac{log_b(m)}{log_b(a)}
This is useful when calculators only provide logs in certain bases (like base 10 or $e$).
6. Negative Logarithms:
When you're dealing with reciprocals inside a logarithm, the logarithm becomes negative:
\color{#FFCA3A}
log_a\left(\frac{1}{m}\right) = -log_a(m)
🏵 Types of Logarithms
📏 Common Logarithm (Base 10):
The common logarithm is simply a log with base 10. It's the one we most often use when talking about orders of magnitude (like in the Richter scale for earthquakes 🌍):
\color{#FF595E}
log(x) = log_{10}(x)
Example:
- $log(1000) = 3$ because $10^3 = 1000$.
🌱 Natural Logarithm (Base $e$):
The natural logarithm is based on the number $e \approx 2.718$. This comes up often in calculus and exponential growth (like population growth or radioactive decay ☢️):
\color{#FFCA3A}
ln(x) = log_e(x)
Example:
- $ln(e) = 1$ because $e^1 = e$.
🏵 Logarithms in the Real World
Logarithms are incredibly useful in a variety of fields:
-
Earthquakes: The Richter scale uses logarithms to measure the intensity of earthquakes. A quake of magnitude 6 is 10 times stronger than a magnitude 5.
- $log_{10}(\text{quake intensity}) = \text{magnitude}$
-
Sound: The decibel scale for sound intensity is also logarithmic. Each 10 dB increase means the sound is 10 times more powerful.
-
Finance: In finance, logarithms are used to calculate compound interest, where growth is exponential over time.
-
Computer Science: Algorithms that use logarithmic time complexity (like binary search) run super fast because they reduce the problem size exponentially.
🏵 Visualizing Logarithmic Growth
To visualize how logarithmic growth differs from linear or exponential growth, we can chart a logarithmic function. Here's what it looks like for $log_2(x)$ as $x$ increases:
---
config:
xyChart:
height: 300
themeVariables:
xyChart:
titleColor: "#000000"
backgroundColor: "#eeeeee"
xAxisLineColor: "#000000"
yAxisLineColor: "#000000"
xAxisLabelColor: "#000000"
yAxisLabelColor: "#000000"
xAxisTickColor: "#000000"
yAxisTickColor: "#000000"
---
xychart-beta
title "Logarithmic Growth"
x-axis "x" [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
y-axis "y" 0 --> 4
line [0, 1, 1.584963, 2, 2.321928, 2.584963, 2.807355, 3, 3.169925, 3.321928, 3.4594]
🏵 Summary of Logarithmic Properties:
Here’s a compact list of the key logarithmic rules for quick reference:
- Log of 1:
\color{#FFCA3A}
log_a(1) = 0
- Log of the base:
\color{#8AC926}
log_a(a) = 1
- Log of a power:
\color{#1982C4}
log_a(a^x) = x
- Product Rule:
\color{#8161AE}
log_a(mn) = log_a(m) + log_a(n)
- Quotient Rule:
\color{#FF595E}
log_a\left(\frac{m}{n}\right) = log_a(m) - log_a(n)
- Power Rule:
\color{#8AC926}
log_a(m^p) = p \cdot log_a(m)
- Change of Base Formula:
\color{#1982C4}
log_a(m) = \frac{log_b(m)}{log_b(a)}
- Common Logarithm:
\color{#FF595E}
log(x) = log_{10}(x)
- Natural Logarithm:
\color{#FFCA3A}
ln(x) = log_e(x)
Why Do We Need This “Measuring Tape”?
1. Magnitude Estimation
Whether you’re studying earthquake intensities, sound decibels, or the mass of distant galaxies, nature’s extremes often span multiple orders of magnitude. Using logarithms condenses huge ranges into manageable scales.
2. Simplifying Multiplicative Processes
When numbers multiply rapidly—like bacterial growth or compound interest—logarithms transform multiplication into addition, making complex relationships easier to handle (and visualize).
3. Digit Counting
When dealing with digital storage, for instance, we often want to know “How many bits do we need to store this number?” That question translates directly to (\log_{2}) of the number.
Logarithms are an incredible tool for understanding how large a number really is. Instead of dealing with massive numbers directly, we express them in terms of their order of magnitude—a much more intuitive and practical approach!