# Summation to Matrix

How would you represent the following in matrix notation?

$$1 - \sum_{i}\sum_{j} w_i w_j p_{ij}$$

Would the following be correct?

1-(W W' p)


Thanks

-
Hint: put $w_j$ at the right of $p_{i,j}$ – Raymond Manzoni May 6 '13 at 22:30

I guess $w=(w_1,\ldots,w_n)^T$ is the vector and $P$ is the matrix. Then, it is rather $$1-(w^T P w)\,.$$ Expand it!