How does $n < 2^n$ become $\log n < n$ by taking log of both sides?

How does $n < 2^n$ become $\log n < n$ by taking the log of both sides?

I understand the left side but I do not understand the right side of the inequality. The once was $\log 2^n$ becomes $n$ for some reason...

The logarithm function is an increasing function, which means it is valid to take the $\log$ of each side of the equation.

$$\log (n) \lt \log(2^n) \iff \log(n) < n\log 2$$

This is because one of the laws of exponents tells us $$\log a^b = b\log a.$$

If you are using $\log_2$, then $\log_2(n) < n\log_2(2) = n$

• ...and $\log$ is increasing. Dec 18 '14 at 19:00
• Also, sometimes (like in complexity analysis) multiplicative constants (like $\log 2$ here) are ignored. Dec 18 '14 at 19:03
• is log always increasing by default or what hint tells me it is increasing? If the constant was not 2, but 100, do we just omit the constant all the time? Dec 18 '14 at 19:04
• $\log_a$ is increasing if $a>1$ and decreasing if $0<a<1.$
– mfl
Dec 18 '14 at 19:10
• The definition is that $\log_a b$ is the number $c$ for which $a^c=b$. ${}\qquad{}$ Dec 18 '14 at 20:39

$n < 2^n$ then $\log n <n \log 2$, since $\log 2 < 1$, we claim that $$\log n < n$$

• is log 2 < 1 true if the base was any arbitrary number? Dec 18 '14 at 19:09
• No. Only if the basis is bigger than $2.$
– mfl
Dec 18 '14 at 19:11