2

How can I prove the following easily?(If it is true of course.)

\begin{align} \nabla_{\mathbf{x}_k} \left( \sum_{i=1}^{n}\sum_{j=1}^{n} \mathbf{x}^{T}_i \mathbf{W}_{ij} \mathbf{x}_j \right)=\sum_{j=1}^{n}(\mathbf{W}_{kj}\mathbf{x}_{j}+\mathbf{W}_{jk}^{T}\mathbf{x}_j) \end{align}

Here each $\mathbf{x}_i \in \mathbb{R}^{N}$ is a different vector, and each $\mathbf{W}_{ij} \in \mathbb{R}^{N\times N}$ is a different matrix of real numbers for $i,j = 1,2,...,n$.

Sunny88
  • 1,069
  • @GiuseppeNegro If you believe they are duplicate, please tell me how can I apply the answer to that question to this one. Then I will know the answer. In that question vectors to the right and left of the matrix are same, in this one they are not. – Sunny88 Jan 15 '13 at 13:24
  • Well, the fact is that $$x^TWx$$is just a condensed notation to say $$\sum_{i,j} x_i W_{ij}x_j.$$ That's why I say that those questions are really the same: the difference is only apparent. Don't you agree? – Giuseppe Negro Jan 15 '13 at 16:33
  • @GiuseppeNegro Yes, but in this case these are vectors and matrices, while in the other question these were real numbers. Can you show me how can I solve this question using the result from the linked question? – Sunny88 Jan 15 '13 at 17:01
  • @GiuseppeNegro And the answer is also different.. In this question the two matrices in the answer are different, while in the linked question they were same. – Sunny88 Jan 15 '13 at 17:02
  • Ok, I see the subtlety now. Sorry. However, I believe that any method which worked for that question will work for the present one, since the algebraic mechanism is exactly the same. – Giuseppe Negro Jan 15 '13 at 18:42
  • @GiuseppeNegro I finally solved, I hope it is correct derivation. – Sunny88 Jan 15 '13 at 18:51

1 Answers1

0

I think I solved: \begin{align} \nabla_{x_k} \left( \sum_{i=1}^{n}\sum_{j=1}^{n} x^{T}_i W_{ij} x_j \right) &= \sum_{i=1,i\neq k}^{n}W_{kj}x_j + \sum_{j=1, j\neq k}^{n}(x^T_jW_{jk})^T + x^T_k W_{kk} x_k\\ \text{using the linked question:}\\ &= \sum_{i=1,i\neq k}^{n}\left( W_{ki}x_i + W^T_{ik}x_i \right)+ W_{kk} x_k + W^T_{kk}x_k\\ &= \sum_{i=1}^{n}\left( W_{ki}x_i + W^T_{ik}x_i \right) \end{align}

Sunny88
  • 1,069