How to rewrite double sum in matrix operation?

1.6k Views Asked by At

I have a double sum $\sum_{i=1,j=1}^n \alpha_i \alpha_j y_i y_j(x_i,x_j),\ x_i \in R^{d},\ y_i \in R,\ \alpha_i \in R $

How it can be rewritten in terms of vectors and matrices operations?

2

There are 2 best solutions below

0
On BEST ANSWER

Let $A$ be the matrix whose columns are $x_i$, and let $y$ be the (column) vector whose entries are $\alpha_i y_i$. Your sum can be written as $$ y^T X^TX y $$

0
On

consider the following expressions, may be they are helpful.

$\mathbf{\alpha}=[\alpha_1,...,\alpha_n]^T$

$\mathbf{\alpha}\mathbf{\alpha}^T$

$\mathbf{y}\mathbf{y}^T$

$X^TX$

$X=\begin{bmatrix} \mathbf{x_1}^T\\ \mathbf{x_2}^T \end{bmatrix}$

I assume $(x_i,x_j)$ is the dot product of the two vectors.