Partial Derivatives Question
This is from an econ textbook, but the content is all math. The example in the book starts from the following identity:
D(p) = S(p,a)
Where p and a are variables. Furthermore p = p(a), so the new equation given is:
D(p(a)) = S(p(a), a).
The following part is where the book loses me, and they do not do a very good job of showing how these equations are derived. I haven't been exposed to partial derivatives yet, but know what they are. I just don't understand how the book gets this derivative:
(dD(p(a))/dp) dp/da = (partialdS(p(a), a))/(partialdp) (dp/da) + (partialdS(p(a), a))/(partialda)
Sorry if that is really messy, but I'm not sure how to use the tags. This isn't a homework problem or anything, I just really want to know how that equation is derived. Any help would be greatly appreciated.