How $a^{\log_b x} = x^{\log_b a}$? This actually triggered me in my mind from here. After some playing around I notice that the relation $a^{\log_b x} = x^{\log_b a}$ is true for any valid value of $a,b$ and $x$. I am very inquisitive to see how this holds ?
 A: HINT $\rm\ \ \ log(A^{\log X})\ =\ log\ X\ \ log\ A\ =\ log(X^{\log A})\:,\ $ where $\rm\ log := log_b$
A: Using log properties, we have
$a^{\log_b(x)} = b^{\log_b\left(a^{\log_b(x)}\right)} = b^{\log_b(x)\log_b(a)} = \left(b^{\log_b(x)}\right)^{\log_b(a)} = x^{\log_b(a)}$
A: For any positive $r$ and any $s$, you have 
$$r^s = b^{\log_b(r^s)} = b^{s\log_b(r)}.$$
So, taking $r=a$ and $s=\log_b(x)$, we have:
\begin{align*}
a^{\log_b(x)} &= b^{\log_b(x)\log_b(a)}\\
&= b^{\log_b(a)\log_b(x)}\\
& = b^{\log_b(x^{\log_b(a)})}\\
&= x^{\log_b(a)}.
\end{align*}
A: Otherwise :
Changing the base of logarithm, we have :
$$\log_{b}a= \displaystyle\frac{\log_{x}a}{\log_{x}b}$$ and
$$\log_{x}b= \displaystyle\frac{\log_{b}b}{\log_{b}x} = \frac{1}{\log_{b}x} $$
By combine these two ecuations, 
$\log_{b}a= (\log_{b}x)(\log_{x}a) \Leftrightarrow (\log_{b}a)(\log_{x}x)= (\log_{b}x)(\log_{x}a) \Leftrightarrow \log_{x}x^{\log_{b}a} = \log_{x}a^{\log_{b}x}$
By last, canceling $\log_{x}$ on both sides, we have :
$$x^{\log_{b}a} = a^{\log_{b}x}$$
