https://en.wikipedia.org/wiki/Automatic_differentiation
which is really cool stuff and should be included more often when talking about backprop.