Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I understand that $$a^{\log_b(n)} = n^{\log_b(a)}.$$

What is the math behind this transformation that allows you to swap the $a$ and $n$?

share|cite|improve this question
Take the base-$b$ logarithms of both sides for starters. – J. M. Apr 28 '12 at 19:22
up vote 5 down vote accepted

By definition, $a=b^{\log_b(a)}$ and $n=b^{\log_b(n)}$. Therefore $$a^{\log_b(n)}=(b^{\log_b(a)})^{\log_b(n)}=b^{\log_b(a)\cdot\log_b(n)}=(b^{\log_b(n)})^{\log_b(a)}=n^{\log_b(a)}.$$

share|cite|improve this answer

Use change of base on $\log_b(n)$ and write it as $\frac{\log_a(n)}{\log_a(b)}$. Thus, $a^{\frac{\log_a(n)}{\log_a(b)}}=n^{\frac{1}{\log_a(b)}}=n^{\log_b(a)}$.

share|cite|improve this answer
I do not follow the step $a^{\frac{\log_a(n)}{\log_a(b)}}=n^{\frac{1}{\log_a(b)}}$. Also why is the reciprocal of a log the same as swapping the base and argument? – WilliamKF Apr 28 '12 at 19:33
I hope this helps: $a^{\frac{\log_a(n)}{\log_a(b)}}=\left(a^{\log_a(n)}\right)^{\frac{1}{\log_a(b)}‌​}=n^{\frac{1}{\log_a(b)}}=n^{\log_b(a)}$. In general, $\log_a(b) = \frac{\log_b(b)}{\log_b(a)} = \frac{1}{\log_b(a)}$. – Eric Apr 29 '12 at 21:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.