# Derivation of dz for backpropagation

Can anyone mathematically prove this equation given the values of $dz^{}$, $W^{}$, $z^{}$ and the activation function $g^{}$

$dz^{} = w^{T}dz^{} * g^{'}(z^{})$

For the formal proof I think it's best to post on maths stackexchange instead.

Here are one of the best videos on backpropagation:

Your equation shows the chain rule.

• hadamard-multiplying any matrix (like $w^T$) by a vector-with-n-entries (in your case by $dz^{}$) is basically saying "I scale each stripe of my matrix by the corresponding entry in vector $dz$"

regarding the "stripes":

• each row of $W^{}$ represents a weights from one of our neurons to all neurons in preceding layer

• each column of $W^{}$ represents weights from all our neurons towards one particular neuron in preceding layer.

• your activations ($g$) each depends on the weights that flow into it (the weights are the parameters of these activations).

• your activations also depend on the values of neurons that flow into them. Notice, although neurons are the same entities used by the activations, they are treated as separate branches on the tree diagram (link)

If you watch the "tree diagram link", here is one more hint: in the video, the girl was summing up the terms from different branches. This is exactly what the dot product is doing during backprop.