Elasticity and logarithms Let's consider a relationship between $ y $ and $ x $, $ y = a x^b $. Taking log on both sides, we have $$ \log y = \log a + b \log x $$

Now, my textbook, Nicholson and Snyder's Basic Principles and Extensions derives the relationship between elasticity and the logarithm of the two variables thus:

$$ \eta = b = \frac{ d \log y}{d \log x} $$

Now, I understand that $ d \log y = \frac 1y dy $ and $ d \log x = \frac 1x \ dx $. So I understand why we can write $ \eta = \frac {d \log y}{d \log x} $. What I don't understand is: why does $ b $, which is the power on the variable $ x $, equal $ \eta $?

Here's a snapshot from the book:
Because $a$ is a parameter, and so
$$
\eta = \frac{ d \log y}{d \log x} = \frac{ d \log a + d \ b \log x}{d \log x} = 0 + b.
$$