8
$\begingroup$

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

  • 0
    You seem a little confused. What does $x[i]$ mean? If $X$ is a matrix then its entries are of the form $x[i,j]$. If you have a square matrix and multiply it by its transpose you get a much more complicated formula. For a start, the answer will again be a square matrix, while the sum you have given is mealy a number!2012-08-28
  • 0
    I used X as a vector i.e. X=[x_1 x_2 ... x_n], where x_k is a number.2012-08-28
  • 0
    Ahhh! I see. I misunderstood your notation. Capital letters are usually reserved for matrices, proper, i.e. not vectors. The notation $X^{\top}\! X$ is most often used when $X$ is an $n$-by-$n$ matrix. For example, the orthogonal matrices are the matrices for which $X^{\top}\! X = E$ where $E$ is the $n$-by-$n$ identity matrix. Vectors are usually denoted by lower case, e.g. $Xv$ is the product of the $n$-by-$n$ matrix $X$ and the $n$-by-1 vector $v$.2012-08-29

2 Answers 2

6

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

3

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$$.

  • 4
    It is common to consider this matrix product as a value, but it is also important to recognize that the output of such a multiplication is actually a 1x1 matrix.2012-08-28