Concisely expressing the derivative over a summation

29 Views Asked by At

I am encountering the term $$ \frac{\partial}{\partial w_i} \Bigg( \frac{\lambda}{2} \sum_{j=0}^M {w_j}^2 \Bigg) $$ Thinking about it, it seems that this is stating that where $i \ne j$ the result of that expression will be $0$, while where $i = j$ the result will be $\lambda$. If this is true, how exactly would I express that? In index notation I imagine it would look something like $\lambda_i$, but I am stumped when it comes to matrix notation.

1

There are 1 best solutions below

0
On

The expression you have written simplifies to $\lambda w_i$, since the derivatives of all except the $i$-th terms are $0$.

$\lambda$ is a constant, i.e., the same for all $i$, so there's no need to index it.