# Why does taking logs of base $0 < b < 1$ for exponential inequalities flip the inequality?

Suppose there was the problem "what is the first integer power of 0.8 to exceed 2000?"

I'd write it out like so: $0.8^x>2000.$

From my understanding, the logarithmic method of solving this would be by taking logs of both sides and then re-arranging to find $x$.

Doing so would give you this: (A) $x\log_b0.8>\log_b2000$ which re-arranges to (B) $x>\frac{\log_b2000}{\log_b0.8}$

There are two ranges of values that $b$ could be: $0<b<1$ or $b>1$.

For $b>1$ the $0.8$ log would be negative, meaning that going from step (A) to (B) would flip the inequality as you're dividing by a negative. Therefore this gives the answer $x < -34.06$ meaning that the answer to the original problem would be $-35$, which works out correctly.

For $0<b<1$ on the other hand, the $0.8$ log would remain positive. This means that when going from step (A) to step (B) you're dividing by a positive number. From what I understand this should flip the sign. So following my logic this gives the answer $x > -34.06$ meaning that the answer to the original problem would be $-34$, which does not work out correctly.

So why is it that taking logs of both sides with a base smaller than $0<b<1$ flips the inequality?

Because if $0<b<1$, then $\log_b$ is a decreasing function and therefore $x<y\implies \log_bx>\log_by$.
Because $$b^x = \left(b^{-1} \right)^{-x}= \left(\dfrac 1b \right)^{-x}$$
So \begin{align} \log_b(n)=x &\implies n = b^x = \left(\dfrac 1b \right)^{-x} \\ &\implies \log_{\frac 1b}n=-x \end{align}
An example would be $$2^5 = 32$$ implies $$\left(\dfrac 12 \right)^{-5} = 32$$. Hence $$\log_232 = 5$$ and $$\log_{\frac 12}32 = -5$$.