# Understanding the partial derivative with respect to the weight matrix and bias

Say we have the layer $$X W + b = Y$$.

1. I want to get $$\frac{dL}{dW}$$ and we assume I have $$\frac{dL}{dY}$$. So all I need is to find $$\frac{dY}{dW}$$. I know that it should be $$X^T\frac{dL}{dY}$$ but don't understand why. please explain.
2. I want to get $$\frac{dL}{db}$$ and we assume I have $$\frac{dL}{dY}$$. So all I need is to find $$\frac{dY}{db}$$. I know that it should be $$\sum(\frac{dL}{dY})_i$$ (I mean sum the rows) but I don't understand why. please explain.

Thanks :)

• The TL;DR answer is that the partial derivative of $L$ with respect to the weights or bias is just an application of the chain rule. Maybe later I'll add a complete answer. – nbro Oct 22 '19 at 0:55
• Yea I know that it is because of the chain rule. I’m looking for a concise clear proof. – Yuval Kirstain Oct 23 '19 at 5:15