Logarithms

81 views
0

I need some help understanding how logarithms work. I just can’t wrap my head around the concept, and I can only find videos online explaining how to rearrange a log equation. I’m looking for an explanation as to how it works, and perhaps the theory behind it.

I’ve also heard that log is easier to use for more complex calculations. How does rounding work with log? What is a natural log? What is e?

In: 3

Log is just exponents backwards.

You know how if you divide X by Y you get Z, but you can put the parts together different ways depending on what you have and get the third thing?

X/Y = Z

Y * Z = X

X/Z = Y

Well, logarithms are just another way of putting together exponents. Say you have:

X^Y = Z

But what if you have X and Z, but not Y? X becomes the logarithm *base*, and you can do:

log[X](Z) = Y

Same operation, different parts. Ln(x) is the *natural logarithm*, ie the base is Euler’s number (*e*, or ~2.718), which has special properties in certain branches of mathematics. Notably, the derivative of *e*^x is also *e*^x.

Addition and subtraction.

Multiplication and division.

Powers and logarithms.

So 10^2 = 100. log(100) = 2.

Grab a calculator: 10^2.5 = 316.228. log(316.228) = 2.5.

e is an irrational number, like pi. pi = 3.14159… e = 2.718… Just like pi, e has [some significance](https://en.wikipedia.org/wiki/E_(mathematical_constant)) in mathematics, so you’ll see it used here and there.

In any case, “log” specifically assumes that you’re talking about powers of 10, and “ln” (natural log) specifically assumes that you’re talking about powers of e. For powers of other numbers, you have to write the base in, like powers of 2 you write log2(x). So log2(8) = 3, because 2^3 = 8.

A logarithm is the opposite of an exponent. If Log^(a)(b) = c, that is equivalent to saying that a^c = b.

What really helped it click for me is this: If you take any given number X, calculate the base 10 logarithm, and round up, you will get how many digits long X is.

This is because any one-digit number is between one (10^(0)) and ten (10^(1)), any two-digit number is between 10^1 and 10^(2), any three-digit number is between 10^2 and 10^(3), etc.

e (AKA Euler’s number) is a special constant value that comes up a lot when dealing with exponents. It’s sort of like how pi is equal to 3.14… but e is approximately 2.718. One property of this number is that if you graph f(x) = e^(x), the value of the function at any given point is also equal to the slope of the function at that point, and its the only function with that property.

The natural logarithm (usually written “Ln” but sometimes just “Log”) is just a logarithm of base e. So just like above, Ln(a) = b is the same as saying a = e^(b).

Are you familiar with powers? You need to be comfortable with powers before ever getting to logarithms, so I’ll assume you’re good with that. Now, 2^(4) is 2 times itself 4 times, or 16. 2^(10) is 2 times itself 10 times, or 1024. Now quick, what is 16 times 1024? Well, it’s kind of a pain to multiply those two numbers, but knowing they’re powers of 2, we can simply add the exponents, right? So, 2^(4) times 2^(10) is 2^(4+10), or 2^(14). Which is obviously 16,384.

So here’s the trick with logarithms. For any given base (in our example, base 2) the logarithm of a number is the power you raise the base to to get that number. From the above, you can now see that the log (base 2) of 1024 is 10. And the log (base 2) of 16 is 4. And you can multiply 16 times 1024 by adding their logarithms.

“e” is the base of the so-called “natural” logarithms. These use Euler’s number “e” (2.718281…) as their base, because this simplifies certain operations in calculus, but the principle is the same. Don’t believe me? Let’s run the above example using base “e” instead of base 2.

log (base e) 16 = 2.7726 (Which makes sense. 2^(4) is 16, so “e”, being a slightly bigger base, takes a slightly smaller exponent to produce the same result)

Similarly, log (base e) 1024 = 6.9315

So, to multiply 16 times 1024 using natural logs, we add the exponents 2.7726 + 6.9315 = 9.7041. To find the result, we raise “e” to that power: e^(9.7041), which comes out to (surprise) 16,384.

Hope that helps.

The reason people find logs confusing is because they use a different notation than similar concepts that you already know

Take the following relationship

10^2 = 100

There are two more ways of writing that relationship

Sqrt(100) = 10

Log10(100) = 2

And that’s it. A logarithm reverses exponents like a root does, but it gives you the exponent instead of the base.

We have three ways of writing the same relationship but for some reason they use completely different notations, and for some reason we don’t introduce logs to students until years after they’re used to the other two. That’s why people find them confusing.