

In calculus, the chain rule is a formula for computing the derivative of the composition
of two or more functions.
That is, if f and g are functions, then the chain rule expresses the derivative of their
composition f ∘ g {the function which maps x to f(g(x)) } in terms of the derivatives of f
and g and the product of functions as follows:
( f ∘ g )T = ( fT ∘ g) * gT
This can be written more explicitly in terms of the variable.
Let F = f ∘ g, or equivalently, F(x) = f(g(x)) for all x. Then one can also write
FT (x) = fT {g( x)} * gT(x) [Here fT = df/dx, same for other places also]
The chain rule may be written in Leibniz notation in the following way.
If a variable z depends on the variable y, which itself depends on the variable x, so
that y and z are therefore dependent variables, then z, via the intermediate variable
of y, depends on x as well. The chain rule then states,
dz/dx = (dz/dy) * (dy/dx)
The two versions of the chain rule are related,
If z = f(y) and y = g(x), then
dz/dx = (dz/dy) * (dy/dx) = fT (y) * gT (x) = fT {g(x)} * gT (x)
