I have to work with the following sum: $\sum_{ijk}\omega u_iu_j \delta_{ik}\delta_{kj}$ where $\omega$ is a constant in $\mathbb{C}$.
Is the answer: $$\omega \sum_k \sum_i u_i \delta_{ik}\sum_j u_j\delta_{kj}=\omega\sum_k u_k^2$$ or: $$\sum_{ij}u_iu_j \left(\sum_k \omega\delta_{ik}\delta_{kj}\right)=\sum_{ij}u_iu_j \left(2\omega-\omega\delta{ij}\right)=2\omega\sum_{ij}u_iu_j-\omega\sum_iu_i^2$$.
This is a pretty basic question, but I don't see where my logic is wrong here... If it is too obvious I can delete the question once my slow mind gets it... Anyway, thanks for your help!
Edit:
For the second line of calculation here was my reasoning:
In the $\sum_k \omega\delta_{ik}\delta_{kj}$ there are only two non-zero terms, namely when $k=i$ and when $k=j$ therefore $\sum_k \omega\delta_{ik}\delta_{kj}=2\omega$. However if $i=j$ then there is only one non-zero term. Therefore to consider this case I have to add $-\omega\delta_{ij}$.
Which yields: $\sum_k \omega\delta_{ik}\delta_{kj}=2\omega-\omega\delta_{ij}$.