9
$\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

$\endgroup$
3
  • $\begingroup$ 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! $\endgroup$ Commented Aug 28, 2012 at 18:42
  • $\begingroup$ I used X as a vector i.e. X=[x_1 x_2 ... x_n], where x_k is a number. $\endgroup$
    – remo
    Commented Aug 28, 2012 at 19:44
  • $\begingroup$ 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$. $\endgroup$ Commented Aug 29, 2012 at 19:22

2 Answers 2

6
$\begingroup$

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

$\endgroup$
4
$\begingroup$

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

$\endgroup$
1
  • 4
    $\begingroup$ 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. $\endgroup$
    – mboratko
    Commented Aug 28, 2012 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .