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

$\endgroup$
  • $\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$ – Fly by Night Aug 28 '12 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 Aug 28 '12 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$ – Fly by Night Aug 29 '12 at 19:22
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$
3
$\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$
  • 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$ – process91 Aug 28 '12 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.