I am trying to understand the kernel trick in Support Vector Machines. The things I don't get.
Why is ($\sum_{i}^{n}x_iz_i$)($\sum_{j}^{n}x_jz_j$) equal to $\sum_{i}^{n}\sum_{j}^{n}x_ix_jz_iz_j$?
And why is $\sum_{i}^{n}\sum_{j}^{n}x_ix_jz_iz_j$ equal to $\sum_{i,j=1}^{n}(x_ix_j)(z_iz_j)$?
Reference: Pg 15 http://cs229.stanford.edu/notes/cs229-notes3.pdf
Both statements follow from the distributive property of addition and multiplication. $$(\sum_i^n x_i z_i)(\sum_j^n x_j z_j)=\sum_i^n (x_i z_i \sum_j^n x_j z_j)\\ =\sum_i^n (\sum_j^n x_i z_i x_j z_j)=\sum_i^n \sum_j^n x_i z_i x_j z_j$$
In the second statement, $\sum_{i,j=1}^n$ is simply shorthand for $\sum_{i=1}^n\sum_{j=1}^n$