# Find the partial derivative of a weighted sum function

I am a high school student who is having problems understanding a resource which I am using for a research project. I basically am trying to get a derivative of a weighted sum function in relation to a particular value of weight (particular index of the wjk matrix).

$W_{jk}$ is a specific index in a matrix so can be thought of as a numerical value.

$$\frac{\partial}{\partial W_{jk}}\left(\sum_{j}W_{jk}\cdot O_j\right)$$

My resource states that $O_j$ is the derivative.

I think because we are looking at the derivative of the function output in relation to a specific index ($W_{jk}$), the summation can be ignored/dropped as it takes in values which as I understand, don't influence how the particular index ($W_{jk}$) changes the function output. Or this is at least how I understand it (the book explains the removal of another summation in a similar way).

My resource gives and answer but doesn't explain the process so I am left scratching my head. I would appreciate any help!

• Try expanding that summation explicitly. It should become pretty obvious then.
– amd
Aug 21, 2018 at 17:41
• @amd how so? I'm not sure I can do that since the operator depends on j. Aug 21, 2018 at 17:47

I changed the index in the sum to $i$ to hopefully make things clearer. $$\frac{\partial}{\partial w_{jk}}\sum_iw_{ik}o_i=\frac{\partial}{\partial w_{jk}}(w_{i_1k}o_{i_1}+w_{i_2k}o_{i_2}+\ldots+w_{jk}o_j+\ldots)$$
When differentiating with respect to $w_{jk}$, all of the terms vanish except for $w_{jk}o_j$, and the derivative of this with respect to $w_{jk}$ is $o_j$.
• The $j$ in the sum is a dummy index. Since you are summing over that index, it does not matter if you call it something else. Aug 21, 2018 at 18:16