The theory behind backpropogation, gradient calculation
The gradient, just like the derivative, is linear: for functions $f,g$ on the same variables and scalars $\alpha,\beta$:
$$
\nabla(\alpha f + \beta g) = \alpha \nabla f + \beta \nabla g.
$$