Why is $x^{\log_x n}=n$? I'm currently doing a couple of exercises on logarithmic expressions, and I was a bit confused when presented with the following: $5^{\log_5 17}$.
The answer is $17$, which is the argument of the logarithm in the exponent, but I don't understand the reason why.
A previous question in the exercise was $12^{\log_{12} 144}$, which is pretty straight forward since $\log_{12} 144=2$ and $12^2=144$ but since $\log_5 17$ is an irrational number, I couldn't calculate it the same way.
So my question is, why is $x^{\log_x n}=n$?
[Update]
I've now managed to reason this out and realized how simple it is.  Basically, if $y=\log_x n$, then $y$ is the number that  $x$ must be raised to to become $n$; therefore, if I raise $x$ to that power $y$, I will naturally get $n$.
I guess my problem was that I tried to work out the question mechanically instead of intelligently and that's why I failed, because once I realized that I can't calculate $\log_5 17$, I was stumped.  Now that I reasoned it out, as explained in the previous paragraph, I understand it.
 A: The function $\log_x(n)$ answers the question, "What power do I need to raise $x$ to in order to get $n$?"
So $x^{\log_x(n)}$ is $x$ raised to the power that is the power to which I must raise 
$x$ to in order to get $n$. Thus $x$ raised to that power is by definition $n$.
A: Full answers have already been given by Arturo Magidin and Bill Cook.  The fact that $x^{\log_x n}=n$ is a direct consequence of the meaning of $x^y$ and $\log_x z$. 
The following non-mathematical question may help in clarifying what is going on.
"What is the capital of the country whose capital is Valletta?"
We do not need to know that the country is Malta to answer this question!   Similarly, we do not need to calculate ("know") $\log_5 17$ to decide that $5^{\log_5 17}=17$. 
A: By definition, $\log_a(r)$ is the unique number $t$ such that $a^t=r$. That is,
$$\log_a(r) = t\text{ is equivalent to }a^t = r.$$
So
$$\log_x(n) = r\text{ is equivalent to }x^r = n.$$
In particular, 
$$a^{\log_a(r)} = r\text{ for any }a\gt 0, a\neq 1,\text{ and any }r\gt 0.$$
Therefore,
$$x^{\log_x(n)} = n$$
by definition of what the logarithm is.
