I am reading about master theorem and it says that the number of leaves is $a^{\log _{b} n}$, and this part I can understand.
But then it immediately concludes that $$ a^{\log _{b} n} = n^{\log _{b} a} $$ which I am not getting. I verified that it is true by plugging in some values and also I tried to prove it by looking up properties of logatirthms but that didn't seem to help.
Can someone provide an explanation to why this is true?