Find the derivative of y with respect to the given independent variable Find the derivative of y with respect to the given independent variable:

$y = 3^{-x} \stackrel{D}{\longrightarrow} y' = 3^{-x} \cdot (-1) \cdot \ln 3 $

This is my teacher's solution. I don't understand what he did. Can someone explain to me?
Your teacher implicitly wrote the function $y$ as
\begin{eqnarray}
y &amp;=&amp; 3^{-x} \\
  &amp;=&amp; e^{-x \ln 3}
\end{eqnarray}
From which the derivative is straightforward
\begin{eqnarray}
\frac{dy}{dx} &amp;=&amp; - \ln 3 . e^{-x \ln 3} \\
              &amp;=&amp; (-1).3^{-x}.\ln 3  
\end{eqnarray}
use this standard result$$\frac{d a^x}{dx}= a^xln(a)$$
and apply chain rule