TITLE: Is there any matrix notation the summation of a vector?
QUESTION [9 upvotes]: I have a simple question please. I want a mathematical notation to express sum(A[i]) where A is a vector (one dimensional matrix). I want to rewrite a simple formula in matrix form (compact form) and need your help. For example, if you want to rewrite $\sum_i x^2[i]$, it may be simply denoted by $X^T X$.
Thanks

REPLY [6 votes]: If you let $e = (1,...,1)^T$ (the notation $\bf{1}$ is often used instead), then the summation is given by $e^T A$.

REPLY [4 votes]: Consider multiplication from left with the matrix $(1,...,1)$, i.e.
$$(1,...,1) \begin{pmatrix}a_1 \\ \vdots \\ a_n \end{pmatrix} = \sum_{i=1}^n a_i$$.